40 use json_module,
only : json_file
60 real(kind=
rp) :: gamma
73 procedure, pass(this) :: compute_cfl &
91 type(
mesh_t),
target,
intent(inout) :: msh
92 integer,
intent(in) :: lx
93 character(len=*),
intent(in) :: scheme
94 type(json_file),
target,
intent(inout) :: params
95 type(
user_t),
target,
intent(in) :: user
103 if (msh%gdim .eq. 2)
then
104 call this%Xh%init(
gll, lx, lx)
106 call this%Xh%init(
gll, lx, lx, lx)
109 call this%dm_Xh%init(msh, this%Xh)
111 call this%gs_Xh%init(this%dm_Xh)
113 call this%c_Xh%init(this%gs_Xh)
119 this%params => params
122 call this%mu_field%init(this%dm_Xh,
"mu")
123 call this%rho_field%init(this%dm_Xh,
"rho")
124 call field_cfill(this%mu_field, 0.0_rp, this%mu_field%size())
133 call this%m_x%init(this%dm_Xh,
"m_x")
134 call this%m_y%init(this%dm_Xh,
"m_y")
135 call this%m_z%init(this%dm_Xh,
"m_z")
140 call this%E%init(this%dm_Xh,
"E")
149 call this%u%init(this%dm_Xh,
"u")
150 call this%v%init(this%dm_Xh,
"v")
151 call this%w%init(this%dm_Xh,
"w")
154 call this%p%init(this%dm_Xh,
"p")
157 call this%ulag%init(this%u, 1)
158 call this%vlag%init(this%v, 1)
159 call this%wlag%init(this%w, 1)
167 call this%f_x%init(this%dm_Xh, fld_name =
"fluid_rhs_x")
168 call this%f_y%init(this%dm_Xh, fld_name =
"fluid_rhs_y")
169 call this%f_z%init(this%dm_Xh, fld_name =
"fluid_rhs_z")
179 call this%dm_Xh%free()
180 call this%gs_Xh%free()
181 call this%c_Xh%free()
184 call this%mu_field%free()
185 call this%rho_field%free()
202 call this%ulag%free()
203 call this%vlag%free()
204 call this%wlag%free()
213 integer :: temp_indices(1)
215 n = this%dm_Xh%size()
216 call this%scratch%request_field(temp, temp_indices(1))
219 call field_col3(this%m_x, this%u, this%rho_field)
220 call field_col3(this%m_y, this%v, this%rho_field)
221 call field_col3(this%m_z, this%w, this%rho_field)
225 call field_cmult2(this%E, this%p, 1.0_rp/(this%gamma - 1.0_rp), n)
233 call this%scratch%relinquish_field(temp_indices)
243 real(kind=
rp),
intent(in) :: dt
Abstract interface to sets rho and mu.
Retrieves a parameter by name or assigns a provided default value. In the latter case also adds the m...
Abstract interface defining a user defined inflow condition (pointwise)
Defines a dirichlet boundary condition.
subroutine, public field_col2(a, b, n)
Vector multiplication .
subroutine, public field_cmult2(a, b, c, n)
Multiplication by constant c .
subroutine, public field_cfill(a, c, n)
Set all elements to a constant c .
subroutine, public field_addcol3(a, b, c, n)
Returns .
subroutine, public field_add2(a, b, n)
Vector addition .
subroutine, public field_col3(a, b, c, n)
Vector multiplication with 3 vectors .
subroutine, public field_cmult(a, c, n)
Multiplication by constant c .
Defines a registry for storing solution fields.
type(field_registry_t), target, public neko_field_registry
Global field registry.
subroutine fluid_scheme_compressible_update_material_properties(this)
Set rho and mu.
subroutine fluid_scheme_compressible_free(this)
Free allocated memory and cleanup resources.
subroutine fluid_scheme_compressible_init(this, msh, lx, params, scheme, user)
Initialize common data for compressible fluid scheme.
real(kind=rp) function fluid_scheme_compressible_compute_cfl(this, dt)
Compute CFL number.
subroutine fluid_scheme_compressible_validate(this)
Validate field initialization and compute derived quantities.
Utilities for retrieving parameters from the case files.
integer, parameter, public log_size
integer, parameter, public rp
Global precision used in computations.
Defines a registry for storing and requesting temporary fields This can be used when you have a funct...
Defines a function space.
integer, parameter, public gll
Interfaces for user interaction with NEKO.
Defines inflow dirichlet conditions.
Generic Dirichlet boundary condition on .
Base type of all fluid formulations.
Base type of compressible fluid formulations.
The function space for the SEM solution fields.