Neko-TOP
A portable framework for high-order spectral element flow toplogy optimization.
Loading...
Searching...
No Matches
user_module.f90
Go to the documentation of this file.
1
17 use case, only: case_t
18 use field, only: field_t
19 use json_file_module, only: json_file
20 use json_utils, only: json_get
21 use num_types, only: rp
23 use coefs, only: coef_t
25
26 implicit none
27
28 private
29 public :: neko_user_init
30
31contains
32
42 subroutine neko_user_init(neko_case)
43 type(case_t), intent(inout) :: neko_case
44
45 ! Set the properties for the fluid
46 neko_case%usr%material_properties => set_material_properties
47 neko_case%usr%scalar_user_ic => scalar_z_split_ic
48
49 end subroutine neko_user_init
50
52 subroutine set_material_properties(t, tstep, rho, mu, cp, lambda, params)
53 real(kind=rp), intent(in) :: t
54 integer, intent(in) :: tstep
55 real(kind=rp), intent(inout) :: rho, mu, cp, lambda
56 type(json_file), intent(inout) :: params
57
58 real(kind=rp) :: re, pe
59
60 call json_get(params, 'case.fluid.Re', re)
61 call json_get(params, 'case.scalar.Pe', pe)
62
63 mu = 1.0_rp / re
64 lambda = 1.0_rp / pe
65 rho = 1.0_rp
66 cp = 1.0_rp
67 end subroutine set_material_properties
68
69
70
71
subroutine, public topopt_permeability_force(f, t)
Compute the permeability force term.
Definition design.f90:267
subroutine scalar_z_split_ic(s, params)
Set the initial condition for the scalar field.
Module designed to setup the topology optimization user interface for Neko. This module should initia...
subroutine, public neko_user_init(neko_case)
Assign user conditions for the neko case.
subroutine set_material_properties(t, tstep, rho, mu, cp, lambda, params)
Initialize the material properties, unfortunately required from Neko.