1# 1 "/home/runner/work/MFC/MFC/src/pre_process/m_initial_condition.fpp"
31 allocate (
ic%q_prim_vf(1:sys_size))
32 allocate (
ic%q_cons_vf(1:sys_size))
43 allocate (
ic%patch_id_fp(0:m,0:n,0:p))
45 if (qbmm .and. .not. polytropic)
then
46 allocate (
pb%sf(0:m,0:n,0:p,1:nnode,1:nb))
47 allocate (
mv%sf(0:m,0:n,0:p,1:nnode,1:nb))
51 ic%q_cons_vf(i)%sf = -1.e-6_stp
52 ic%q_prim_vf(i)%sf = -1.e-6_stp
55 allocate (
ic%bc_type(1:num_dims,1:2))
57 allocate (
ic%bc_type(1, 1)%sf(0:0,0:n,0:p))
58 allocate (
ic%bc_type(1, 2)%sf(0:0,0:n,0:p))
62 ic%bc_type(1, 1)%sf(0,
k,
l) = int(min(
bc_x%beg, 0), kind=1)
63 ic%bc_type(1, 2)%sf(0,
k,
l) = int(min(
bc_x%end, 0), kind=1)
73 ic%bc_type(2, 1)%sf(
j, 0,
l) = int(min(
bc_y%beg, 0), kind=1)
74 ic%bc_type(2, 2)%sf(
j, 0,
l) = int(min(
bc_y%end, 0), kind=1)
84 ic%bc_type(3, 1)%sf(
j,
k, 0) = int(min(
bc_z%beg, 0), kind=1)
85 ic%bc_type(3, 2)%sf(
j,
k, 0) = int(min(
bc_z%end, 0), kind=1)
93 ic%q_cons_vf(eqn_idx%damage)%sf = 0._wp
94 ic%q_prim_vf(eqn_idx%damage)%sf = 0._wp
98 if (hyper_cleaning)
then
99 ic%q_cons_vf(eqn_idx%psi)%sf = 0._wp
100 ic%q_prim_vf(eqn_idx%psi)%sf = 0._wp
131 if (elliptic_smoothing .and. chemistry)
then
134 else if (elliptic_smoothing)
then
140 if (qbmm .and. .not. polytropic)
then
153 deallocate (
ic%q_prim_vf(i)%sf)
154 deallocate (
ic%q_cons_vf(i)%sf)
157 deallocate (
ic%q_prim_vf)
158 deallocate (
ic%q_cons_vf)
161 deallocate (
ic%q_T_sf%sf)
164 deallocate (
ic%patch_id_fp)
166 deallocate (
ic%bc_type(1, 1)%sf)
167 deallocate (
ic%bc_type(1, 2)%sf)
170 deallocate (
ic%bc_type(2, 1)%sf)
171 deallocate (
ic%bc_type(2, 2)%sf)
175 deallocate (
ic%bc_type(3, 1)%sf)
176 deallocate (
ic%bc_type(3, 2)%sf)
179 deallocate (
ic%bc_type)
Assigns initial primitive variables to computational cells based on patch geometry.
Applies spatially varying boundary condition patches along domain edges and faces.
impure subroutine, public s_apply_boundary_patches(q_prim_vf, bc_type)
Iterate over all boundary condition patches and dispatch them by geometry type.
Multi-species chemistry interface for thermodynamic properties, reaction rates, and transport coeffic...
subroutine s_compute_t_from_primitives(q_t_sf, q_prim_vf, bounds)
Compute the temperature field from primitive variables using the ideal gas law and mixture molecular ...
Shared derived types for field data, patch geometry, bubble dynamics, and MPI I/O structures.
Defines global parameters for the computational domain, simulation algorithm, and initial conditions.
type(int_bounds_info), dimension(1:3) idwint
type(int_bounds_info) bc_z
Boundary conditions in the x-, y- and z-coordinate directions.
type(int_bounds_info), dimension(1:3) idwbuff
integer buff_size
Number of ghost cells for boundary condition storage.
type(int_bounds_info) bc_y
type(int_bounds_info) bc_x
Utility routines for bubble model setup, coordinate transforms, array sampling, and special functions...
Allocate memory and read initial condition data for IC extrusion.
impure subroutine, public s_apply_icpp_patches(patch_id_fp, q_prim_vf)
Dispatch each initial condition patch to its geometry-specific initialization routine.
Assembles initial conditions by layering prioritized patches via constructive solid geometry.
type(ic_context) ic
Initial-condition state (fields, bc types, patch ids).
impure subroutine s_initialize_initial_condition_module
Computation of parameters, allocation procedures, and/or any other tasks needed to properly setup the...
impure subroutine s_finalize_initial_condition_module
Deallocation procedures for the module.
impure subroutine s_generate_initial_condition
Iterate over patches and, depending on the geometry type, call the related subroutine to setup the sa...
Broadcasts user inputs and decomposes the domain across MPI ranks for pre-processing.
Perturbs initial mean flow fields with random noise, mixing-layer instabilities, or simplex noise.
impure subroutine s_perturb_sphere(q_prim_vf)
Randomly perturb partial density fields at the interface of a spherical volume fraction region.
impure subroutine s_perturb_surrounding_flow(q_prim_vf)
Add random noise to the velocity and void fraction of the surrounding flow field.
impure subroutine s_elliptic_smoothing(q_prim_vf, bc_type, q_t_sf)
Iteratively smooth all primitive variable fields using a discrete elliptic (Laplacian) filter.
subroutine s_perturb_simplex(q_prim_vf)
Perturb velocity and volume fraction fields using multi-octave simplex noise.
subroutine s_perturb_mixlayer(q_prim_vf)
Compute velocity perturbations for a temporal mixing layer with a hyperbolic tangent mean streamwise ...
Conservative-to-primitive variable conversion, mixture property evaluation, and pressure computation.
subroutine, public s_initialize_mv(qk_cons_vf, mv)
Initialize bubble mass-vapor values at quadrature nodes from the conserved moment statistics.
subroutine, public s_initialize_pb(qk_cons_vf, mv, pb)
Initialize bubble internal pressures at quadrature nodes using isothermal relations from the Preston ...
impure subroutine, public s_convert_primitive_to_conservative_variables(q_prim_vf, q_cons_vf)
Convert primitives (rho, u, p, alpha) to conserved variables (rho*alpha, rho*u, E,...
subroutine, public s_convert_conservative_to_primitive_variables(qk_cons_vf, q_t_sf, qk_prim_vf, ibounds)
Convert conserved variables (rho*alpha, rho*u, E, alpha) to primitives (rho, u, p,...
Initial-condition state assembled by pre_process: working primitive and conservative fields,...