You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<tdclass="markdownTableBodyNone"><spanclass="tt">m_chemistry</span></td><tdclass="markdownTableBodyNone">Multi-species chemistry interface for thermodynamic properties, reaction rates, and transport coefficients </td></tr>
299
299
<trclass="markdownTableRowOdd">
300
-
<tdclass="markdownTableBodyNone"><spanclass="tt">m_acoustic_src</span></td><tdclass="markdownTableBodyNone">One-way acoustic source injection, Maeda and Colonius JCP (2017)</td></tr>
300
+
<tdclass="markdownTableBodyNone"><spanclass="tt">m_conduction</span></td><tdclass="markdownTableBodyNone">Fourier heat conduction, div(k grad T), as a face-centered source flux on the energy equation</td></tr>
301
301
<trclass="markdownTableRowEven">
302
-
<tdclass="markdownTableBodyNone"><spanclass="tt">m_body_forces</span></td><tdclass="markdownTableBodyNone">Computes gravitational and body force source terms for the momentum equations</td></tr>
302
+
<tdclass="markdownTableBodyNone"><spanclass="tt">m_acoustic_src</span></td><tdclass="markdownTableBodyNone">One-way acoustic source injection, Maeda and Colonius JCP (2017)</td></tr>
303
303
<trclass="markdownTableRowOdd">
304
-
<tdclass="markdownTableBodyNone"><spanclass="tt">m_pressure_relaxation</span></td><tdclass="markdownTableBodyNone">Pressure relaxation for the six-equation multi-component model via Newton–Raphson equilibration and volume-fraction correction</td></tr>
304
+
<tdclass="markdownTableBodyNone"><spanclass="tt">m_body_forces</span></td><tdclass="markdownTableBodyNone">Computes gravitational and body force source terms for the momentum equations</td></tr>
305
305
<trclass="markdownTableRowEven">
306
+
<tdclass="markdownTableBodyNone"><spanclass="tt">m_pressure_relaxation</span></td><tdclass="markdownTableBodyNone">Pressure relaxation for the six-equation multi-component model via Newton–Raphson equilibration and volume-fraction correction </td></tr>
307
+
<trclass="markdownTableRowOdd">
306
308
<tdclass="markdownTableBodyNone"><spanclass="tt">m_collisions</span></td><tdclass="markdownTableBodyNone">Ghost-node immersed boundary method: locates ghost/image points, computes interpolation coefficients, and corrects the flow state </td></tr>
<tdclass="markdownTableBodyNone"><spanclass="tt">m_ibm</span></td><tdclass="markdownTableBodyNone">Ghost-node immersed boundary method: locates ghost/image points, computes interpolation coefficients, and corrects the flow state </td></tr>
325
327
<trclass="markdownTableRowOdd">
326
-
<tdclass="markdownTableBodyNone"><spanclass="tt">m_particle_cloud</span></td><tdclass="markdownTableBodyNone">Generates particle beds by converting particle_cloud patch specifications into individual immersed boundary patches before domain reduction</td></tr>
328
+
<tdclass="markdownTableBodyNone"><spanclass="tt">m_particle_cloud</span></td><tdclass="markdownTableBodyNone">Generates particle beds by converting particle_cloud patch specifications into individual immersed boundary patches before writing them to the initial IB state file</td></tr>
327
329
<trclass="markdownTableRowEven">
328
330
<tdclass="markdownTableBodyNone"><spanclass="tt">m_igr</span></td><tdclass="markdownTableBodyNone">Iterative ghost rasterization (IGR) for sharp immersed boundary treatment </td></tr>
<li><b>Add the module to <spanclass="tt">docs/module_categories.json</span></b> so it appears in this page</li>
430
432
</ol>
431
433
<p>Follow the pattern of existing modules like <spanclass="tt">m_body_forces</span> (simple) or <spanclass="tt">m_viscous</span> (more involved) as a template.</p>
<tdclass="markdownTableBodyRight"><spanclass="tt">G</span></td><tdclass="markdownTableBodyCenter">Real </td><tdclass="markdownTableBodyLeft">Shear modulus of solid. </td></tr>
610
612
</table>
611
613
<p>Fluid material's parameters. All parameters except for sigma should be prepended with <spanclass="tt">fluid_pp(i)</span> where $i$ is the fluid index.</p>
<p>When these parameters are undefined, fluids are treated as inviscid. Details of implementation of viscosity in MFC can be found in Coralic <aclass="el" href="citelist.html#CITEREF_coralic15">[14]</a>.</p>
620
622
<ul>
623
+
<li><spanclass="tt">fluid_pp(i)%k_therm</span> sets the thermal conductivity of the $i$-th fluid, in units consistent with the rest of the (non-dimensional) case. A positive value on any fluid activates Fourier heat conduction, which adds \(\nabla\cdot(k\nabla T)\) to the energy equation using the thermal-equilibrium mixture temperature and \(k = \sum_i \alpha_i k_i\) (see <aclass="el" href="equations.html" title="Equations">Equations</a>). It requires <spanclass="tt">fluid_pp(i)%cv</span> to be positive on every fluid that sets it (the mixture temperature is undefined without \(c_v\)), <spanclass="tt">model_eqns = 2</span> or <spanclass="tt">model_eqns = 3</span> (the mixture conductivity is weighted by volume fractions that <spanclass="tt">model_eqns = 1</span> does not carry), and <spanclass="tt">fluid_pp(i)%eos</span> to be the stiffened-gas or ideal-gas equation of state. Heat conduction is independent of <spanclass="tt">viscous</span>: it can be enabled in an otherwise inviscid run. It is not supported with <spanclass="tt">igr</span>, nor with <spanclass="tt">chemistry</span> (which already carries its own mixture-averaged conduction through <spanclass="tt">chem_params%diffusion</span>).</li>
621
624
<li><spanclass="tt">fluid_pp(i)%cv</span>, <spanclass="tt">fluid_pp(i)%qv</span>, and <spanclass="tt">fluid_pp(i)%qvp</span> define $c_v$, $q$, and $q'$ as parameters of $i$-th fluid that are used in stiffened gas equation of state.</li>
622
625
<li><spanclass="tt">fluid_pp(i)%G</span> is required for <spanclass="tt">hypoelasticity</span>.</li>
<tdclass="markdownTableBodyRight"><spanclass="tt">bc_[x,y,z]%Twall_out</span></td><tdclass="markdownTableBodyCenter">Real </td><tdclass="markdownTableBodyLeft">Temperature [K] of the exit isothermal wall. </td></tr>
1509
1512
</table>
1510
-
<p>This boundary condition can be used for fixed-temperature (isothermal) walls at the domain extremities. It is exclusively available for reacting flows and requires chemistry to be enabled. It properly evaluates heat and species fluxes at the interface when <spanclass="tt">chemistry = 'T'</span>, <spanclass="tt">chem_params%diffusion = 'T'</span>, and the corresponding domain boundary is set to a slip wall (<spanclass="tt">bc_[x,y,z]%%[beg,end]</span> = -15) or a no-slip wall (<spanclass="tt">bc_[x,y,z]%%[beg,end]</span> = -16).</p>
1513
+
<p>This boundary condition can be used for fixed-temperature (isothermal) walls at the domain extremities. It requires a heat-conduction path so the wall flux can be evaluated: either a reacting flow with <spanclass="tt">chemistry = 'T'</span> and <spanclass="tt">chem_params%diffusion = 'T'</span>, or Fourier conduction with <spanclass="tt">fluid_pp(i)%k_therm</span> > 0. The corresponding domain boundary must be set to a slip wall (<spanclass="tt">bc_[x,y,z]%%[beg,end]</span> = -15) or a no-slip wall (<spanclass="tt">bc_[x,y,z]%%[beg,end]</span> = -16). With chemistry it evaluates both heat and species fluxes; with Fourier conduction it evaluates the heat flux.</p>
<p>💡 <b>Tip:</b> If you encounter a validation error, check the relevant section above or review <ahref="https://github.com/MFlowCode/MFC/blob/master/toolchain/mfc/case_validator.py"><spanclass="tt">case_validator.py</span></a> for complete validation logic.</p>
<li><b>Derived-type parameters are not auto-broadcast.</b><spanclass="tt">generated_bcast.fpp</span> covers namelist <em>scalars</em> only. Each derived type (<spanclass="tt">chem_params</span>, <spanclass="tt">lag_params</span>, <spanclass="tt">rburn</span>) needs a hand-written <spanclass="tt">_emit_<name></span> in <spanclass="tt">toolchain/mfc/params/generators/fortran_gen.py</span> plus its call site in that generator's simulation branch, and, if it is read on device, an explicit <spanclass="tt">$:GPU_UPDATE(device='[name]')</span> in both the target's <spanclass="tt">m_global_parameters.fpp</span> and <spanclass="tt">src/simulation/m_start_up.fpp</span> — <spanclass="tt">GPU_DECLARE</span> alone does not make it device-resident. Regrouping existing scalars into a derived type silently drops their broadcast, leaving every non-root rank holding the <spanclass="tt">dflt_real</span> sentinel. Single-rank golden files cannot catch this, so pair such a change with a <spanclass="tt">ppn=2</span> test and confirm it fails without the emitter.</li>
373
-
<li><b>A <spanclass="tt">patch_ib</span> member that immersed-boundary ghost-point code reads must also be set in <spanclass="tt">s_add_cloud_particle</span></b> (<spanclass="tt">src/simulation/m_particle_cloud.fpp</span>). <spanclass="tt">particle_cloud_ibs</span> is allocated without default initialization, and <spanclass="tt">s_reduce_ib_patch_array</span> copies the whole struct into <spanclass="tt">patch_ib</span>, overwriting the defaults assigned in <spanclass="tt">s_assign_default_values_to_user_inputs</span>. Anything left unset reaches the solver as uninitialized memory, and only where the allocation is not already zero-filled. A platform-only NaN is the signature of this class: a garbage <spanclass="tt">v_blow</span> once failed an AMD lane with <spanclass="tt">ICFL is NaN</span> while every NVIDIA lane and all local runs passed.</li>
373
+
<li><b>A <spanclass="tt">patch_ib</span> member that immersed-boundary ghost-point code reads must also be set for particle-cloud IBs in <spanclass="tt">s_assign_particle_cloud_ib_defaults</span></b> (<spanclass="tt">src/simulation/m_start_up.fpp</span>). Pre-process writes only position, kinematics and radius to the IB state file; simulation builds every other property there, writing into a reused <spanclass="tt">patch_ib</span> slot. Anything it leaves unset keeps whatever that slot held, which may be a namelist patch's value or uninitialized memory, and shows up only where that memory is not already zero-filled. A platform-only NaN is the signature of this class: a garbage <spanclass="tt">v_blow</span> once failed an AMD lane with <spanclass="tt">ICFL is NaN</span> while every NVIDIA lane and all local runs passed.</li>
374
374
<li><b>Runtime checks go where they run.</b> Shared constraints belong in <spanclass="tt">src/common/m_checker_common.fpp</span>, simulation-only ones in <spanclass="tt">src/simulation/m_checker.fpp</span>, and pre- and post-process ones in their own <spanclass="tt">m_checker.fpp</span>. Those two <spanclass="tt">s_check_inputs</span> are currently empty; that is still the correct home for their checks, not <spanclass="tt">m_checker_common</span>.</li>
375
375
<li><b>Analytic initial conditions are compiled into the binary</b> and their expressions are AST-validated at case load, so syntax errors and unknown variables surface immediately and by name. Each IC variable maps to an <spanclass="tt">eqn_idx</span> expression in <spanclass="tt">QPVF_IDX_VARS</span> (<spanclass="tt">toolchain/mfc/case.py</span>); adding a patch-settable conserved variable means updating that map and the Fortran <spanclass="tt">eqn_idx</span> builder together, because a mismatch is a silent wrong index.</li>
376
376
<li><b>Under <spanclass="tt">--case-optimization</span> the baked-in constants are dropped from the namelist</b>, so changing one requires a rebuild rather than a case-file edit.</li>
0 commit comments