- rhie_chow_user_objectThe rhie-chow user-object
C++ Type:UserObjectName
Controllable:No
Description:The rhie-chow user-object
SIMPLE
Solves the Navier-Stokes equations using the SIMPLE algorithm and linear finite volume variables.
Overview
This executioner is based on the algorithm proposed by Patankar and Spalding (1983). The algorithm is based on the splitting of operators and successive correction for the momentum and pressure fields. The formulation implemented in MOOSE has been presented in Jasak (1996) and Juretic (2005). See also the examples and derivations in Moukalled et al. (2016). The concept relies on deriving a pressure equation using the discretized form of the momentum equations together with the continuity constraint. Let's take the steady-state incompressible Navier-Stokes equations in the following form:
(1)(2)Where denotes the velocity, the pressure, the density, and the effective dynamic viscosity which potentially includes the contributions of eddy viscosity derived from turbulence models. Term expresses a volumetric source term which can be potentially velocity-dependent. As a first step, we assume that we have a guess for the pressure field, therefore the gradient is known. Furthermore, we assume that the advecting velocity field is known from the previous iteration. By explicitly showing the iteration index, Eq. (1) and Eq. (2) become:
(3)(4)At this point, we should note that the finite volume discretization in MOOSE uses a collocated formulation which has an advantage of being flexible for unstructured meshes. However, in certain scenarios it can exhibit numerical pressure checker-boarding due to the discretization of the pressure gradient and continuity terms. A common approach for tackling this issue is the utilization of the Rhie-Chow interpolation method (See Rhie and Chow (1983) and Moukalled et al. (2016) for a detailed explanation). This means that the face velocities (or face fluxes) are determined using pressure corrections. As we will see later, due to this behavior, the iteration between pressure and velocity will in fact be an iteration between pressure and face velocity. Nevertheless, to keep this in mind we add a subscript to the advecting velocity in our formulation:
(5)(6)Next, we split the operator acting on in the momentum equation into two components: a component that incorporates effects that result in contributions to the diagonal of a soon-to-be-generated system matrix and another component that contains everything else. With this in mind, we can rewrite the equation the following, semi-discretized way:
(7)where is the diagonal contribution, and includes the off-diagonal contributions multiplied by the solution together with any additional volumetric source and sink terms (i.e. the discretized forms of ). One can solve this equation to obtain a new guess for the velocity field. This guess, however, will not respect the continuity equation, therefore we need to correct it. For this, a pressure equation is derived from the following formulation:
(8)By applying the inverse of the diagonal operator (a very cheap process computationally), we arrive to the following expression:
(9)By applying the continuity equation onto (which is a constraint) and assuming that the Rhie-Chow interpolation is used for the velocity, we arrive to a Poisson equation for pressure:
(10)This equation is solved for a pressure which can be used to correct the face velocities in a sense that they respect the continuity equation. This correction already involves a Rhie-Chow interpolation, considering that the and fields are interpolated to the faces in a discretized form:
(11)This correction applies the continuity constraint in an iterative manner, while ensuring the lack of numerical pressure checker-boarding phenomena.
The next guess for the velocity, however, does not necessarily respect the momentum equation. Therefore, the momentum prediction and pressure correction steps need to be repeated until both the momentum and continuity equations are satisfied.
The iterative process above is not stable if the full update is applied every time. This means that the variables need to be relaxed. Specifically, it is a common practice to relax the pressure when plugging it back to the gradient term in the momentum predictor:
(12)where is the relaxed field and is the corresponding relaxation parameter.
To help the solution process of the linear solver, we add options to ensure diagonal dominance through the relaxation of equations. This is done using the method mentioned in Juretic (2005), meaning that a numerical correction is added to the diagonal of the system matrix and the right hand side. This is especially useful for advection-dominated systems.
Currently, this solver only respects the following execute_on flags: INITAL, TIMESTEP_BEGIN, and FINAL, other flags are ignored. MultiApps and the corresponding MultiappTransfers are executed at FINAL only.
The pressure (Poisson-like) operator typically changes slowly between SIMPLE iterations, so building its preconditioner (often an algebraic multigrid hierarchy, whose setup can dominate the pressure solve) from scratch every iteration is wasteful. The pressure_pc_recompute_frequency parameter rebuilds the pressure preconditioner only once every N pressure solves and reuses it in between, which can substantially reduce the solve cost. The default of 1 rebuilds it on every solve. Use a larger value to amortize the setup cost; if the pressure operator changes quickly (e.g. strong transients or large property variation), prefer a smaller value to avoid a stale preconditioner that needs more Krylov iterations.
Example Input Syntax
The setup of a problem with the segregated solver in MOOSE is slightly different compared to conventional monolithic solvers. In this section, we highlight the main differences. For setting up a 2D simulation with the SIMPLE algorithm, we need three linear systems in MOOSE: one for each momentum component and another for the pressure. The different systems can be created within the Problem block:
[Problem<<<{"href": "../../syntax/Problem/index.html"}>>>]
linear_sys_names = 'u_system v_system pressure_system'
previous_nl_solution_required = true
[](modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/2d/2d-velocity-pressure.i)It is visible that we requested that MOOSE keeps previous solution iterates as well. This is necessary to facilitate the relaxation processes mentioned in the overview. Next, we create linear FV variables and assign them to the given systems.
[Variables<<<{"href": "../../syntax/Variables/index.html"}>>>]
[vel_x]
type = MooseLinearVariableFVReal<<<{"description": "Base class for Moose variables. This should never be the terminal object type", "href": "../variables/MooseLinearVariableFV.html"}>>>
initial_condition<<<{"description": "Specifies a constant initial condition for this variable"}>>> = 0.5
solver_sys<<<{"description": "If this variable is a solver variable, this is the solver system to which it should be added."}>>> = u_system
[]
[vel_y]
type = MooseLinearVariableFVReal<<<{"description": "Base class for Moose variables. This should never be the terminal object type", "href": "../variables/MooseLinearVariableFV.html"}>>>
solver_sys<<<{"description": "If this variable is a solver variable, this is the solver system to which it should be added."}>>> = v_system
initial_condition<<<{"description": "Specifies a constant initial condition for this variable"}>>> = 0.0
[]
[pressure]
type = MooseLinearVariableFVReal<<<{"description": "Base class for Moose variables. This should never be the terminal object type", "href": "../variables/MooseLinearVariableFV.html"}>>>
solver_sys<<<{"description": "If this variable is a solver variable, this is the solver system to which it should be added."}>>> = pressure_system
initial_condition<<<{"description": "Specifies a constant initial condition for this variable"}>>> = 0.2
gradient_method<<<{"description": "Default gradient computation method to register when a consumer requests gradients from this variable. This may be a built-in method name like 'green-gauss' or 'green-gauss-venkatakrishnan', or the name of an object in [FVGradientMethods]."}>>> = ${pressure_gradient_method}
[]
[](modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/2d/2d-velocity-pressure.i)The kernels are then created within the LinearFVKernels block. The fundamental terms that contribute to the face fluxes in the momentum equation (stress and advection terms) are lumped into one kernel. Furthermore, instead of adding contribution from the continuity equation, we build an anisotropic diffusion (Poisson) equation for pressure:
[LinearFVKernels<<<{"href": "../../syntax/LinearFVKernels/index.html"}>>>]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux<<<{"description": "Represents the matrix and right hand side contributions of the stress and advection terms of the momentum equation.", "href": "../linearfvkernels/LinearWCNSFVMomentumFlux.html"}>>>
variable<<<{"description": "The name of the variable whose linear system this object contributes to"}>>> = vel_x
advected_interp_method_name<<<{"description": "Name of the FVInterpolationMethod to use for the advected velocity."}>>> = ${advected_interp_method}
mu<<<{"description": "The diffusion coefficient. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number."}>>> = ${mu}
u<<<{"description": "The velocity in the x direction."}>>> = vel_x
v<<<{"description": "The velocity in the y direction."}>>> = vel_y
momentum_component<<<{"description": "The component of the momentum equation that this kernel applies to."}>>> = 'x'
rhie_chow_user_object<<<{"description": "The rhie-chow user-object which is used to determine the face velocity."}>>> = 'rc'
use_nonorthogonal_correction<<<{"description": "If the nonorthogonal correction should be used when computing the normal gradient."}>>> = false
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux<<<{"description": "Represents the matrix and right hand side contributions of the stress and advection terms of the momentum equation.", "href": "../linearfvkernels/LinearWCNSFVMomentumFlux.html"}>>>
variable<<<{"description": "The name of the variable whose linear system this object contributes to"}>>> = vel_y
advected_interp_method_name<<<{"description": "Name of the FVInterpolationMethod to use for the advected velocity."}>>> = ${advected_interp_method}
mu<<<{"description": "The diffusion coefficient. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number."}>>> = ${mu}
u<<<{"description": "The velocity in the x direction."}>>> = vel_x
v<<<{"description": "The velocity in the y direction."}>>> = vel_y
momentum_component<<<{"description": "The component of the momentum equation that this kernel applies to."}>>> = 'y'
rhie_chow_user_object<<<{"description": "The rhie-chow user-object which is used to determine the face velocity."}>>> = 'rc'
use_nonorthogonal_correction<<<{"description": "If the nonorthogonal correction should be used when computing the normal gradient."}>>> = false
[]
[u_pressure]
type = LinearFVMomentumPressure<<<{"description": "Represents the pressure gradient term in the Navier Stokes momentum equations, added to the right hand side.", "href": "../linearfvkernels/LinearFVMomentumPressure.html"}>>>
variable<<<{"description": "The name of the variable whose linear system this object contributes to"}>>> = vel_x
pressure<<<{"description": "The pressure variable whose gradient should be used."}>>> = pressure
momentum_component<<<{"description": "The component of the momentum equation that this kernel applies to."}>>> = 'x'
[]
[v_pressure]
type = LinearFVMomentumPressure<<<{"description": "Represents the pressure gradient term in the Navier Stokes momentum equations, added to the right hand side.", "href": "../linearfvkernels/LinearFVMomentumPressure.html"}>>>
variable<<<{"description": "The name of the variable whose linear system this object contributes to"}>>> = vel_y
pressure<<<{"description": "The pressure variable whose gradient should be used."}>>> = pressure
momentum_component<<<{"description": "The component of the momentum equation that this kernel applies to."}>>> = 'y'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion<<<{"description": "Adds the pressure correction diffusion term for the linear finite volume SIMPLE algorithm.", "href": "../linearfvkernels/LinearFVPressureCorrectionDiffusion.html"}>>>
variable<<<{"description": "The name of the variable whose linear system this object contributes to"}>>> = pressure
diffusion_tensor<<<{"description": "Functor describing a diagonal diffusion tensor. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number."}>>> = Ainv
use_nonorthogonal_correction<<<{"description": "If the nonorthogonal correction should be used when computing the normal gradient."}>>> = false
[]
[HbyA_divergence]
type = LinearFVDivergence<<<{"description": "Represents a divergence term. Note, this term does not contribute to the system matrix, only takes the divergence of a face flux field and adds it to the right hand side of the linear system.", "href": "../linearfvkernels/LinearFVDivergence.html"}>>>
variable<<<{"description": "The name of the variable whose linear system this object contributes to"}>>> = pressure
face_flux<<<{"description": "Functor for the face flux. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number."}>>> = HbyA
force_boundary_execution<<<{"description": "Whether to force execution of this object on all external boundaries."}>>> = true
[]
[](modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/2d/2d-velocity-pressure.i)By default, the coupling fields corresponding to and are handled by functor called HbyA and Ainv, respectively. These fields are generated by RhieChowMassFlux under the hood. This means that we need to add the user object responsible for generating these fields:
[UserObjects<<<{"href": "../../syntax/UserObjects/index.html"}>>>]
[rc]
type = RhieChowMassFlux<<<{"description": "Computes H/A and 1/A together with face mass fluxes for segregated momentum-pressure equations using linear systems.", "href": "../userobjects/RhieChowMassFlux.html"}>>>
u<<<{"description": "The x-component of velocity"}>>> = vel_x
v<<<{"description": "The y-component of velocity"}>>> = vel_y
pressure<<<{"description": "The pressure variable."}>>> = pressure
rho<<<{"description": "Density functor. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number."}>>> = ${rho}
p_diffusion_kernel<<<{"description": "The LinearFVPressureCorrectionDiffusion kernel acting on the pressure."}>>> = p_diffusion
[]
[](modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/2d/2d-velocity-pressure.i)As a last step, we add the SIMPLE executioner:
[Executioner<<<{"href": "../../syntax/Executioner/index.html"}>>>]
type = SIMPLE
momentum_l_abs_tol = 1e-10
pressure_l_abs_tol = 1e-10
momentum_l_tol = 0
pressure_l_tol = 0
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
momentum_equation_relaxation = 0.8
pressure_variable_relaxation = 0.3
num_iterations = 100
pressure_absolute_tolerance = 1e-10
momentum_absolute_tolerance = 1e-10
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
print_fields = false
[](modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/2d/2d-velocity-pressure.i)Passive scalar advection
The SIMPLE executioner can be used to solve coupled problems involving both flow and passive scalar advection. Advected passive scalars do not affect the flow distribution, and therefore can be solved after the velocity and pressure fields have been computed using the SIMPLE algorithm. Several systems may be used, for each passive scalar.
Conjugate heat transfer
For the conjuagate heat transfer capabilities visit the corresponding design page
Restarting and keeping certain solution fields unchanged
When recovering from a checkpoint, it can be useful to hold the thermal-hydraulics fields fixed and only advance other systems. The PIMPLE executioner exposes flags that selectively disable parts of the segregated solve:
For example, to load a converged flow/temperature field from a steady-state run and only march passive scalars, enable restart and recovery, keep the scalar solves enabled, and disable the momentum, pressure, and energy solves:
[Problem]
restart_file_base=converged_run_cp/LATEST
[]
[Executioner]
type = SIMPLE
...
should_solve_momentum = false
should_solve_pressure = false
should_solve_energy = false
[]
Input Parameters
- continue_on_max_itsFalseIf solve should continue if maximum number of iterations is hit.
Default:False
C++ Type:bool
Controllable:No
Description:If solve should continue if maximum number of iterations is hit.
- energy_field_relaxation1The relaxation which should be used for the energy field. (=1 for no relaxation, diagonal dominance will still be enforced)
Default:1
C++ Type:Real
Unit:(no unit assumed)
Range:0.0
Controllable:No
Description:The relaxation which should be used for the energy field. (=1 for no relaxation, diagonal dominance will still be enforced)
- energy_systemThe solver system for the energy equation.
C++ Type:SolverSystemName
Controllable:No
Description:The solver system for the energy equation.
- num_iterations1000The number of momentum-pressure-(other fields) iterations needed.
Default:1000
C++ Type:unsigned int
Range:0
Controllable:No
Description:The number of momentum-pressure-(other fields) iterations needed.
- print_fieldsFalseUse this to print the coupling and solution fields and matrices throughout the iteration.
Default:False
C++ Type:bool
Controllable:No
Description:Use this to print the coupling and solution fields and matrices throughout the iteration.
- should_solve_pm_radiationTrueWhether we should solve participating media radiation equations.
Default:True
C++ Type:bool
Controllable:No
Description:Whether we should solve participating media radiation equations.
- solid_energy_systemThe solver system for the solid energy equation.
C++ Type:SolverSystemName
Controllable:No
Description:The solver system for the solid energy equation.
- time0System time
Default:0
C++ Type:Real
Unit:(no unit assumed)
Controllable:No
Description:System time
- verboseFalseSet to true to print additional information
Default:False
C++ Type:bool
Controllable:No
Description:Set to true to print additional information
Optional Parameters
- accept_on_max_fixed_point_iterationFalseTrue to treat reaching the maximum number of fixed point iterations as converged.
Default:False
C++ Type:bool
Controllable:No
Description:True to treat reaching the maximum number of fixed point iterations as converged.
- custom_abs_tol1e-50The absolute nonlinear residual to shoot for during fixed point iterations. This check is performed based on postprocessor defined by the custom_pp residual.
Default:1e-50
C++ Type:Real
Unit:(no unit assumed)
Range:custom_abs_tol>0
Controllable:No
Description:The absolute nonlinear residual to shoot for during fixed point iterations. This check is performed based on postprocessor defined by the custom_pp residual.
- custom_ppPostprocessor for custom fixed point convergence check.
C++ Type:PostprocessorName
Unit:(no unit assumed)
Controllable:No
Description:Postprocessor for custom fixed point convergence check.
- custom_rel_tol1e-08The relative nonlinear residual drop to shoot for during fixed point iterations. This check is performed based on the postprocessor defined by custom_pp residual.
Default:1e-08
C++ Type:Real
Unit:(no unit assumed)
Range:custom_rel_tol>0
Controllable:No
Description:The relative nonlinear residual drop to shoot for during fixed point iterations. This check is performed based on the postprocessor defined by custom_pp residual.
- direct_pp_valueFalseTrue to use direct postprocessor value (scaled by value on first iteration). False (default) to use difference in postprocessor value between fixed point iterations.
Default:False
C++ Type:bool
Controllable:No
Description:True to use direct postprocessor value (scaled by value on first iteration). False (default) to use difference in postprocessor value between fixed point iterations.
- disable_fixed_point_residual_norm_checkFalseDisable the residual norm evaluation thus the three parameters fixed_point_rel_tol, fixed_point_abs_tol and fixed_point_force_norms.
Default:False
C++ Type:bool
Controllable:No
Description:Disable the residual norm evaluation thus the three parameters fixed_point_rel_tol, fixed_point_abs_tol and fixed_point_force_norms.
- fixed_point_abs_tol1e-50The absolute nonlinear residual to shoot for during fixed point iterations. This check is performed based on the main app's nonlinear residual.
Default:1e-50
C++ Type:Real
Unit:(no unit assumed)
Range:fixed_point_abs_tol>0
Controllable:No
Description:The absolute nonlinear residual to shoot for during fixed point iterations. This check is performed based on the main app's nonlinear residual.
- fixed_point_algorithmpicardThe fixed point algorithm to converge the sequence of problems.
Default:picard
C++ Type:MooseEnum
Options:picard, secant, steffensen
Controllable:No
Description:The fixed point algorithm to converge the sequence of problems.
- fixed_point_force_normsFalseForce the evaluation of both the TIMESTEP_BEGIN and TIMESTEP_END norms regardless of the existence of active MultiApps with those execute_on flags, default: false.
Default:False
C++ Type:bool
Controllable:No
Description:Force the evaluation of both the TIMESTEP_BEGIN and TIMESTEP_END norms regardless of the existence of active MultiApps with those execute_on flags, default: false.
- fixed_point_max_its1Specifies the maximum number of fixed point iterations.
Default:1
C++ Type:unsigned int
Controllable:No
Description:Specifies the maximum number of fixed point iterations.
- fixed_point_min_its1Specifies the minimum number of fixed point iterations.
Default:1
C++ Type:unsigned int
Controllable:No
Description:Specifies the minimum number of fixed point iterations.
- fixed_point_rel_tol1e-08The relative nonlinear residual drop to shoot for during fixed point iterations. This check is performed based on the main app's nonlinear residual.
Default:1e-08
C++ Type:Real
Unit:(no unit assumed)
Range:fixed_point_rel_tol>0
Controllable:No
Description:The relative nonlinear residual drop to shoot for during fixed point iterations. This check is performed based on the main app's nonlinear residual.
Multiapp Fixed Point Iterations Parameters
- active_scalar_absolute_toleranceThe absolute tolerance(s) on the normalized residual(s) of the active scalar equation(s).
C++ Type:std::vector<Real>
Unit:(no unit assumed)
Controllable:No
Description:The absolute tolerance(s) on the normalized residual(s) of the active scalar equation(s).
- active_scalar_equation_relaxationThe relaxation which should be used for the active scalar equations. (=1 for no relaxation, diagonal dominance will still be enforced)
C++ Type:std::vector<Real>
Unit:(no unit assumed)
Controllable:No
Description:The relaxation which should be used for the active scalar equations. (=1 for no relaxation, diagonal dominance will still be enforced)
- active_scalar_l_abs_tol1e-10The absolute tolerance on the normalized residual in the linear solver of the active scalar equation(s).
Default:1e-10
C++ Type:Real
Unit:(no unit assumed)
Range:0.0
Controllable:No
Description:The absolute tolerance on the normalized residual in the linear solver of the active scalar equation(s).
- active_scalar_l_max_its10000The maximum allowed iterations in the linear solver of the turbulence equation.
Default:10000
C++ Type:unsigned int
Controllable:No
Description:The maximum allowed iterations in the linear solver of the turbulence equation.
- active_scalar_l_tol1e-05The relative tolerance on the normalized residual in the linear solver of the active scalar equation(s).
Default:1e-05
C++ Type:Real
Unit:(no unit assumed)
Range:0.0<=active_scalar_l_tol & active_scalar_l_tol<1.0
Controllable:No
Description:The relative tolerance on the normalized residual in the linear solver of the active scalar equation(s).
- active_scalar_petsc_optionsSingleton PETSc options for the active scalar equation(s)
C++ Type:MultiMooseEnum
Options:-dm_moose_print_embedding, -dm_view, -KSP_CONVERGED_REASON, -KSP_GMRES_MODIFIEDGRAMSCHMIDT, -KSP_MONITOR, -KSP_MONITOR_SNES_LG, -SNES_KSP_EW, -SNES_CONVERGED_REASON, -SNES_KSP, -SNES_LINESEARCH_MONITOR, -SNES_MF, -SNES_MF_OPERATOR, -SNES_MONITOR, -SNES_TEST_DISPLAY, -SNES_VIEW, -SNES_MONITOR_CANCEL
Controllable:No
Description:Singleton PETSc options for the active scalar equation(s)
- active_scalar_petsc_options_inameNames of PETSc name/value pairs for the active scalar equation(s)
C++ Type:MultiMooseEnum
Options:-mat_fd_coloring_err, -mat_fd_type, -mat_mffd_type, -pc_asm_overlap, -pc_factor_levels, -pc_factor_mat_ordering_type, -pc_hypre_boomeramg_grid_sweeps_all, -pc_hypre_boomeramg_max_iter, -pc_hypre_boomeramg_strong_threshold, -pc_hypre_type, -pc_type, -sub_pc_type, -KSP_ATOL, -KSP_GMRES_RESTART, -KSP_MAX_IT, -KSP_PC_SIDE, -KSP_RTOL, -KSP_TYPE, -SUB_KSP_TYPE, -SNES_ATOL, -SNES_LINESEARCH_TYPE, -SNES_LS, -SNES_MAX_IT, -SNES_RTOL, -SNES_DIVERGENCE_TOLERANCE, -SNES_TYPE
Controllable:No
Description:Names of PETSc name/value pairs for the active scalar equation(s)
- active_scalar_petsc_options_valueValues of PETSc name/value pairs (must correspond with "petsc_options_iname" for the active scalar equation(s)
C++ Type:std::vector<std::string>
Controllable:No
Description:Values of PETSc name/value pairs (must correspond with "petsc_options_iname" for the active scalar equation(s)
- active_scalar_systemsThe solver system for each active scalar advection equation.
C++ Type:std::vector<SolverSystemName>
Controllable:No
Description:The solver system for each active scalar advection equation.
Active Scalars Equations Parameters
- active_scalar_pc_recompute_frequency1How often (in advection solves) to recompute the preconditioner. The default of 1 rebuilds it on every solve. A value of N rebuilds it once every N solves and reuses it in between, which can substantially reduce the solve cost when the preconditioner setup dominates (e.g. algebraic multigrid). Larger values trade more reuse for a possibly staler preconditioner (more Krylov iterations); for solves where the operator changes significantly between linear solves, prefer a smaller value.
Default:1
C++ Type:unsigned int
Range:active_scalar_pc_recompute_frequency >= 1
Controllable:No
Description:How often (in advection solves) to recompute the preconditioner. The default of 1 rebuilds it on every solve. A value of N rebuilds it once every N solves and reuses it in between, which can substantially reduce the solve cost when the preconditioner setup dominates (e.g. algebraic multigrid). Larger values trade more reuse for a possibly staler preconditioner (more Krylov iterations); for solves where the operator changes significantly between linear solves, prefer a smaller value.
Active Scalars Equation Parameters
- auto_advanceFalseWhether to automatically advance sub-applications regardless of whether their solve converges, for transient executioners only.
Default:False
C++ Type:bool
Controllable:No
Description:Whether to automatically advance sub-applications regardless of whether their solve converges, for transient executioners only.
- multiapp_fixed_point_convergenceName of the Convergence object to use to assess convergence of the MultiApp fixed point solve. If not provided, a default Convergence will be constructed internally from the executioner parameters.
C++ Type:ConvergenceName
Controllable:No
Description:Name of the Convergence object to use to assess convergence of the MultiApp fixed point solve. If not provided, a default Convergence will be constructed internally from the executioner parameters.
- relaxation_factor1Fraction of newly computed value to keep.Set between 0 and 2.
Default:1
C++ Type:Real
Unit:(no unit assumed)
Range:relaxation_factor>0 & relaxation_factor<2
Controllable:No
Description:Fraction of newly computed value to keep.Set between 0 and 2.
- transformed_postprocessorsList of main app postprocessors to transform during fixed point iterations
C++ Type:std::vector<PostprocessorName>
Unit:(no unit assumed)
Controllable:No
Description:List of main app postprocessors to transform during fixed point iterations
- transformed_variablesList of main app variables to transform during fixed point iterations
C++ Type:std::vector<std::string>
Controllable:No
Description:List of main app variables to transform during fixed point iterations
Fixed Point Iterations Parameters
- cht_fluid_flux_relaxationThe relaxation factors for the boundary flux when being updated on the fluid side.
C++ Type:std::vector<Real>
Unit:(no unit assumed)
Controllable:No
Description:The relaxation factors for the boundary flux when being updated on the fluid side.
- cht_fluid_temperature_relaxationThe relaxation factors for the boundary temperature when being updated on the fluid side.
C++ Type:std::vector<Real>
Unit:(no unit assumed)
Controllable:No
Description:The relaxation factors for the boundary temperature when being updated on the fluid side.
- cht_heat_flux_tolerance1e-05The relative tolerance for terminating conjugate heat transfer iteration before the maximum number of CHT iterations. Relative tolerance is ignore if the maximum number of CHT iterations is reached.
Default:1e-05
C++ Type:Real
Unit:(no unit assumed)
Range:cht_heat_flux_tolerance > 0 & cht_heat_flux_tolerance <= 1.0
Controllable:No
Description:The relative tolerance for terminating conjugate heat transfer iteration before the maximum number of CHT iterations. Relative tolerance is ignore if the maximum number of CHT iterations is reached.
- cht_interfacesThe interfaces where we would like to add conjugate heat transfer handling.
C++ Type:std::vector<BoundaryName>
Controllable:No
Description:The interfaces where we would like to add conjugate heat transfer handling.
- cht_solid_flux_relaxationThe relaxation factors for the boundary flux when being updated on the solid side.
C++ Type:std::vector<Real>
Unit:(no unit assumed)
Controllable:No
Description:The relaxation factors for the boundary flux when being updated on the solid side.
- cht_solid_temperature_relaxationThe relaxation factors for the boundary temperature when being updated on the solid side.
C++ Type:std::vector<Real>
Unit:(no unit assumed)
Controllable:No
Description:The relaxation factors for the boundary temperature when being updated on the solid side.
- max_cht_fpi1Number of maximum fixed point iterations (FPI). Currently only applied to conjugate heat transfer simulations. The default value of 1 essentially keeps the FPI feature turned off. CHT iteration ends after this number of iteration even if the tolerance is not met.
Default:1
C++ Type:unsigned int
Range:max_cht_fpi >= 1
Controllable:No
Description:Number of maximum fixed point iterations (FPI). Currently only applied to conjugate heat transfer simulations. The default value of 1 essentially keeps the FPI feature turned off. CHT iteration ends after this number of iteration even if the tolerance is not met.
- surface_radiation_object_nameName of the Gray-Lambert surface-radiation user object. On matching CHT interfaces, its net outward heat flux density is removed from the heat flux transferred to the receiving domain.
C++ Type:UserObjectName
Controllable:No
Description:Name of the Gray-Lambert surface-radiation user object. On matching CHT interfaces, its net outward heat flux density is removed from the heat flux transferred to the receiving domain.
- thermal_resistance0 The custom area-normalized thermal resistance at each interface, in m^2*K/W. Provide one value to use for all CHT interfaces or one value per entry in cht_interfaces. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.
Default:0
C++ Type:std::vector<MooseFunctorName>
Unit:(no unit assumed)
Controllable:No
Description:The custom area-normalized thermal resistance at each interface, in m^2*K/W. Provide one value to use for all CHT interfaces or one value per entry in cht_interfaces. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.
Conjugate Heat Transfer Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- outputsVector of output names where you would like to restrict the output of variables(s) associated with this object
C++ Type:std::vector<OutputName>
Controllable:No
Description:Vector of output names where you would like to restrict the output of variables(s) associated with this object
Advanced Parameters
- energy_absolute_tolerance1e-05The absolute tolerance on the normalized residual of the energy equation.
Default:1e-05
C++ Type:Real
Unit:(no unit assumed)
Range:0.0
Controllable:No
Description:The absolute tolerance on the normalized residual of the energy equation.
- energy_equation_relaxation1The relaxation which should be used for the energy equation. (=1 for no relaxation, diagonal dominance will still be enforced)
Default:1
C++ Type:Real
Unit:(no unit assumed)
Range:0.0
Controllable:No
Description:The relaxation which should be used for the energy equation. (=1 for no relaxation, diagonal dominance will still be enforced)
- energy_l_abs_tol1e-10The absolute tolerance on the normalized residual in the linear solver of the energy equation.
Default:1e-10
C++ Type:Real
Unit:(no unit assumed)
Range:0.0
Controllable:No
Description:The absolute tolerance on the normalized residual in the linear solver of the energy equation.
- energy_l_max_its10000The maximum allowed iterations in the linear solver of the energy equation.
Default:10000
C++ Type:unsigned int
Range:0
Controllable:No
Description:The maximum allowed iterations in the linear solver of the energy equation.
- energy_l_tol1e-05The relative tolerance on the normalized residual in the linear solver of the energy equation.
Default:1e-05
C++ Type:Real
Unit:(no unit assumed)
Range:0.0<=energy_l_tol & energy_l_tol<1.0
Controllable:No
Description:The relative tolerance on the normalized residual in the linear solver of the energy equation.
- energy_pc_recompute_frequency1How often (in terms of CHT and SIMPLE iterations) to recompute the preconditioner. The default of 1 rebuilds it on every solve. A value of N rebuilds it once every N solves and reuses it in between, which can substantially reduce the solve cost when the preconditioner setup dominates (e.g. algebraic multigrid). Larger values trade more reuse for a possibly staler preconditioner (more Krylov iterations); for solves where the operator changes significantly between linear solves, prefer a smaller value.
Default:1
C++ Type:unsigned int
Range:energy_pc_recompute_frequency >= 1
Controllable:No
Description:How often (in terms of CHT and SIMPLE iterations) to recompute the preconditioner. The default of 1 rebuilds it on every solve. A value of N rebuilds it once every N solves and reuses it in between, which can substantially reduce the solve cost when the preconditioner setup dominates (e.g. algebraic multigrid). Larger values trade more reuse for a possibly staler preconditioner (more Krylov iterations); for solves where the operator changes significantly between linear solves, prefer a smaller value.
- energy_petsc_optionsSingleton PETSc options for the energy equation
C++ Type:MultiMooseEnum
Options:-dm_moose_print_embedding, -dm_view, -KSP_CONVERGED_REASON, -KSP_GMRES_MODIFIEDGRAMSCHMIDT, -KSP_MONITOR, -KSP_MONITOR_SNES_LG, -SNES_KSP_EW, -SNES_CONVERGED_REASON, -SNES_KSP, -SNES_LINESEARCH_MONITOR, -SNES_MF, -SNES_MF_OPERATOR, -SNES_MONITOR, -SNES_TEST_DISPLAY, -SNES_VIEW, -SNES_MONITOR_CANCEL
Controllable:No
Description:Singleton PETSc options for the energy equation
- energy_petsc_options_inameNames of PETSc name/value pairs for the energy equation
C++ Type:MultiMooseEnum
Options:-mat_fd_coloring_err, -mat_fd_type, -mat_mffd_type, -pc_asm_overlap, -pc_factor_levels, -pc_factor_mat_ordering_type, -pc_hypre_boomeramg_grid_sweeps_all, -pc_hypre_boomeramg_max_iter, -pc_hypre_boomeramg_strong_threshold, -pc_hypre_type, -pc_type, -sub_pc_type, -KSP_ATOL, -KSP_GMRES_RESTART, -KSP_MAX_IT, -KSP_PC_SIDE, -KSP_RTOL, -KSP_TYPE, -SUB_KSP_TYPE, -SNES_ATOL, -SNES_LINESEARCH_TYPE, -SNES_LS, -SNES_MAX_IT, -SNES_RTOL, -SNES_DIVERGENCE_TOLERANCE, -SNES_TYPE
Controllable:No
Description:Names of PETSc name/value pairs for the energy equation
- energy_petsc_options_valueValues of PETSc name/value pairs (must correspond with "petsc_options_iname" for the energy equation
C++ Type:std::vector<std::string>
Controllable:No
Description:Values of PETSc name/value pairs (must correspond with "petsc_options_iname" for the energy equation
Energy Equation Parameters
- max_xfem_update4294967295Maximum number of times to update XFEM crack topology in a step due to evolving cracks
Default:4294967295
C++ Type:unsigned int
Controllable:No
Description:Maximum number of times to update XFEM crack topology in a step due to evolving cracks
- update_xfem_at_timestep_beginFalseShould XFEM update the mesh at the beginning of the timestep
Default:False
C++ Type:bool
Controllable:No
Description:Should XFEM update the mesh at the beginning of the timestep
Xfem Fixed Point Iterations Parameters
- momentum_absolute_tolerance1e-05 The absolute tolerance(s) on the normalized residual(s) of the momentum equation(s). If a single value is provided it is applied to all momentum components.
Default:1e-05
C++ Type:std::vector<Real>
Unit:(no unit assumed)
Range:0.0
Controllable:No
Description:The absolute tolerance(s) on the normalized residual(s) of the momentum equation(s). If a single value is provided it is applied to all momentum components.
- momentum_equation_relaxation1The relaxation which should be used for the momentum equation. (=1 for no relaxation, diagonal dominance will still be enforced)
Default:1
C++ Type:Real
Unit:(no unit assumed)
Range:0.0
Controllable:No
Description:The relaxation which should be used for the momentum equation. (=1 for no relaxation, diagonal dominance will still be enforced)
- momentum_l_abs_tol1e-50The absolute tolerance on the normalized residual in the linear solver of the momentum equation.
Default:1e-50
C++ Type:Real
Unit:(no unit assumed)
Range:0.0
Controllable:No
Description:The absolute tolerance on the normalized residual in the linear solver of the momentum equation.
- momentum_l_max_its10000The maximum allowed iterations in the linear solver of the momentum equation.
Default:10000
C++ Type:unsigned int
Controllable:No
Description:The maximum allowed iterations in the linear solver of the momentum equation.
- momentum_l_tol1e-05The relative tolerance on the normalized residual in the linear solver of the momentum equation.
Default:1e-05
C++ Type:Real
Unit:(no unit assumed)
Range:0.0<=momentum_l_tol & momentum_l_tol<1.0
Controllable:No
Description:The relative tolerance on the normalized residual in the linear solver of the momentum equation.
- momentum_petsc_optionsSingleton PETSc options for the momentum equation
C++ Type:MultiMooseEnum
Options:-dm_moose_print_embedding, -dm_view, -KSP_CONVERGED_REASON, -KSP_GMRES_MODIFIEDGRAMSCHMIDT, -KSP_MONITOR, -KSP_MONITOR_SNES_LG, -SNES_KSP_EW, -SNES_CONVERGED_REASON, -SNES_KSP, -SNES_LINESEARCH_MONITOR, -SNES_MF, -SNES_MF_OPERATOR, -SNES_MONITOR, -SNES_TEST_DISPLAY, -SNES_VIEW, -SNES_MONITOR_CANCEL
Controllable:No
Description:Singleton PETSc options for the momentum equation
- momentum_petsc_options_inameNames of PETSc name/value pairs for the momentum equation
C++ Type:MultiMooseEnum
Options:-mat_fd_coloring_err, -mat_fd_type, -mat_mffd_type, -pc_asm_overlap, -pc_factor_levels, -pc_factor_mat_ordering_type, -pc_hypre_boomeramg_grid_sweeps_all, -pc_hypre_boomeramg_max_iter, -pc_hypre_boomeramg_strong_threshold, -pc_hypre_type, -pc_type, -sub_pc_type, -KSP_ATOL, -KSP_GMRES_RESTART, -KSP_MAX_IT, -KSP_PC_SIDE, -KSP_RTOL, -KSP_TYPE, -SUB_KSP_TYPE, -SNES_ATOL, -SNES_LINESEARCH_TYPE, -SNES_LS, -SNES_MAX_IT, -SNES_RTOL, -SNES_DIVERGENCE_TOLERANCE, -SNES_TYPE
Controllable:No
Description:Names of PETSc name/value pairs for the momentum equation
- momentum_petsc_options_valueValues of PETSc name/value pairs (must correspond with "petsc_options_iname" for the momentum equation
C++ Type:std::vector<std::string>
Controllable:No
Description:Values of PETSc name/value pairs (must correspond with "petsc_options_iname" for the momentum equation
- momentum_systemsThe solver system(s) for the momentum equation(s).
C++ Type:std::vector<SolverSystemName>
Controllable:No
Description:The solver system(s) for the momentum equation(s).
Momentum Equation Parameters
- momentum_pc_recompute_frequency1How often (in SIMPLE iteration solves) to recompute the momentum preconditioner. The default of 1 rebuilds it on every solve. A value of N rebuilds it once every N solves and reuses it in between, which can substantially reduce the solve cost when the preconditioner setup dominates (e.g. algebraic multigrid). Larger values trade more reuse for a possibly staler preconditioner (more Krylov iterations); for solves where the operator changes significantly between linear solves, prefer a smaller value.
Default:1
C++ Type:unsigned int
Range:momentum_pc_recompute_frequency >= 1
Controllable:No
Description:How often (in SIMPLE iteration solves) to recompute the momentum preconditioner. The default of 1 rebuilds it on every solve. A value of N rebuilds it once every N solves and reuses it in between, which can substantially reduce the solve cost when the preconditioner setup dominates (e.g. algebraic multigrid). Larger values trade more reuse for a possibly staler preconditioner (more Krylov iterations); for solves where the operator changes significantly between linear solves, prefer a smaller value.
Momentum Equations Parameters
- passive_scalar_absolute_toleranceThe absolute tolerance(s) on the normalized residual(s) of the passive scalar equation(s).
C++ Type:std::vector<Real>
Unit:(no unit assumed)
Controllable:No
Description:The absolute tolerance(s) on the normalized residual(s) of the passive scalar equation(s).
- passive_scalar_equation_relaxationThe relaxation which should be used for the passive scalar equations. (=1 for no relaxation, diagonal dominance will still be enforced)
C++ Type:std::vector<Real>
Unit:(no unit assumed)
Controllable:No
Description:The relaxation which should be used for the passive scalar equations. (=1 for no relaxation, diagonal dominance will still be enforced)
- passive_scalar_l_abs_tol1e-10The absolute tolerance on the normalized residual in the linear solver of the passive scalar equation(s).
Default:1e-10
C++ Type:Real
Unit:(no unit assumed)
Range:0.0
Controllable:No
Description:The absolute tolerance on the normalized residual in the linear solver of the passive scalar equation(s).
- passive_scalar_l_max_its10000The maximum allowed iterations in the linear solver of the turbulence equation.
Default:10000
C++ Type:unsigned int
Controllable:No
Description:The maximum allowed iterations in the linear solver of the turbulence equation.
- passive_scalar_l_tol1e-05The relative tolerance on the normalized residual in the linear solver of the passive scalar equation(s).
Default:1e-05
C++ Type:Real
Unit:(no unit assumed)
Range:0.0<=passive_scalar_l_tol & passive_scalar_l_tol<1.0
Controllable:No
Description:The relative tolerance on the normalized residual in the linear solver of the passive scalar equation(s).
- passive_scalar_pc_recompute_frequency1How often (in advection solves) to recompute the preconditioner. The default of 1 rebuilds it on every solve. A value of N rebuilds it once every N solves and reuses it in between, which can substantially reduce the solve cost when the preconditioner setup dominates (e.g. algebraic multigrid). Larger values trade more reuse for a possibly staler preconditioner (more Krylov iterations); for solves where the operator changes significantly between linear solves, prefer a smaller value.
Default:1
C++ Type:unsigned int
Range:passive_scalar_pc_recompute_frequency >= 1
Controllable:No
Description:How often (in advection solves) to recompute the preconditioner. The default of 1 rebuilds it on every solve. A value of N rebuilds it once every N solves and reuses it in between, which can substantially reduce the solve cost when the preconditioner setup dominates (e.g. algebraic multigrid). Larger values trade more reuse for a possibly staler preconditioner (more Krylov iterations); for solves where the operator changes significantly between linear solves, prefer a smaller value.
- passive_scalar_petsc_optionsSingleton PETSc options for the passive scalar equation(s)
C++ Type:MultiMooseEnum
Options:-dm_moose_print_embedding, -dm_view, -KSP_CONVERGED_REASON, -KSP_GMRES_MODIFIEDGRAMSCHMIDT, -KSP_MONITOR, -KSP_MONITOR_SNES_LG, -SNES_KSP_EW, -SNES_CONVERGED_REASON, -SNES_KSP, -SNES_LINESEARCH_MONITOR, -SNES_MF, -SNES_MF_OPERATOR, -SNES_MONITOR, -SNES_TEST_DISPLAY, -SNES_VIEW, -SNES_MONITOR_CANCEL
Controllable:No
Description:Singleton PETSc options for the passive scalar equation(s)
- passive_scalar_petsc_options_inameNames of PETSc name/value pairs for the passive scalar equation(s)
C++ Type:MultiMooseEnum
Options:-mat_fd_coloring_err, -mat_fd_type, -mat_mffd_type, -pc_asm_overlap, -pc_factor_levels, -pc_factor_mat_ordering_type, -pc_hypre_boomeramg_grid_sweeps_all, -pc_hypre_boomeramg_max_iter, -pc_hypre_boomeramg_strong_threshold, -pc_hypre_type, -pc_type, -sub_pc_type, -KSP_ATOL, -KSP_GMRES_RESTART, -KSP_MAX_IT, -KSP_PC_SIDE, -KSP_RTOL, -KSP_TYPE, -SUB_KSP_TYPE, -SNES_ATOL, -SNES_LINESEARCH_TYPE, -SNES_LS, -SNES_MAX_IT, -SNES_RTOL, -SNES_DIVERGENCE_TOLERANCE, -SNES_TYPE
Controllable:No
Description:Names of PETSc name/value pairs for the passive scalar equation(s)
- passive_scalar_petsc_options_valueValues of PETSc name/value pairs (must correspond with "petsc_options_iname" for the passive scalar equation(s)
C++ Type:std::vector<std::string>
Controllable:No
Description:Values of PETSc name/value pairs (must correspond with "petsc_options_iname" for the passive scalar equation(s)
- passive_scalar_systemsThe solver system for each scalar advection equation.
C++ Type:std::vector<SolverSystemName>
Controllable:No
Description:The solver system for each scalar advection equation.
Passive Scalars Advection Equation Parameters
- pin_pressureFalseIf the pressure field needs to be pinned at a point.
Default:False
C++ Type:bool
Controllable:No
Description:If the pressure field needs to be pinned at a point.
- pressure_pin_pointThe point where the pressure needs to be pinned.
C++ Type:libMesh::Point
Controllable:No
Description:The point where the pressure needs to be pinned.
- pressure_pin_value0The value which needs to be enforced for the pressure.
Default:0
C++ Type:Real
Unit:(no unit assumed)
Controllable:No
Description:The value which needs to be enforced for the pressure.
Pressure Pin Parameters
- pm_radiation_absolute_toleranceThe absolute tolerance(s) on the normalized residual(s) of the participating media radiation equation(s).
C++ Type:std::vector<Real>
Unit:(no unit assumed)
Controllable:No
Description:The absolute tolerance(s) on the normalized residual(s) of the participating media radiation equation(s).
- pm_radiation_equation_relaxationThe relaxation which should be used for the participating media radiation equations. (=1 for no relaxation, diagonal dominance will still be enforced)
C++ Type:std::vector<Real>
Unit:(no unit assumed)
Controllable:No
Description:The relaxation which should be used for the participating media radiation equations. (=1 for no relaxation, diagonal dominance will still be enforced)
- pm_radiation_l_abs_tol1e-10The absolute tolerance on the normalized residual in the linear solver of the participating media radiation equation(s).
Default:1e-10
C++ Type:Real
Unit:(no unit assumed)
Range:0.0
Controllable:No
Description:The absolute tolerance on the normalized residual in the linear solver of the participating media radiation equation(s).
- pm_radiation_l_max_its10000The maximum allowed iterations in the linear solver of the participating media radiation equation.
Default:10000
C++ Type:unsigned int
Controllable:No
Description:The maximum allowed iterations in the linear solver of the participating media radiation equation.
- pm_radiation_l_tol1e-05The relative tolerance on the normalized residual in the linear solver of the participating media radiation equation(s).
Default:1e-05
C++ Type:Real
Unit:(no unit assumed)
Range:0.0<=pm_radiation_l_tol & pm_radiation_l_tol<1.0
Controllable:No
Description:The relative tolerance on the normalized residual in the linear solver of the participating media radiation equation(s).
- pm_radiation_petsc_optionsSingleton PETSc options for the participating media radiation equation(s)
C++ Type:MultiMooseEnum
Options:-dm_moose_print_embedding, -dm_view, -KSP_CONVERGED_REASON, -KSP_GMRES_MODIFIEDGRAMSCHMIDT, -KSP_MONITOR, -KSP_MONITOR_SNES_LG, -SNES_KSP_EW, -SNES_CONVERGED_REASON, -SNES_KSP, -SNES_LINESEARCH_MONITOR, -SNES_MF, -SNES_MF_OPERATOR, -SNES_MONITOR, -SNES_TEST_DISPLAY, -SNES_VIEW, -SNES_MONITOR_CANCEL
Controllable:No
Description:Singleton PETSc options for the participating media radiation equation(s)
- pm_radiation_petsc_options_inameNames of PETSc name/value pairs for the participating media radiation equation(s)
C++ Type:MultiMooseEnum
Options:-mat_fd_coloring_err, -mat_fd_type, -mat_mffd_type, -pc_asm_overlap, -pc_factor_levels, -pc_factor_mat_ordering_type, -pc_hypre_boomeramg_grid_sweeps_all, -pc_hypre_boomeramg_max_iter, -pc_hypre_boomeramg_strong_threshold, -pc_hypre_type, -pc_type, -sub_pc_type, -KSP_ATOL, -KSP_GMRES_RESTART, -KSP_MAX_IT, -KSP_PC_SIDE, -KSP_RTOL, -KSP_TYPE, -SUB_KSP_TYPE, -SNES_ATOL, -SNES_LINESEARCH_TYPE, -SNES_LS, -SNES_MAX_IT, -SNES_RTOL, -SNES_DIVERGENCE_TOLERANCE, -SNES_TYPE
Controllable:No
Description:Names of PETSc name/value pairs for the participating media radiation equation(s)
- pm_radiation_petsc_options_valueValues of PETSc name/value pairs (must correspond with "petsc_options_iname" for the participating media radiation equation(s)
C++ Type:std::vector<std::string>
Controllable:No
Description:Values of PETSc name/value pairs (must correspond with "petsc_options_iname" for the participating media radiation equation(s)
- pm_radiation_systemsThe solver system for each participating media radiation equation.
C++ Type:std::vector<SolverSystemName>
Controllable:No
Description:The solver system for each participating media radiation equation.
Participating Medium Radiation Equation Parameters
- pressure_absolute_tolerance1e-05The absolute tolerance on the normalized residual of the pressure equation.
Default:1e-05
C++ Type:Real
Unit:(no unit assumed)
Range:0.0
Controllable:No
Description:The absolute tolerance on the normalized residual of the pressure equation.
- pressure_l_abs_tol1e-10The absolute tolerance on the normalized residual in the linear solver of the pressure equation.
Default:1e-10
C++ Type:Real
Unit:(no unit assumed)
Range:0.0
Controllable:No
Description:The absolute tolerance on the normalized residual in the linear solver of the pressure equation.
- pressure_l_max_its10000The maximum allowed iterations in the linear solver of the pressure equation.
Default:10000
C++ Type:unsigned int
Controllable:No
Description:The maximum allowed iterations in the linear solver of the pressure equation.
- pressure_l_tol1e-05The relative tolerance on the normalized residual in the linear solver of the pressure equation.
Default:1e-05
C++ Type:Real
Unit:(no unit assumed)
Range:0.0<=pressure_l_tol & pressure_l_tol<1.0
Controllable:No
Description:The relative tolerance on the normalized residual in the linear solver of the pressure equation.
- pressure_pc_recompute_frequency1How often (in pressure corrector solves) to recompute the pressure preconditioner. The default of 1 rebuilds it on every solve. A value of N rebuilds it once every N solves and reuses it in between, which can substantially reduce the solve cost when the preconditioner setup dominates (e.g. algebraic multigrid). Larger values trade more reuse for a possibly staler preconditioner (more Krylov iterations); for solves where the operator changes significantly between linear solves, prefer a smaller value.
Default:1
C++ Type:unsigned int
Range:pressure_pc_recompute_frequency >= 1
Controllable:No
Description:How often (in pressure corrector solves) to recompute the pressure preconditioner. The default of 1 rebuilds it on every solve. A value of N rebuilds it once every N solves and reuses it in between, which can substantially reduce the solve cost when the preconditioner setup dominates (e.g. algebraic multigrid). Larger values trade more reuse for a possibly staler preconditioner (more Krylov iterations); for solves where the operator changes significantly between linear solves, prefer a smaller value.
- pressure_petsc_optionsSingleton PETSc options for the pressure equation
C++ Type:MultiMooseEnum
Options:-dm_moose_print_embedding, -dm_view, -KSP_CONVERGED_REASON, -KSP_GMRES_MODIFIEDGRAMSCHMIDT, -KSP_MONITOR, -KSP_MONITOR_SNES_LG, -SNES_KSP_EW, -SNES_CONVERGED_REASON, -SNES_KSP, -SNES_LINESEARCH_MONITOR, -SNES_MF, -SNES_MF_OPERATOR, -SNES_MONITOR, -SNES_TEST_DISPLAY, -SNES_VIEW, -SNES_MONITOR_CANCEL
Controllable:No
Description:Singleton PETSc options for the pressure equation
- pressure_petsc_options_inameNames of PETSc name/value pairs for the pressure equation
C++ Type:MultiMooseEnum
Options:-mat_fd_coloring_err, -mat_fd_type, -mat_mffd_type, -pc_asm_overlap, -pc_factor_levels, -pc_factor_mat_ordering_type, -pc_hypre_boomeramg_grid_sweeps_all, -pc_hypre_boomeramg_max_iter, -pc_hypre_boomeramg_strong_threshold, -pc_hypre_type, -pc_type, -sub_pc_type, -KSP_ATOL, -KSP_GMRES_RESTART, -KSP_MAX_IT, -KSP_PC_SIDE, -KSP_RTOL, -KSP_TYPE, -SUB_KSP_TYPE, -SNES_ATOL, -SNES_LINESEARCH_TYPE, -SNES_LS, -SNES_MAX_IT, -SNES_RTOL, -SNES_DIVERGENCE_TOLERANCE, -SNES_TYPE
Controllable:No
Description:Names of PETSc name/value pairs for the pressure equation
- pressure_petsc_options_valueValues of PETSc name/value pairs (must correspond with "petsc_options_iname" for the pressure equation
C++ Type:std::vector<std::string>
Controllable:No
Description:Values of PETSc name/value pairs (must correspond with "petsc_options_iname" for the pressure equation
- pressure_systemThe solver system for the pressure equation.
C++ Type:SolverSystemName
Controllable:No
Description:The solver system for the pressure equation.
- pressure_variable_relaxation1The relaxation which should be used for the pressure variable (=1 for no relaxation).
Default:1
C++ Type:Real
Unit:(no unit assumed)
Range:0.0
Controllable:No
Description:The relaxation which should be used for the pressure variable (=1 for no relaxation).
Pressure Equation Parameters
Restart Parameters
- should_solve_active_scalarsTrueWhether we should solve active scalar equations.
Default:True
C++ Type:bool
Controllable:No
Description:Whether we should solve active scalar equations.
- should_solve_energyTrueWhether we should solve the fluid energy equation.
Default:True
C++ Type:bool
Controllable:No
Description:Whether we should solve the fluid energy equation.
- should_solve_momentumTrueWhether we should solve the momentum predictor/corrector.
Default:True
C++ Type:bool
Controllable:No
Description:Whether we should solve the momentum predictor/corrector.
- should_solve_passive_scalarsTrueWhether we should solve passive scalar equations.
Default:True
C++ Type:bool
Controllable:No
Description:Whether we should solve passive scalar equations.
- should_solve_pressureTrueWhether we should solve the pressure corrector.
Default:True
C++ Type:bool
Controllable:No
Description:Whether we should solve the pressure corrector.
- should_solve_solid_energyTrueWhether we should solve the solid energy equation.
Default:True
C++ Type:bool
Controllable:No
Description:Whether we should solve the solid energy equation.
- should_solve_turbulenceTrueWhether we should solve the turbulence surrogate equations.
Default:True
C++ Type:bool
Controllable:No
Description:Whether we should solve the turbulence surrogate equations.
Solve Control Parameters
- solid_energy_absolute_tolerance1e-05The absolute tolerance on the normalized residual of the solid energy equation.
Default:1e-05
C++ Type:Real
Unit:(no unit assumed)
Range:0.0
Controllable:No
Description:The absolute tolerance on the normalized residual of the solid energy equation.
- solid_energy_l_abs_tol1e-10The absolute tolerance on the normalized residual in the linear solver of the solid energy equation.
Default:1e-10
C++ Type:Real
Unit:(no unit assumed)
Range:0.0
Controllable:No
Description:The absolute tolerance on the normalized residual in the linear solver of the solid energy equation.
- solid_energy_l_max_its10000The maximum allowed iterations in the linear solver of the solid energy equation.
Default:10000
C++ Type:unsigned int
Range:0
Controllable:No
Description:The maximum allowed iterations in the linear solver of the solid energy equation.
- solid_energy_l_tol1e-05The relative tolerance on the normalized residual in the linear solver of the solid energy equation.
Default:1e-05
C++ Type:Real
Unit:(no unit assumed)
Range:0.0<=solid_energy_l_tol & solid_energy_l_tol<1.0
Controllable:No
Description:The relative tolerance on the normalized residual in the linear solver of the solid energy equation.
- solid_energy_pc_recompute_frequency1How often (in terms of CHT solves nested within SIMPLE solves) to recompute the preconditioner. The default of 1 rebuilds it on every solve. A value of N rebuilds it once every N solves and reuses it in between, which can substantially reduce the solve cost when the preconditioner setup dominates (e.g. algebraic multigrid). Larger values trade more reuse for a possibly staler preconditioner (more Krylov iterations); for solves where the operator changes significantly between linear solves, prefer a smaller value.
Default:1
C++ Type:unsigned int
Range:solid_energy_pc_recompute_frequency >= 1
Controllable:No
Description:How often (in terms of CHT solves nested within SIMPLE solves) to recompute the preconditioner. The default of 1 rebuilds it on every solve. A value of N rebuilds it once every N solves and reuses it in between, which can substantially reduce the solve cost when the preconditioner setup dominates (e.g. algebraic multigrid). Larger values trade more reuse for a possibly staler preconditioner (more Krylov iterations); for solves where the operator changes significantly between linear solves, prefer a smaller value.
- solid_energy_petsc_optionsSingleton PETSc options for the solid energy equation
C++ Type:MultiMooseEnum
Options:-dm_moose_print_embedding, -dm_view, -KSP_CONVERGED_REASON, -KSP_GMRES_MODIFIEDGRAMSCHMIDT, -KSP_MONITOR, -KSP_MONITOR_SNES_LG, -SNES_KSP_EW, -SNES_CONVERGED_REASON, -SNES_KSP, -SNES_LINESEARCH_MONITOR, -SNES_MF, -SNES_MF_OPERATOR, -SNES_MONITOR, -SNES_TEST_DISPLAY, -SNES_VIEW, -SNES_MONITOR_CANCEL
Controllable:No
Description:Singleton PETSc options for the solid energy equation
- solid_energy_petsc_options_inameNames of PETSc name/value pairs for the solid energy equation
C++ Type:MultiMooseEnum
Options:-mat_fd_coloring_err, -mat_fd_type, -mat_mffd_type, -pc_asm_overlap, -pc_factor_levels, -pc_factor_mat_ordering_type, -pc_hypre_boomeramg_grid_sweeps_all, -pc_hypre_boomeramg_max_iter, -pc_hypre_boomeramg_strong_threshold, -pc_hypre_type, -pc_type, -sub_pc_type, -KSP_ATOL, -KSP_GMRES_RESTART, -KSP_MAX_IT, -KSP_PC_SIDE, -KSP_RTOL, -KSP_TYPE, -SUB_KSP_TYPE, -SNES_ATOL, -SNES_LINESEARCH_TYPE, -SNES_LS, -SNES_MAX_IT, -SNES_RTOL, -SNES_DIVERGENCE_TOLERANCE, -SNES_TYPE
Controllable:No
Description:Names of PETSc name/value pairs for the solid energy equation
- solid_energy_petsc_options_valueValues of PETSc name/value pairs (must correspond with "petsc_options_iname" for the solid energy equation
C++ Type:std::vector<std::string>
Controllable:No
Description:Values of PETSc name/value pairs (must correspond with "petsc_options_iname" for the solid energy equation
Solid Energy Equation Parameters
- turbulence_absolute_toleranceThe absolute tolerance(s) on the normalized residual(s) of the turbulence equation(s).
C++ Type:std::vector<Real>
Unit:(no unit assumed)
Controllable:No
Description:The absolute tolerance(s) on the normalized residual(s) of the turbulence equation(s).
- turbulence_equation_relaxationThe relaxation which should be used for the turbulence equations. (=1 for no relaxation, diagonal dominance will still be enforced)
C++ Type:std::vector<Real>
Unit:(no unit assumed)
Controllable:No
Description:The relaxation which should be used for the turbulence equations. (=1 for no relaxation, diagonal dominance will still be enforced)
- turbulence_field_min_limitThe lower limit imposed on turbulent quantities. The recommended value for robustness is 1e-8. This is the imposed default if not set.
C++ Type:std::vector<Real>
Unit:(no unit assumed)
Controllable:No
Description:The lower limit imposed on turbulent quantities. The recommended value for robustness is 1e-8. This is the imposed default if not set.
- turbulence_field_relaxationThe relaxation which should be used for the turbulence fields.
C++ Type:std::vector<Real>
Unit:(no unit assumed)
Controllable:No
Description:The relaxation which should be used for the turbulence fields.
- turbulence_l_abs_tol1e-10The absolute tolerance on the normalized residual in the linear solver of the turbulence equation(s).
Default:1e-10
C++ Type:Real
Unit:(no unit assumed)
Range:0.0
Controllable:No
Description:The absolute tolerance on the normalized residual in the linear solver of the turbulence equation(s).
- turbulence_l_max_its10000The maximum allowed iterations in the linear solver of the turbulence equation.
Default:10000
C++ Type:unsigned int
Controllable:No
Description:The maximum allowed iterations in the linear solver of the turbulence equation.
- turbulence_l_tol1e-05The relative tolerance on the normalized residual in the linear solver of the turbulence equation(s).
Default:1e-05
C++ Type:Real
Unit:(no unit assumed)
Range:0.0<=turbulence_l_tol & turbulence_l_tol<1.0
Controllable:No
Description:The relative tolerance on the normalized residual in the linear solver of the turbulence equation(s).
- turbulence_petsc_optionsSingleton PETSc options for the turbulence equation(s)
C++ Type:MultiMooseEnum
Options:-dm_moose_print_embedding, -dm_view, -KSP_CONVERGED_REASON, -KSP_GMRES_MODIFIEDGRAMSCHMIDT, -KSP_MONITOR, -KSP_MONITOR_SNES_LG, -SNES_KSP_EW, -SNES_CONVERGED_REASON, -SNES_KSP, -SNES_LINESEARCH_MONITOR, -SNES_MF, -SNES_MF_OPERATOR, -SNES_MONITOR, -SNES_TEST_DISPLAY, -SNES_VIEW, -SNES_MONITOR_CANCEL
Controllable:No
Description:Singleton PETSc options for the turbulence equation(s)
- turbulence_petsc_options_inameNames of PETSc name/value pairs for the turbulence equation(s)
C++ Type:MultiMooseEnum
Options:-mat_fd_coloring_err, -mat_fd_type, -mat_mffd_type, -pc_asm_overlap, -pc_factor_levels, -pc_factor_mat_ordering_type, -pc_hypre_boomeramg_grid_sweeps_all, -pc_hypre_boomeramg_max_iter, -pc_hypre_boomeramg_strong_threshold, -pc_hypre_type, -pc_type, -sub_pc_type, -KSP_ATOL, -KSP_GMRES_RESTART, -KSP_MAX_IT, -KSP_PC_SIDE, -KSP_RTOL, -KSP_TYPE, -SUB_KSP_TYPE, -SNES_ATOL, -SNES_LINESEARCH_TYPE, -SNES_LS, -SNES_MAX_IT, -SNES_RTOL, -SNES_DIVERGENCE_TOLERANCE, -SNES_TYPE
Controllable:No
Description:Names of PETSc name/value pairs for the turbulence equation(s)
- turbulence_petsc_options_valueValues of PETSc name/value pairs (must correspond with "petsc_options_iname" for the turbulence equation(s)
C++ Type:std::vector<std::string>
Controllable:No
Description:Values of PETSc name/value pairs (must correspond with "petsc_options_iname" for the turbulence equation(s)
- turbulence_systemsThe solver system for each surrogate turbulence equation.
C++ Type:std::vector<SolverSystemName>
Controllable:No
Description:The solver system for each surrogate turbulence equation.
Turbulence Equations Parameters
- turbulence_pc_recompute_frequency1How often (in advection solves) to recompute the preconditioner. The default of 1 rebuilds it on every solve. A value of N rebuilds it once every N solves and reuses it in between, which can substantially reduce the solve cost when the preconditioner setup dominates (e.g. algebraic multigrid). Larger values trade more reuse for a possibly staler preconditioner (more Krylov iterations); for solves where the operator changes significantly between linear solves, prefer a smaller value.
Default:1
C++ Type:unsigned int
Range:turbulence_pc_recompute_frequency >= 1
Controllable:No
Description:How often (in advection solves) to recompute the preconditioner. The default of 1 rebuilds it on every solve. A value of N rebuilds it once every N solves and reuses it in between, which can substantially reduce the solve cost when the preconditioner setup dominates (e.g. algebraic multigrid). Larger values trade more reuse for a possibly staler preconditioner (more Krylov iterations); for solves where the operator changes significantly between linear solves, prefer a smaller value.
Turbulence Equation Parameters
Input Files
- (modules/navier_stokes/test/tests/finite_volume/ins/turbulence/lid-driven/linear-segregated/lid-driven-turb-std-wall.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/2d/2d-boussinesq.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/3d/3d-velocity-pressure-physics.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/mms/linear-segregated/2d-symmetric-vortex-rz/2d-symmetric-vortex-rz.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/radiation_s2s/linear_fv_gray_lambert_parallel_plates_simple.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/turbulence/channel/linear-segregated/channel_ERCOFTAC_symmetric.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/radiation_s2s/radiative_transfer_no_action_linearfv_simple.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/cht/conjugate_heat_transfer/cht_neu-dir.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/2d-heated/fluid.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/natural_convection/linear_segregated/2d/diff_heated_cavity_linear_segregated.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/lid-driven/linear-segregated/lid-driven-segregated.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/turbulence/channel/linear-segregated/channel_heated-physics.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/turbulence/bfs/linear-segregated/BFS_ERCOFTAC.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/2d/pressure-drop-advection.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/SIMPLEC/2d/2d-velocity-pressure.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/friction/2d-rc-friction-standard-linear-physics.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/segregated-comparison/segregated-linear.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/2d/reconstructed-force-channel.i)
- (modules/navier_stokes/test/tests/finite_volume/two_phase/mixture_model/segregated/channel-drift-flux.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/radiation_s2s/two_slabs_cht_s2s_analytic.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/block_restriction/linear-segregated/reconstructed-gradient.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/lid-driven/linear-segregated/lid-driven-segregated-physics.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/1d-scalar/channel-conservation-physics.i)
- (modules/navier_stokes/test/tests/finite_volume/wcns/enthalpy_equation/1d_test_h.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/2d-symmetric/channel.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/2d-scalar/channel-physics.i)
- (modules/navier_stokes/test/tests/finite_volume/wcns/enthalpy_equation/1d_test_h_fp.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/2d/2d-velocity-pressure.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/steady-transient-compare/simple.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/natural_convection/linear_segregated/2d/diff_heated_cavity_s2s_rad.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/mms/linear-segregated/2d-symmetric-vortex-rz/2d-symmetric-vortex-rz-spacedependent.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/mms/linear-segregated/2d-vortex/spacedependent_mu/sl.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/eigen-multiapp/simple.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/linear_fv_pressure_flux_bc/internal-neighbor.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/2d/momentum-pressure-block-restricted.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/cht/bulk_heat_transfer/flow-around-square-linear.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/2d-heated/fluid-physics.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/radiation_participating_media/p1_radiation_cht_SIMPLE.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/turbulence/block-restricted/block-ke.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/mms/linear-segregated/2d-vortex/2d-vortex.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/SIMPLEC/3d/3d-velocity-pressure.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/turbulence/channel/linear-segregated/channel_scalars-physics.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/turbulence/channel/linear-segregated/executioner_regular_channel.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/segregated-comparison/segregated-linear-physics.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/2d/rotated-channel.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/mms/linear-segregated/2d-symmetric-vortex/2d-symmetric-vortex.i)
- (modules/navier_stokes/test/tests/finite_volume/wcns/enthalpy_equation/enthalpy_equation-physics.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/restart-freeze/pipe_flow_energy_scalars.i)
- (modules/navier_stokes/test/tests/postprocessors/flow_rates/conservation_LinearFV.i)
- (modules/navier_stokes/test/tests/finite_volume/wcns/enthalpy_equation/enthalpy_equation.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/cht/bulk_heat_transfer/flow-around-square-linear-fluidonly-physics.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/radiation_s2s/diff_heated_cavity_slabs_cht.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/3d/3d-velocity-pressure.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/cht/bulk_heat_transfer/flow-around-square-linear-fluidonly.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/turbulence/lid-driven/linear-segregated/lid-driven-turb-non-eq-wall.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/2d-symmetric/channel-physics.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/2d-scalar/channel.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/natural_convection/linear_segregated/2d/diff_heated_cavity_linear_buoyancy.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/cht/conjugate_heat_transfer/cht_rob-rob.i)
- (modules/navier_stokes/test/tests/finite_volume/two_phase/mixture_model/segregated/channel-drift-flux-physics.i)
References
- Hrvoje Jasak.
Error analysis and estimation for the finite volume method with applications to fluid flows.
PhD thesis, Imperial College London (University of London), 1996.[Export]
BibTeX
@phdthesis{jasak1996error, author = "Jasak, Hrvoje", title = "Error analysis and estimation for the finite volume method with applications to fluid flows.", year = "1996", school = "Imperial College London (University of London)" }RIS
TY - THES AU - Jasak, Hrvoje TI - Error analysis and estimation for the finite volume method with applications to fluid flows. PY - 1996 ER -Plain Text
Hrvoje Jasak. Error analysis and estimation for the finite volume method with applications to fluid flows. PhD thesis, Imperial College London (University of London), 1996. - Franjo Juretic.
Error analysis in finite volume CFD.
PhD thesis, Imperial College London (University of London), 2005.[Export]
BibTeX
@phdthesis{juretic2005error, author = "Juretic, Franjo", title = "Error analysis in finite volume CFD", year = "2005", school = "Imperial College London (University of London)" }RIS
TY - THES AU - Juretic, Franjo TI - Error analysis in finite volume CFD PY - 2005 ER -Plain Text
Franjo Juretic. Error analysis in finite volume CFD. PhD thesis, Imperial College London (University of London), 2005. - Fadl Moukalled, L Mangani, Marwan Darwish, and others.
The finite volume method in computational fluid dynamics.
Volume 6.
Springer, 2016.[Export]
BibTeX
@book{moukalled2016finite, author = "Moukalled, Fadl and Mangani, L and Darwish, Marwan and others", title = "The finite volume method in computational fluid dynamics", volume = "6", year = "2016", publisher = "Springer" }RIS
TY - BOOK AU - Moukalled, Fadl AU - Mangani, L AU - Darwish, Marwan AU - others TI - The finite volume method in computational fluid dynamics PY - 2016 VL - 6 PB - Springer ER -Plain Text
Fadl Moukalled, L Mangani, Marwan Darwish, and others. The finite volume method in computational fluid dynamics. Volume 6. Springer, 2016. - Suhas V Patankar and D Brian Spalding.
A calculation procedure for heat, mass and momentum transfer in three-dimensional parabolic flows.
In Numerical prediction of flow, heat transfer, turbulence and combustion, pages 54–73.
Elsevier, 1983.[Export]
BibTeX
@incollection{patankar1983calculation, author = "Patankar, Suhas V and Spalding, D Brian", title = "A calculation procedure for heat, mass and momentum transfer in three-dimensional parabolic flows", booktitle = "Numerical prediction of flow, heat transfer, turbulence and combustion", pages = "54--73", year = "1983", publisher = "Elsevier" }RIS
TY - CHAP AU - Patankar, Suhas V AU - Spalding, D Brian TI - A calculation procedure for heat, mass and momentum transfer in three-dimensional parabolic flows T2 - Numerical prediction of flow, heat transfer, turbulence and combustion PY - 1983 PB - Elsevier SP - 54 EP - 73 ER -Plain Text
Suhas V Patankar and D Brian Spalding. A calculation procedure for heat, mass and momentum transfer in three-dimensional parabolic flows. In Numerical prediction of flow, heat transfer, turbulence and combustion, pages 54–73. Elsevier, 1983. - Chae M Rhie and Wei-Liang Chow.
Numerical study of the turbulent flow past an airfoil with trailing edge separation.
AIAA journal, 21(11):1525–1532, 1983.[Export]
BibTeX
@article{rhie1983numerical, author = "Rhie, Chae M and Chow, Wei-Liang", title = "Numerical study of the turbulent flow past an airfoil with trailing edge separation", journal = "AIAA journal", volume = "21", number = "11", pages = "1525--1532", year = "1983" }RIS
TY - JOUR AU - Rhie, Chae M AU - Chow, Wei-Liang TI - Numerical study of the turbulent flow past an airfoil with trailing edge separation JO - AIAA journal PY - 1983 VL - 21 IS - 11 SP - 1525 EP - 1532 ER -Plain Text
Chae M Rhie and Wei-Liang Chow. Numerical study of the turbulent flow past an airfoil with trailing edge separation. AIAA journal, 21(11):1525–1532, 1983.
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/2d/2d-velocity-pressure.i)
mu = 2.6
rho = 1.0
advected_interp_method = 'average'
pressure_gradient_method = 'green-gauss'
[Mesh]
allow_renumbering = false # Keep IDs stable for the ID-sorted ElementValueSampler output.
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '0.3'
dy = '0.3'
ix = '3'
iy = '3'
[]
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system'
previous_nl_solution_required = true
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = 0.5
solver_sys = u_system
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
initial_condition = 0.0
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
initial_condition = 0.2
gradient_method = ${pressure_gradient_method}
[]
[]
[FVGradientMethods]
[gg]
type = FVGreenGaussGradient
[]
[reconstructed]
type = FVReconstructedPressureGradient
base_gradient_method = green-gauss
gradient_relaxation = 0.1
[]
[]
[FVInterpolationMethods]
[average]
type = FVGeometricAverage
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[]
[LinearFVBCs]
inactive = 'inlet_and_wall_pressure_flux'
[inlet-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_x
functor = '1.1'
[]
[inlet-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_y
functor = '0.0'
[]
[walls-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom'
variable = vel_x
functor = 0.0
[]
[walls-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom'
variable = vel_y
functor = 0.0
[]
[outlet_p]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'right'
variable = pressure
functor = 1.4
[]
[inlet_and_wall_pressure_flux]
type = LinearFVPressureFluxBC
boundary = 'left top bottom'
variable = pressure
HbyA_flux = HbyA
Ainv = Ainv
u = vel_x
v = vel_y
rho = ${rho}
[]
[outlet_u]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_x
use_two_term_expansion = false
boundary = right
[]
[outlet_v]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_y
use_two_term_expansion = false
boundary = right
[]
[]
[VectorPostprocessors]
[solution]
type = ElementValueSampler
variable = 'vel_x vel_y pressure'
sort_by = id
execute_on = TIMESTEP_END
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-10
pressure_l_abs_tol = 1e-10
momentum_l_tol = 0
pressure_l_tol = 0
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
momentum_equation_relaxation = 0.8
pressure_variable_relaxation = 0.3
num_iterations = 100
pressure_absolute_tolerance = 1e-10
momentum_absolute_tolerance = 1e-10
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
print_fields = false
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/2d/2d-velocity-pressure.i)
mu = 2.6
rho = 1.0
advected_interp_method = 'average'
pressure_gradient_method = 'green-gauss'
[Mesh]
allow_renumbering = false # Keep IDs stable for the ID-sorted ElementValueSampler output.
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '0.3'
dy = '0.3'
ix = '3'
iy = '3'
[]
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system'
previous_nl_solution_required = true
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = 0.5
solver_sys = u_system
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
initial_condition = 0.0
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
initial_condition = 0.2
gradient_method = ${pressure_gradient_method}
[]
[]
[FVGradientMethods]
[gg]
type = FVGreenGaussGradient
[]
[reconstructed]
type = FVReconstructedPressureGradient
base_gradient_method = green-gauss
gradient_relaxation = 0.1
[]
[]
[FVInterpolationMethods]
[average]
type = FVGeometricAverage
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[]
[LinearFVBCs]
inactive = 'inlet_and_wall_pressure_flux'
[inlet-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_x
functor = '1.1'
[]
[inlet-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_y
functor = '0.0'
[]
[walls-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom'
variable = vel_x
functor = 0.0
[]
[walls-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom'
variable = vel_y
functor = 0.0
[]
[outlet_p]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'right'
variable = pressure
functor = 1.4
[]
[inlet_and_wall_pressure_flux]
type = LinearFVPressureFluxBC
boundary = 'left top bottom'
variable = pressure
HbyA_flux = HbyA
Ainv = Ainv
u = vel_x
v = vel_y
rho = ${rho}
[]
[outlet_u]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_x
use_two_term_expansion = false
boundary = right
[]
[outlet_v]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_y
use_two_term_expansion = false
boundary = right
[]
[]
[VectorPostprocessors]
[solution]
type = ElementValueSampler
variable = 'vel_x vel_y pressure'
sort_by = id
execute_on = TIMESTEP_END
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-10
pressure_l_abs_tol = 1e-10
momentum_l_tol = 0
pressure_l_tol = 0
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
momentum_equation_relaxation = 0.8
pressure_variable_relaxation = 0.3
num_iterations = 100
pressure_absolute_tolerance = 1e-10
momentum_absolute_tolerance = 1e-10
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
print_fields = false
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/2d/2d-velocity-pressure.i)
mu = 2.6
rho = 1.0
advected_interp_method = 'average'
pressure_gradient_method = 'green-gauss'
[Mesh]
allow_renumbering = false # Keep IDs stable for the ID-sorted ElementValueSampler output.
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '0.3'
dy = '0.3'
ix = '3'
iy = '3'
[]
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system'
previous_nl_solution_required = true
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = 0.5
solver_sys = u_system
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
initial_condition = 0.0
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
initial_condition = 0.2
gradient_method = ${pressure_gradient_method}
[]
[]
[FVGradientMethods]
[gg]
type = FVGreenGaussGradient
[]
[reconstructed]
type = FVReconstructedPressureGradient
base_gradient_method = green-gauss
gradient_relaxation = 0.1
[]
[]
[FVInterpolationMethods]
[average]
type = FVGeometricAverage
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[]
[LinearFVBCs]
inactive = 'inlet_and_wall_pressure_flux'
[inlet-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_x
functor = '1.1'
[]
[inlet-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_y
functor = '0.0'
[]
[walls-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom'
variable = vel_x
functor = 0.0
[]
[walls-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom'
variable = vel_y
functor = 0.0
[]
[outlet_p]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'right'
variable = pressure
functor = 1.4
[]
[inlet_and_wall_pressure_flux]
type = LinearFVPressureFluxBC
boundary = 'left top bottom'
variable = pressure
HbyA_flux = HbyA
Ainv = Ainv
u = vel_x
v = vel_y
rho = ${rho}
[]
[outlet_u]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_x
use_two_term_expansion = false
boundary = right
[]
[outlet_v]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_y
use_two_term_expansion = false
boundary = right
[]
[]
[VectorPostprocessors]
[solution]
type = ElementValueSampler
variable = 'vel_x vel_y pressure'
sort_by = id
execute_on = TIMESTEP_END
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-10
pressure_l_abs_tol = 1e-10
momentum_l_tol = 0
pressure_l_tol = 0
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
momentum_equation_relaxation = 0.8
pressure_variable_relaxation = 0.3
num_iterations = 100
pressure_absolute_tolerance = 1e-10
momentum_absolute_tolerance = 1e-10
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
print_fields = false
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/2d/2d-velocity-pressure.i)
mu = 2.6
rho = 1.0
advected_interp_method = 'average'
pressure_gradient_method = 'green-gauss'
[Mesh]
allow_renumbering = false # Keep IDs stable for the ID-sorted ElementValueSampler output.
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '0.3'
dy = '0.3'
ix = '3'
iy = '3'
[]
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system'
previous_nl_solution_required = true
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = 0.5
solver_sys = u_system
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
initial_condition = 0.0
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
initial_condition = 0.2
gradient_method = ${pressure_gradient_method}
[]
[]
[FVGradientMethods]
[gg]
type = FVGreenGaussGradient
[]
[reconstructed]
type = FVReconstructedPressureGradient
base_gradient_method = green-gauss
gradient_relaxation = 0.1
[]
[]
[FVInterpolationMethods]
[average]
type = FVGeometricAverage
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[]
[LinearFVBCs]
inactive = 'inlet_and_wall_pressure_flux'
[inlet-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_x
functor = '1.1'
[]
[inlet-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_y
functor = '0.0'
[]
[walls-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom'
variable = vel_x
functor = 0.0
[]
[walls-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom'
variable = vel_y
functor = 0.0
[]
[outlet_p]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'right'
variable = pressure
functor = 1.4
[]
[inlet_and_wall_pressure_flux]
type = LinearFVPressureFluxBC
boundary = 'left top bottom'
variable = pressure
HbyA_flux = HbyA
Ainv = Ainv
u = vel_x
v = vel_y
rho = ${rho}
[]
[outlet_u]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_x
use_two_term_expansion = false
boundary = right
[]
[outlet_v]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_y
use_two_term_expansion = false
boundary = right
[]
[]
[VectorPostprocessors]
[solution]
type = ElementValueSampler
variable = 'vel_x vel_y pressure'
sort_by = id
execute_on = TIMESTEP_END
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-10
pressure_l_abs_tol = 1e-10
momentum_l_tol = 0
pressure_l_tol = 0
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
momentum_equation_relaxation = 0.8
pressure_variable_relaxation = 0.3
num_iterations = 100
pressure_absolute_tolerance = 1e-10
momentum_absolute_tolerance = 1e-10
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
print_fields = false
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/2d/2d-velocity-pressure.i)
mu = 2.6
rho = 1.0
advected_interp_method = 'average'
pressure_gradient_method = 'green-gauss'
[Mesh]
allow_renumbering = false # Keep IDs stable for the ID-sorted ElementValueSampler output.
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '0.3'
dy = '0.3'
ix = '3'
iy = '3'
[]
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system'
previous_nl_solution_required = true
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = 0.5
solver_sys = u_system
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
initial_condition = 0.0
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
initial_condition = 0.2
gradient_method = ${pressure_gradient_method}
[]
[]
[FVGradientMethods]
[gg]
type = FVGreenGaussGradient
[]
[reconstructed]
type = FVReconstructedPressureGradient
base_gradient_method = green-gauss
gradient_relaxation = 0.1
[]
[]
[FVInterpolationMethods]
[average]
type = FVGeometricAverage
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[]
[LinearFVBCs]
inactive = 'inlet_and_wall_pressure_flux'
[inlet-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_x
functor = '1.1'
[]
[inlet-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_y
functor = '0.0'
[]
[walls-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom'
variable = vel_x
functor = 0.0
[]
[walls-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom'
variable = vel_y
functor = 0.0
[]
[outlet_p]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'right'
variable = pressure
functor = 1.4
[]
[inlet_and_wall_pressure_flux]
type = LinearFVPressureFluxBC
boundary = 'left top bottom'
variable = pressure
HbyA_flux = HbyA
Ainv = Ainv
u = vel_x
v = vel_y
rho = ${rho}
[]
[outlet_u]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_x
use_two_term_expansion = false
boundary = right
[]
[outlet_v]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_y
use_two_term_expansion = false
boundary = right
[]
[]
[VectorPostprocessors]
[solution]
type = ElementValueSampler
variable = 'vel_x vel_y pressure'
sort_by = id
execute_on = TIMESTEP_END
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-10
pressure_l_abs_tol = 1e-10
momentum_l_tol = 0
pressure_l_tol = 0
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
momentum_equation_relaxation = 0.8
pressure_variable_relaxation = 0.3
num_iterations = 100
pressure_absolute_tolerance = 1e-10
momentum_absolute_tolerance = 1e-10
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
print_fields = false
[]
[Outputs]
exodus = true
[]
should_solve_momentum
Default:True
C++ Type:bool
Controllable:No
Description:Whether we should solve the momentum predictor/corrector.
should_solve_pressure
Default:True
C++ Type:bool
Controllable:No
Description:Whether we should solve the pressure corrector.
should_solve_energy
Default:True
C++ Type:bool
Controllable:No
Description:Whether we should solve the fluid energy equation.
should_solve_solid_energy
Default:True
C++ Type:bool
Controllable:No
Description:Whether we should solve the solid energy equation.
should_solve_turbulence
Default:True
C++ Type:bool
Controllable:No
Description:Whether we should solve the turbulence surrogate equations.
should_solve_active_scalars
Default:True
C++ Type:bool
Controllable:No
Description:Whether we should solve active scalar equations.
should_solve_passive_scalars
Default:True
C++ Type:bool
Controllable:No
Description:Whether we should solve passive scalar equations.
(modules/navier_stokes/test/tests/finite_volume/ins/turbulence/lid-driven/linear-segregated/lid-driven-turb-std-wall.i)
### Thermophysical Properties ###
mu = 1e-3
rho = 1.0
### Operation Conditions ###
lid_velocity = 1.0
side_length = 0.1
### Initial Conditions ###
intensity = 0.01
k_init = '${fparse 1.5*(intensity * lid_velocity)^2}'
eps_init = '${fparse C_mu^0.75 * k_init^1.5 / side_length}'
### k-epsilon Closure Parameters ###
sigma_k = 1.0
sigma_eps = 1.3
C1_eps = 1.44
C2_eps = 1.92
C_mu = 0.09
### Modeling parameters ###
bulk_wall_treatment = false
walls = 'left top right bottom'
wall_treatment = 'eq_newton' # Options: eq_newton, eq_incremental, eq_linearized, neq
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = ${side_length}
ymin = 0
ymax = ${side_length}
nx = 12
ny = 12
[]
# Prevent test diffing on distributed parallel element numbering
allow_renumbering = false
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system TKE_system TKED_system'
previous_nl_solution_required = true
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = ${lid_velocity}
solver_sys = u_system
[]
[vel_y]
type = MooseLinearVariableFVReal
initial_condition = 0
solver_sys = v_system
[]
[pressure]
type = MooseLinearVariableFVReal
initial_condition = 1e-8
solver_sys = pressure_system
[]
[TKE]
type = MooseLinearVariableFVReal
solver_sys = TKE_system
initial_condition = ${k_init}
[]
[TKED]
type = MooseLinearVariableFVReal
solver_sys = TKED_system
initial_condition = ${eps_init}
[]
[]
[FVInterpolationMethods]
[upwind]
type = FVAdvectedUpwind
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = upwind
mu = 'mu_t'
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = true
use_deviatoric_terms = yes
[]
[u_diffusion]
type = LinearFVDiffusion
variable = vel_x
diffusion_coeff = ${mu}
use_nonorthogonal_correction = true
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = upwind
mu = 'mu_t'
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = true
use_deviatoric_terms = yes
[]
[v_diffusion]
type = LinearFVDiffusion
variable = vel_y
diffusion_coeff = ${mu}
use_nonorthogonal_correction = true
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = true
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[TKE_advection]
type = LinearFVTurbulentAdvection
variable = TKE
advected_interp_method_name = 'upwind'
[]
[TKE_diffusion]
type = LinearFVTurbulentDiffusion
variable = TKE
diffusion_coeff = ${mu}
use_nonorthogonal_correction = true
[]
[TKE_turb_diffusion]
type = LinearFVTurbulentDiffusion
variable = TKE
diffusion_coeff = 'mu_t'
scaling_coeff = ${sigma_k}
use_nonorthogonal_correction = true
[]
[TKE_source_sink]
type = LinearFVTKESourceSink
variable = TKE
u = vel_x
v = vel_y
epsilon = TKED
rho = ${rho}
mu = ${mu}
mu_t = 'mu_t'
walls = ${walls}
wall_treatment = ${wall_treatment}
C_pl = 1e10
[]
[TKED_advection]
type = LinearFVTurbulentAdvection
variable = TKED
advected_interp_method_name = 'upwind'
walls = ${walls}
[]
[TKED_diffusion]
type = LinearFVTurbulentDiffusion
variable = TKED
diffusion_coeff = ${mu}
use_nonorthogonal_correction = true
walls = ${walls}
[]
[TKED_turb_diffusion]
type = LinearFVTurbulentDiffusion
variable = TKED
diffusion_coeff = 'mu_t'
scaling_coeff = ${sigma_eps}
use_nonorthogonal_correction = true
walls = ${walls}
[]
[TKED_source_sink]
type = LinearFVTKEDSourceSink
variable = TKED
u = vel_x
v = vel_y
tke = TKE
rho = ${rho}
mu = ${mu}
mu_t = 'mu_t'
C1_eps = ${C1_eps}
C2_eps = ${C2_eps}
walls = ${walls}
wall_treatment = ${wall_treatment}
C_pl = 1e10
[]
[]
[LinearFVBCs]
[top_x]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = vel_x
boundary = 'top'
functor = 1
[]
[no_slip_x]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = vel_x
boundary = 'left right bottom'
functor = 0
[]
[no_slip_y]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = vel_y
boundary = 'left right top bottom'
functor = 0
[]
[pressure-extrapolation]
type = LinearFVExtrapolatedPressureBC
boundary = 'left right top bottom'
variable = pressure
use_two_term_expansion = true
[]
[walls_mu_t]
type = LinearFVTurbulentViscosityWallFunctionBC
boundary = ${walls}
variable = 'mu_t'
u = vel_x
v = vel_y
rho = ${rho}
mu = ${mu}
tke = TKE
wall_treatment = ${wall_treatment}
[]
[]
[AuxVariables]
[mu_t]
type = MooseLinearVariableFVReal
initial_condition = '${fparse rho * C_mu * ${k_init}^2 / eps_init}'
[]
[yplus]
type = MooseLinearVariableFVReal
[]
[mu_eff]
type = MooseLinearVariableFVReal
initial_condition = '${fparse rho * C_mu * ${k_init}^2 / eps_init}'
[]
[]
[AuxKernels]
[compute_mu_t]
type = kEpsilonViscosityAux
variable = mu_t
C_mu = ${C_mu}
tke = TKE
epsilon = TKED
mu = ${mu}
rho = ${rho}
u = vel_x
v = vel_y
bulk_wall_treatment = ${bulk_wall_treatment}
walls = ${walls}
wall_treatment = ${wall_treatment}
execute_on = 'NONLINEAR'
mu_t_ratio_max = 1e20
[]
[compute_y_plus]
type = RANSYPlusAux
variable = yplus
tke = TKE
mu = ${mu}
rho = ${rho}
u = vel_x
v = vel_y
walls = ${walls}
wall_treatment = ${wall_treatment}
execute_on = 'NONLINEAR'
[]
[compute_mu_eff]
type = ParsedAux
variable = 'mu_eff'
coupled_variables = 'mu_t'
expression = 'mu_t + ${mu}'
execute_on = 'NONLINEAR'
[]
[]
[Executioner]
type = SIMPLE
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
turbulence_systems = 'TKE_system TKED_system'
momentum_l_abs_tol = 1e-14
pressure_l_abs_tol = 1e-14
turbulence_l_abs_tol = 1e-14
momentum_l_tol = 1e-14
pressure_l_tol = 1e-14
turbulence_l_tol = 1e-14
momentum_equation_relaxation = 0.7
pressure_variable_relaxation = 0.3
turbulence_equation_relaxation = '0.5 0.5'
num_iterations = 1000
pressure_absolute_tolerance = 1e-12
momentum_absolute_tolerance = 1e-12
turbulence_absolute_tolerance = '1e-12 1e-12'
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
turbulence_petsc_options_iname = '-pc_type -pc_hypre_type'
turbulence_petsc_options_value = 'hypre boomeramg'
print_fields = false
continue_on_max_its = true
pin_pressure = true
pressure_pin_value = 0.0
pressure_pin_point = '0.01 0.099 0.0'
[]
[Outputs]
csv = true
perf_graph = false
print_nonlinear_residuals = false
print_linear_residuals = true
[]
[VectorPostprocessors]
[side_bottom]
type = SideValueSampler
boundary = 'bottom'
variable = 'vel_x vel_y pressure TKE TKED'
sort_by = 'x'
execute_on = 'timestep_end'
[]
[side_top]
type = SideValueSampler
boundary = 'top'
variable = 'vel_x vel_y pressure TKE TKED'
sort_by = 'x'
execute_on = 'timestep_end'
[]
[side_left]
type = SideValueSampler
boundary = 'left'
variable = 'vel_x vel_y pressure TKE TKED'
sort_by = 'y'
execute_on = 'timestep_end'
[]
[side_right]
type = SideValueSampler
boundary = 'right'
variable = 'vel_x vel_y pressure TKE TKED'
sort_by = 'y'
execute_on = 'timestep_end'
[]
[horizontal_center]
type = LineValueSampler
start_point = '${fparse 0.01 * side_length} ${fparse 0.499 * side_length} 0'
end_point = '${fparse 0.99 * side_length} ${fparse 0.499 * side_length} 0'
num_points = ${Mesh/gen/nx}
variable = 'vel_x vel_y pressure TKE TKED'
sort_by = 'x'
execute_on = 'timestep_end'
[]
[vertical_center]
type = LineValueSampler
start_point = '${fparse 0.499 * side_length} ${fparse 0.01 * side_length} 0'
end_point = '${fparse 0.499 * side_length} ${fparse 0.99 * side_length} 0'
num_points = ${Mesh/gen/ny}
variable = 'vel_x vel_y pressure TKE TKED'
sort_by = 'y'
execute_on = 'timestep_end'
[]
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/2d/2d-boussinesq.i)
mu = 2.6
rho = 1.0
advected_interp_method = 'average'
cp = 300
k = 20
alpha_b = 1e-4
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '1.'
dy = '0.2'
ix = '10'
iy = '5'
[]
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system energy_system'
previous_nl_solution_required = true
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = 0.5
solver_sys = u_system
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
initial_condition = 0.0
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
initial_condition = 0.2
[]
[T]
type = MooseLinearVariableFVReal
solver_sys = energy_system
initial_condition = 300
[]
[]
[FVInterpolationMethods]
[average]
type = FVGeometricAverage
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[u_boussinesq]
type = LinearFVMomentumBoussinesq
variable = vel_x
rho = ${rho}
gravity = '0 -9.81 0'
alpha_name = ${alpha_b}
ref_temperature = 300.0
T_fluid = T
momentum_component = 'x'
[]
[v_boussinesq]
type = LinearFVMomentumBoussinesq
variable = vel_y
rho = ${rho}
gravity = '0 -9.81 0'
alpha_name = ${alpha_b}
ref_temperature = 300.0
T_fluid = T
momentum_component = 'y'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[h_advection]
type = LinearFVEnergyAdvection
variable = T
advected_quantity = temperature
cp = ${cp}
advected_interp_method = ${advected_interp_method}
rhie_chow_user_object = 'rc'
[]
[conduction]
type = LinearFVDiffusion
variable = T
diffusion_coeff = ${k}
use_nonorthogonal_correction = false
[]
[]
[FunctorMaterials]
[constant_functors]
type = GenericFunctorMaterial
prop_names = 'cp alpha_b'
prop_values = '${cp} ${alpha_b}'
[]
[]
[LinearFVBCs]
[inlet-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_x
functor = '1.1'
[]
[inlet-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_y
functor = '0.0'
[]
[walls-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom'
variable = vel_x
functor = 0.0
[]
[walls-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom'
variable = vel_y
functor = 0.0
[]
[outlet_p]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'right'
variable = pressure
functor = 1.4
[]
[outlet_u]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_x
use_two_term_expansion = false
boundary = right
[]
[outlet_v]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_y
use_two_term_expansion = false
boundary = right
[]
[inlet_top_T]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T
functor = ${fparse 300.0}
boundary = 'left top'
[]
[bottom_T]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T
functor = ${fparse 350.0}
boundary = bottom
[]
[outlet_T]
type = LinearFVAdvectionDiffusionOutflowBC
variable = T
use_two_term_expansion = false
boundary = right
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-10
pressure_l_abs_tol = 1e-10
energy_l_abs_tol = 1e-10
momentum_l_tol = 0
pressure_l_tol = 0
energy_l_tol = 0
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
energy_system = 'energy_system'
momentum_equation_relaxation = 0.8
energy_equation_relaxation = 0.9
pressure_variable_relaxation = 0.3
num_iterations = 200
pressure_absolute_tolerance = 1e-10
momentum_absolute_tolerance = 1e-10
energy_absolute_tolerance = 1e-10
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
energy_petsc_options_iname = '-pc_type -pc_hypre_type'
energy_petsc_options_value = 'hypre boomeramg'
print_fields = false
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/3d/3d-velocity-pressure-physics.i)
mu = 2.6
rho = 1.0
advected_interp_method = 'average'
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 3
dx = '0.3'
dy = '0.3'
dz = '0.3'
ix = '3'
iy = '3'
iz = '3'
[]
[]
[Problem]
linear_sys_names = 'u_system v_system w_system pressure_system'
previous_nl_solution_required = true
[]
[Physics]
[NavierStokes]
[FlowSegregated/flow]
velocity_variable = 'vel_x vel_y vel_z'
pressure_variable = 'pressure'
initial_velocity = '0.5 0 0'
initial_pressure = '0.2'
density = ${rho}
dynamic_viscosity = ${mu}
# use inlet for moving wall to match the reference input
# we could also use a noslip BC with a velocity wall functor
inlet_boundaries = 'left'
momentum_inlet_types = 'fixed-velocity'
momentum_inlet_functors = '1.1 0 0'
wall_boundaries = 'top bottom back front'
momentum_wall_types = 'noslip noslip noslip noslip'
outlet_boundaries = 'right'
momentum_outlet_types = 'fixed-pressure'
pressure_functors = '1.4'
orthogonality_correction = false
pressure_two_term_bc_expansion = false
momentum_two_term_bc_expansion = false
momentum_advection_interpolation = ${advected_interp_method}
[]
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-10
pressure_l_abs_tol = 1e-10
momentum_l_tol = 0
pressure_l_tol = 0
rhie_chow_user_object = 'ins_rhie_chow_interpolator'
momentum_systems = 'u_system v_system w_system'
pressure_system = 'pressure_system'
momentum_equation_relaxation = 0.8
pressure_variable_relaxation = 0.3
num_iterations = 100
pressure_absolute_tolerance = 1e-10
momentum_absolute_tolerance = '1e-10 1e-10 1e-10'
momentum_petsc_options_iname = '-pc_type -pc_hypre_type -pc_hypre_boomeramg_agg_nl -pc_hypre_boomeramg_agg_num_paths -pc_hypre_boomeramg_truncfactor -pc_hypre_boomeramg_strong_threshold -pc_hypre_boomeramg_coarsen_type -pc_hypre_boomeramg_interp_type'
momentum_petsc_options_value = 'hypre boomeramg 4 1 0.1 0.6 HMIS ext+i'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type -pc_hypre_boomeramg_agg_nl -pc_hypre_boomeramg_agg_num_paths -pc_hypre_boomeramg_truncfactor -pc_hypre_boomeramg_strong_threshold -pc_hypre_boomeramg_coarsen_type -pc_hypre_boomeramg_interp_type'
pressure_petsc_options_value = 'hypre boomeramg 2 1 0.1 0.6 HMIS ext+i'
print_fields = false
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/mms/linear-segregated/2d-symmetric-vortex-rz/2d-symmetric-vortex-rz.i)
mu = 1.2
rho = 1.5
advected_interp_method = 'average'
pressure_gradient_method = 'green-gauss'
[Problem]
linear_sys_names = 'u_system v_system pressure_system'
previous_nl_solution_required = true
[]
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
[]
coord_type = 'RZ'
rz_coord_axis = x
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
pressure_projection_method = consistent
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = 0.0
solver_sys = u_system
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
initial_condition = 0.0
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
initial_condition = 0.0
[]
[]
[FVInterpolationMethods]
[average]
type = FVGeometricAverage
[]
[]
[FVGradientMethods]
[reconstructed]
type = FVReconstructedPressureGradient
base_gradient_method = green-gauss
gradient_relaxation = 0.1
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
gradient_method = ${pressure_gradient_method}
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
gradient_method = ${pressure_gradient_method}
[]
[u_forcing]
type = LinearFVSource
variable = vel_x
source_density = forcing_u
[]
[v_forcing]
type = LinearFVSource
variable = vel_y
source_density = forcing_v
[]
[v_viscous_forcing]
type = LinearFVRZViscousSource
variable = vel_y
mu = ${mu}
momentum_component = 'y'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = 'Ainv'
use_nonorthogonal_correction = false
use_nonorthogonal_correction_on_boundary = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = 'HbyA'
force_boundary_execution = true
[]
[]
[LinearFVBCs]
[no-slip-wall-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left right top'
variable = vel_x
functor = exact_u
[]
[no-slip-wall-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left right top'
variable = vel_y
functor = exact_v
[]
[symmetry-u]
type = LinearFVVelocitySymmetryBC
boundary = 'bottom'
variable = vel_x
u = vel_x
v = vel_y
momentum_component = x
[]
[symmetry-v]
type = LinearFVVelocitySymmetryBC
boundary = 'bottom'
variable = vel_y
u = vel_x
v = vel_y
momentum_component = y
[]
[pressure-extrapolation]
type = LinearFVExtrapolatedPressureBC
boundary = 'top left right'
variable = pressure
use_two_term_expansion = true
[]
[pressure-symmetry]
type = LinearFVPressureSymmetryBC
boundary = 'bottom'
variable = pressure
HbyA_flux = 'HbyA'
[]
[]
[AuxVariables]
[vel_x_aux]
type = MooseLinearVariableFVReal
initial_condition = 0.0
[]
[vel_y_aux]
type = MooseLinearVariableFVReal
initial_condition = 0.0
[]
[pressure_aux]
type = MooseLinearVariableFVReal
initial_condition = 0.0
[]
[]
[AuxKernels]
[vel_x_function_aux]
type = FunctionAux
variable = vel_x_aux
function = exact_u
execute_on = TIMESTEP_END
[]
[vel_y_function_aux]
type = FunctionAux
variable = vel_y_aux
function = exact_v
execute_on = TIMESTEP_END
[]
[pressure_function_aux]
type = FunctionAux
variable = pressure_aux
function = exact_p
execute_on = TIMESTEP_END
[]
[]
[Functions]
[exact_u]
type = ParsedFunction
expression = '4*x^2*y^2 - 20*x^2*y^3 - 8*x^3*y^2 + 36*x^2*y^4 + 40*x^3*y^3 + 4*x^4*y^2 - 28*x^2*y^5 - 72*x^3*y^4 - 20*x^4*y^3 + 8*x^2*y^6 + 56*x^3*y^5 + 36*x^4*y^4 - 16*x^3*y^6 - 28*x^4*y^5 + 8*x^4*y^6'
[]
[exact_v]
type = ParsedFunction
expression = '-2*x*y^3*(x-1)*(2*x-1)*(y-1)^4'
[]
[exact_p]
type = ParsedFunction
expression = 'x*y^2'
[]
[forcing_u]
type = ParsedFunction
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
expression = 'rho*(8*x^3*y^4*(x-1)^3*(2*x-1)*(y-1)^6*(4*y^2 - 5*y + 2)) - mu*(4*(y-1)*(72*x^4*y^3 - 103*x^4*y^2 + 41*x^4*y - 4*x^4 - 144*x^3*y^3 + 206*x^3*y^2 - 82*x^3*y + 8*x^3 + 24*x^2*y^5 - 60*x^2*y^4 + 120*x^2*y^3 - 115*x^2*y^2 + 41*x^2*y - 4*x^2 - 24*x*y^5 + 60*x*y^4 - 48*x*y^3 + 12*x*y^2 + 4*y^5 - 10*y^4 + 8*y^3 - 2*y^2)) + y^2'
[]
[forcing_v]
type = ParsedFunction
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
expression = 'rho*4*x^2*y^5*(x-1)^2*(y-1)^7*(2*(2*x^2 - 2*x + y) + (2*x - 1)^2*(y - 1)) + mu * (4*y*(2*x-1)*(y-1)^2*(24*x^2*y^2 - 22*x^2*y + 4*x^2 - 24*x*y^2 + 22*x*y - 4*x + 3*y^4 - 6*y^3 + 3*y^2)) + 2*x*y'
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-10
pressure_l_abs_tol = 1e-10
momentum_l_tol = 0
pressure_l_tol = 0
momentum_l_max_its = 500
pressure_l_max_its = 500
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
momentum_equation_relaxation = 0.85
pressure_variable_relaxation = 1.0
num_iterations = 10000
pressure_absolute_tolerance = 1e-8
momentum_absolute_tolerance = 1e-8
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
print_fields = false
continue_on_max_its = true
pin_pressure = true
pressure_pin_value = 0.125
pressure_pin_point = '0.5 0.5 0.0'
[]
[Outputs]
[csv]
type = CSV
execute_on = TIMESTEP_END
[]
[]
[Postprocessors]
[h]
type = AverageElementSize
execute_on = TIMESTEP_END
[]
[L2u]
type = ElementL2FunctorError
approximate = vel_x
exact = exact_u
execute_on = TIMESTEP_END
[]
[L2v]
type = ElementL2FunctorError
approximate = vel_y
exact = exact_v
execute_on = TIMESTEP_END
[]
[L2p]
approximate = pressure
exact = exact_p
type = ElementL2FunctorError
execute_on = TIMESTEP_END
[]
[]
(modules/navier_stokes/test/tests/finite_volume/ins/radiation_s2s/linear_fv_gray_lambert_parallel_plates_simple.i)
# Two conducting slabs radiating across an empty gap.
#
# Analytic reference:
# q = 14581.2627500345 W/m^2
# T_left_rad = 854.187372499655 K
# T_right_rad = 445.812627500345 K
#
# The mesh is deliberately smaller than the exploratory 640 x 20 mesh. The
# solution is one-dimensional, so this keeps the regression test inexpensive
# without changing the reference solution.
[Problem]
kernel_coverage_check = false
linear_sys_names = 'energy_system u_system v_system p_system'
[]
[Mesh]
type = MeshGeneratorMesh
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '0.1 0.1 0.1'
ix = '10 1 10'
dy = '1.0'
iy = '1'
subdomain_id = '1 5 2'
[]
[left_rad_sideset]
type = SideSetsBetweenSubdomainsGenerator
input = cmg
primary_block = 1
paired_block = 5
new_boundary = 'left_rad'
[]
[right_rad_sideset]
type = SideSetsBetweenSubdomainsGenerator
input = left_rad_sideset
primary_block = 2
paired_block = 5
new_boundary = 'right_rad'
[]
[delete_gap]
type = BlockDeletionGenerator
input = right_rad_sideset
block = '5'
[]
[rename_solid_blocks]
type = RenameBlockGenerator
input = delete_gap
old_block = '1 2'
new_block = 'left_solid right_solid'
[]
[]
[Variables]
[temperature]
type = MooseLinearVariableFVReal
solver_sys = 'energy_system'
initial_condition = 600
[]
# Dummy flow variables retain the SIMPLE/LinearFV setup. Their systems are
# not solved in this validation problem.
[vel_x]
type = MooseLinearVariableFVReal
solver_sys = 'u_system'
initial_condition = 0
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = 'v_system'
initial_condition = 0
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = 'p_system'
initial_condition = 0
[]
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = 1
p_diffusion_kernel = p_diffusion
[]
[view_factors_uo]
type = SpecifiedViewFactor
boundary = 'left_rad right_rad'
view_factors = '0 1;
1 0'
execute_on = INITIAL
[]
[gray_lambert]
type = ViewFactorObjectSurfaceRadiation
boundary = 'left_rad right_rad'
emissivity = '0.8 0.6'
temperature = temperature
stefan_boltzmann_constant = 5.67037e-8
view_factor_object_name = view_factors_uo
execute_on = 'NONLINEAR'
[]
[]
[LinearFVKernels]
[temp_conduction]
type = LinearFVDiffusion
variable = temperature
diffusion_coeff = 10.
block = 'left_solid right_solid'
use_nonorthogonal_correction = false
[]
# This object is required by RhieChowMassFlux, although pressure is disabled.
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
block = 'left_solid right_solid'
use_nonorthogonal_correction = false
[]
[]
[LinearFVBCs]
[hot_left]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = temperature
boundary = 'left'
functor = 1000.
[]
[cold_right]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = temperature
boundary = 'right'
functor = 300.
[]
[radiation]
type = LinearFVGrayLambertBC
variable = temperature
temperature_radiation = temperature
coeff_diffusion = 10.
surface_radiation_object_name = gray_lambert
boundary = 'left_rad right_rad'
[]
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = csv
[]
[T_left_rad]
type = GrayLambertSurfaceRadiationPP
surface_radiation_object_name = gray_lambert
return_type = TEMPERATURE
boundary = left_rad
[]
[T_right_rad]
type = GrayLambertSurfaceRadiationPP
surface_radiation_object_name = gray_lambert
return_type = TEMPERATURE
boundary = right_rad
[]
[q_left_rad]
type = GrayLambertSurfaceRadiationPP
surface_radiation_object_name = gray_lambert
return_type = HEAT_FLUX_DENSITY
boundary = left_rad
[]
[q_right_rad]
type = GrayLambertSurfaceRadiationPP
surface_radiation_object_name = gray_lambert
return_type = HEAT_FLUX_DENSITY
boundary = right_rad
[]
[T_left_error]
type = ParsedPostprocessor
pp_names = 'T_left_rad'
expression = 'abs(T_left_rad - 854.187372499655)/854.187372499655'
[]
[T_right_error]
type = ParsedPostprocessor
pp_names = 'T_right_rad'
expression = 'abs(T_right_rad - 445.812627500345)/445.812627500345'
[]
[q_left_rel_error]
type = ParsedPostprocessor
pp_names = 'q_left_rad'
expression = 'abs(abs(q_left_rad) - 14581.2627500345)/14581.2627500345'
[]
[q_right_rel_error]
type = ParsedPostprocessor
pp_names = 'q_right_rad'
expression = 'abs(abs(q_right_rad) - 14581.2627500345)/14581.2627500345'
[]
[]
[Executioner]
type = SIMPLE
num_iterations = 2000
should_solve_momentum = false
should_solve_pressure = false
energy_system = 'energy_system'
energy_l_abs_tol = 1e-12
energy_l_tol = 0
energy_equation_relaxation = 0.99
energy_field_relaxation = 0.99
energy_absolute_tolerance = 1e-8
energy_petsc_options_iname = '-pc_type'
energy_petsc_options_value = 'lu'
print_fields = false
continue_on_max_its = false
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'p_system'
[]
[Outputs]
execute_on = FINAL
exodus = true
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/turbulence/channel/linear-segregated/channel_ERCOFTAC_symmetric.i)
H = 1 #halfwidth of the channel
L = 100
Re = 13700
rho = 1
bulk_u = 1
mu = '${fparse rho * bulk_u * 2 * H / Re}'
advected_interp_method = 'upwind'
### k-epsilon Closure Parameters ###
sigma_k = 1.0
sigma_eps = 1.3
C1_eps = 1.44
C2_eps = 1.92
C_mu = 0.09
### Initial and Boundary Conditions ###
intensity = '${fparse 0.16*Re^(-1./8.)}'
k_init = '${fparse 1.5*(intensity * bulk_u)^2}'
eps_init = '${fparse C_mu^0.75 * k_init^1.5 / (2*H)}'
### Modeling parameters ###
bulk_wall_treatment = false
walls = 'top'
wall_treatment = 'eq_newton' # Options: eq_newton, eq_incremental, eq_linearized, neq
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = ${L}
ymin = 0
ymax = ${H}
nx = 4
ny = 4
bias_y = 0.7
[]
allow_renumbering = false
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system TKE_system TKED_system'
previous_nl_solution_required = true
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = ${bulk_u}
solver_sys = u_system
[]
[vel_y]
type = MooseLinearVariableFVReal
initial_condition = 0
solver_sys = v_system
[]
[pressure]
type = MooseLinearVariableFVReal
initial_condition = 1e-8
solver_sys = pressure_system
[]
[TKE]
type = MooseLinearVariableFVReal
solver_sys = TKE_system
initial_condition = ${k_init}
[]
[TKED]
type = MooseLinearVariableFVReal
solver_sys = TKED_system
initial_condition = ${eps_init}
[]
[]
[FVInterpolationMethods]
[upwind]
type = FVAdvectedUpwind
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = ${advected_interp_method}
mu = 'mu_t'
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
use_deviatoric_terms = yes
[]
[u_diffusion]
type = LinearFVDiffusion
variable = vel_x
diffusion_coeff = ${mu}
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = ${advected_interp_method}
mu = 'mu_t'
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
use_deviatoric_terms = yes
[]
[v_diffusion]
type = LinearFVDiffusion
variable = vel_y
diffusion_coeff = ${mu}
use_nonorthogonal_correction = false
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[TKE_advection]
type = LinearFVTurbulentAdvection
variable = TKE
advected_interp_method_name = ${advected_interp_method}
[]
[TKE_diffusion]
type = LinearFVTurbulentDiffusion
variable = TKE
diffusion_coeff = ${mu}
use_nonorthogonal_correction = false
[]
[TKE_turb_diffusion]
type = LinearFVTurbulentDiffusion
variable = TKE
diffusion_coeff = 'mu_t'
scaling_coeff = ${sigma_k}
use_nonorthogonal_correction = false
[]
[TKE_source_sink]
type = LinearFVTKESourceSink
variable = TKE
u = vel_x
v = vel_y
epsilon = TKED
rho = ${rho}
mu = ${mu}
mu_t = 'mu_t'
walls = ${walls}
wall_treatment = ${wall_treatment}
C_pl = 1e10
[]
[TKED_advection]
type = LinearFVTurbulentAdvection
variable = TKED
advected_interp_method_name = ${advected_interp_method}
walls = ${walls}
[]
[TKED_diffusion]
type = LinearFVTurbulentDiffusion
variable = TKED
diffusion_coeff = ${mu}
use_nonorthogonal_correction = false
walls = ${walls}
[]
[TKED_turb_diffusion]
type = LinearFVTurbulentDiffusion
variable = TKED
diffusion_coeff = 'mu_t'
scaling_coeff = ${sigma_eps}
use_nonorthogonal_correction = false
walls = ${walls}
[]
[TKED_source_sink]
type = LinearFVTKEDSourceSink
variable = TKED
u = vel_x
v = vel_y
tke = TKE
rho = ${rho}
mu = ${mu}
mu_t = 'mu_t'
C1_eps = ${C1_eps}
C2_eps = ${C2_eps}
walls = ${walls}
wall_treatment = ${wall_treatment}
C_pl = 1e10
[]
[]
[LinearFVBCs]
[inlet-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_x
functor = '${bulk_u}'
[]
[inlet-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_y
functor = '0.0'
[]
[walls-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = ${walls}
variable = vel_x
functor = 0.0
[]
[walls-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = ${walls}
variable = vel_y
functor = 0.0
[]
[symmetry-u]
type = LinearFVVelocitySymmetryBC
variable = vel_x
boundary = 'bottom'
momentum_component = 'x'
u = 'vel_x'
v = 'vel_y'
[]
[symmetry-v]
type = LinearFVVelocitySymmetryBC
variable = vel_y
boundary = 'bottom'
momentum_component = 'y'
u = 'vel_x'
v = 'vel_y'
[]
[outlet_u]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'right'
variable = vel_x
use_two_term_expansion = false
[]
[outlet_v]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'right'
variable = vel_y
use_two_term_expansion = false
[]
[symmetry-p]
type = LinearFVPressureSymmetryBC
variable = pressure
boundary = 'bottom'
HbyA_flux = 'HbyA' # Functor created in the RhieChowMassFlux UO
[]
[outlet_p]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'right'
variable = pressure
functor = 0.0
[]
[inlet_TKE]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = TKE
functor = '${k_init}'
[]
[outlet_TKE]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'right'
variable = TKE
use_two_term_expansion = false
[]
[inlet_TKED]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = TKED
functor = '${eps_init}'
[]
[outlet_TKED]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'right'
variable = TKED
use_two_term_expansion = false
[]
[walls_mu_t]
type = LinearFVTurbulentViscosityWallFunctionBC
boundary = ${walls}
variable = 'mu_t'
u = vel_x
v = vel_y
rho = ${rho}
mu = ${mu}
tke = TKE
wall_treatment = ${wall_treatment}
[]
[]
[AuxVariables]
[mu_t]
type = MooseLinearVariableFVReal
initial_condition = '${fparse rho * C_mu * ${k_init}^2 / eps_init}'
[]
[yplus]
type = MooseLinearVariableFVReal
[]
[]
[AuxKernels]
[compute_mu_t]
type = kEpsilonViscosityAux
variable = mu_t
C_mu = ${C_mu}
tke = TKE
epsilon = TKED
mu = ${mu}
rho = ${rho}
u = vel_x
v = vel_y
bulk_wall_treatment = ${bulk_wall_treatment}
walls = ${walls}
wall_treatment = ${wall_treatment}
execute_on = 'NONLINEAR'
mu_t_ratio_max = 1e20
[]
[compute_y_plus]
type = RANSYPlusAux
variable = yplus
tke = TKE
mu = ${mu}
rho = ${rho}
u = vel_x
v = vel_y
walls = ${walls}
wall_treatment = ${wall_treatment}
execute_on = 'NONLINEAR'
[]
[]
[Executioner]
type = SIMPLE
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
turbulence_systems = 'TKE_system TKED_system'
momentum_l_abs_tol = 1e-14
pressure_l_abs_tol = 1e-14
turbulence_l_abs_tol = 1e-14
momentum_l_tol = 1e-14
pressure_l_tol = 1e-14
turbulence_l_tol = 1e-14
momentum_equation_relaxation = 0.7
pressure_variable_relaxation = 0.3
turbulence_equation_relaxation = '0.2 0.2'
turbulence_field_relaxation = '0.2 0.2'
num_iterations = 1000
pressure_absolute_tolerance = 1e-12
momentum_absolute_tolerance = 1e-12
turbulence_absolute_tolerance = '1e-12 1e-12'
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
turbulence_petsc_options_iname = '-pc_type -pc_hypre_type'
turbulence_petsc_options_value = 'hypre boomeramg'
print_fields = false
continue_on_max_its = true
[]
[Outputs]
csv = true
execute_on = 'TIMESTEP_END'
[]
[AuxVariables]
[pressure_over_density]
type = MooseLinearVariableFVReal
solver_sys = TKE_system
initial_condition = ${k_init}
[]
[]
[AuxKernels]
[compute_pressure_over_density]
type = ParsedAux
variable = pressure_over_density
coupled_variables = 'pressure'
expression = 'pressure/${rho}'
[]
[]
[VectorPostprocessors]
[side_top]
type = SideValueSampler
boundary = 'top'
variable = 'vel_x vel_y pressure_over_density TKE TKED'
sort_by = 'x'
execute_on = 'timestep_end'
[]
[line_center_channel]
type = LineValueSampler
start_point = '${fparse 0.125 * L} ${fparse 0.0001} 0'
end_point = '${fparse 0.875 * L} ${fparse 0.0001} 0'
num_points = ${Mesh/gmg/nx}
variable = 'vel_x vel_y pressure_over_density TKE TKED'
sort_by = 'x'
execute_on = 'timestep_end'
[]
[line_quarter_radius_channel]
type = LineValueSampler
start_point = '${fparse 0.125 * L} ${fparse 0.5 * H} 0'
end_point = '${fparse 0.875 * L} ${fparse 0.5 * H} 0'
num_points = ${Mesh/gmg/nx}
variable = 'vel_x vel_y pressure_over_density TKE TKED'
sort_by = 'x'
execute_on = 'timestep_end'
[]
[]
(modules/navier_stokes/test/tests/finite_volume/ins/radiation_s2s/radiative_transfer_no_action_linearfv_simple.i)
[Problem]
kernel_coverage_check = false
linear_sys_names = 'energy_system u_system v_system p_system'
[]
[Mesh]
type = MeshGeneratorMesh
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '1 1.3 1.9'
ix = '5 5 5'
dy = '2 1.2 0.9'
iy = '5 5 5'
subdomain_id = '0 1 0
4 5 2
0 3 0'
[]
[inner_bottom]
type = SideSetsBetweenSubdomainsGenerator
input = cmg
primary_block = 1
paired_block = 5
new_boundary = 'inner_bottom'
[]
[inner_left]
type = SideSetsBetweenSubdomainsGenerator
input = inner_bottom
primary_block = 4
paired_block = 5
new_boundary = 'inner_left'
[]
[inner_right]
type = SideSetsBetweenSubdomainsGenerator
input = inner_left
primary_block = 2
paired_block = 5
new_boundary = 'inner_right'
[]
[inner_top]
type = SideSetsBetweenSubdomainsGenerator
input = inner_right
primary_block = 3
paired_block = 5
new_boundary = 'inner_top'
[]
[rename]
type = RenameBlockGenerator
old_block = '1 2 3 4'
new_block = '0 0 0 0'
input = inner_top
[]
[split_inner_bottom]
type = PatchSidesetGenerator
boundary = 4
n_patches = 2
partitioner = centroid
centroid_partitioner_direction = x
input = rename
[]
[split_inner_left]
type = PatchSidesetGenerator
boundary = 5
n_patches = 2
partitioner = centroid
centroid_partitioner_direction = y
input = split_inner_bottom
[]
[split_inner_right]
type = PatchSidesetGenerator
boundary = 6
n_patches = 2
partitioner = centroid
centroid_partitioner_direction = y
input = split_inner_left
[]
[split_inner_top]
type = PatchSidesetGenerator
boundary = 7
n_patches = 3
partitioner = centroid
centroid_partitioner_direction = x
input = split_inner_right
[]
[delete_others]
type = BoundaryDeletionGenerator
input = 'split_inner_top'
boundary_names = 'inner_bottom inner_top inner_left inner_right'
[]
[delete_block5]
type = BlockDeletionGenerator
input = 'delete_others'
block = '5'
[]
[]
[Variables]
[temperature]
type = MooseLinearVariableFVReal
solver_sys = 'energy_system'
initial_condition = 400
[]
[vel_x]
type = MooseLinearVariableFVReal
solver_sys = 'u_system'
initial_condition = 0
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = 'v_system'
initial_condition = 0
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = 'p_system'
initial_condition = 0
[]
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = 1
p_diffusion_kernel = p_diffusion
[]
[]
[LinearFVKernels]
[temp_conduction]
type = LinearFVDiffusion
diffusion_coeff = 5.
variable = temperature
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[]
[UserObjects]
[gray_lambert]
type = ViewFactorObjectSurfaceRadiation
boundary = 'inner_bottom_0 inner_bottom_1
inner_left_0 inner_left_1
inner_right_0 inner_right_1
inner_top_0 inner_top_1 inner_top_2'
fixed_temperature_boundary = 'inner_bottom_0 inner_bottom_1'
fixed_boundary_temperatures = '1200 1200'
adiabatic_boundary = 'inner_top_0 inner_top_1 inner_top_2'
emissivity = '0.9 0.9
0.8 0.8
0.4 0.4
1 1 1'
temperature = temperature
view_factor_object_name = view_factor
execute_on = 'LINEAR TIMESTEP_BEGIN TIMESTEP_END NONLINEAR'
[]
[view_factor]
type = UnobstructedPlanarViewFactor
boundary = 'inner_bottom_0 inner_bottom_1
inner_left_0 inner_left_1
inner_right_0 inner_right_1
inner_top_0 inner_top_1 inner_top_2'
normalize_view_factor = true
execute_on = 'INITIAL'
[]
[]
[LinearFVBCs]
[left]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = temperature
boundary = 'left'
functor = 600.
[]
[right]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = temperature
boundary = 'right'
functor = 300.
[]
[radiation]
type = LinearFVGrayLambertBC
variable = temperature
temperature_radiation = temperature
coeff_diffusion = 5.
surface_radiation_object_name = gray_lambert
boundary = 'inner_left_0 inner_left_1
inner_right_0 inner_right_1'
[]
[]
[Executioner]
type = SIMPLE
num_iterations = 2000
should_solve_momentum = false
should_solve_pressure = false
energy_system = 'energy_system'
energy_l_abs_tol = 1e-11
energy_l_tol = 1e-11
energy_equation_relaxation = 0.8
energy_field_relaxation = 0.8
energy_absolute_tolerance = 1e-10
energy_petsc_options_iname = '-pc_type -pc_hypre_type'
energy_petsc_options_value = 'hypre boomeramg'
print_fields = false
continue_on_max_its = true
[Quadrature]
side_order = SECOND
[]
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'p_system'
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/cht/conjugate_heat_transfer/cht_neu-dir.i)
### benchmark sources:
### https://doi.org/10.1016/j.compfluid.2018.06.016
### https://doi.org/10.1016/0017-9310(74)90087-8
b = 0.01 # plate thickness
l = 0.2 # plate length
nxi = 24 # nx in the inlet/entrance region
nyf = 18 # ny in fluid
nxf = 24 # nx in the main fluid region
nys = 8 # ny in the solid domain
fx1_bias = 1.00 # bdry layer bias - fluid
fx2_bias = '${fparse 1.0/1.00}' # bdry layer bias - solid
fy_bias = 1.20 # bdry layer bias - fluid
sy_bias = '${fparse 1.0/1.05}' # bdry layer bias - solid
k_s = 0.2876
rho = 0.3525
mu = 3.95e-5
k = 0.06808
cp = 1142.6
vin = 12.0
Tin = 1000.0
T_s_bottom = 600.0
P_out = 1.03e5
h_s = 0.0
advected_interp_method = 'upwind'
[Mesh]
[fluid_channel]
type = GeneratedMeshGenerator
dim = 2
nx = ${nxf}
ny = ${nyf}
xmin = 0
xmax = ${l}
ymin = 0
ymax = '${fparse 10.0*b}'
subdomain_ids = '1'
subdomain_name = 'fluid'
bias_x = '${fx1_bias}'
bias_y = '${fparse fy_bias}'
boundary_name_prefix = 'fluid'
[]
[solid_base]
type = GeneratedMeshGenerator
dim = 2
nx = ${nxf}
ny = ${nys}
xmin = 0
xmax = ${l}
ymin = '${fparse -b}'
ymax = 0
subdomain_ids = '2'
subdomain_name = 'solid'
bias_x = ${fx1_bias}
bias_y = '${fparse sy_bias}'
boundary_id_offset = 10
boundary_name_prefix = 'solid'
[]
[entrance]
type = GeneratedMeshGenerator
dim = 2
nx = '${fparse 2.0*nxi}'
ny = ${nyf}
xmin = '${fparse -2.0*l}'
xmax = 0
ymin = 0
ymax = '${fparse 10.0*b}'
subdomain_ids = '0'
subdomain_name = 'entrance'
bias_x = ${fx2_bias}
bias_y = '${fparse fy_bias}'
boundary_id_offset = 20
boundary_name_prefix = 'ent'
[]
[smg]
type = StitchedMeshGenerator
inputs = 'entrance fluid_channel solid_base'
stitch_boundaries_pairs = 'ent_right fluid_left;
fluid_bottom solid_top'
prevent_boundary_ids_overlap = false
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = 'smg'
primary_block = 'fluid'
paired_block = 'solid'
new_boundary = interface
[]
[symmetry_transform]
type = SymmetryTransformGenerator
input = interface
mirror_point = '0 0 0'
mirror_normal_vector = '0 1 0'
[]
inactive = 'symmetry_transform'
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system energy_system solid_energy_system'
previous_nl_solution_required = true
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
block = '0 1'
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = ${vin}
solver_sys = u_system
block = '0 1'
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
initial_condition = 0.0
block = '0 1'
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
initial_condition = ${P_out}
block = '0 1'
[]
[T_fluid]
type = MooseLinearVariableFVReal
solver_sys = energy_system
initial_condition = ${Tin}
block = '0 1'
[]
[T_solid]
type = MooseLinearVariableFVReal
solver_sys = solid_energy_system
initial_condition = ${T_s_bottom}
block = 2
[]
[]
[FVInterpolationMethods]
[upwind]
type = FVAdvectedUpwind
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[h_advection]
type = LinearFVEnergyAdvection
variable = T_fluid
advected_quantity = temperature
cp = ${cp}
advected_interp_method = ${advected_interp_method}
rhie_chow_user_object = 'rc'
[]
[conduction]
type = LinearFVDiffusion
variable = T_fluid
diffusion_coeff = ${k}
use_nonorthogonal_correction = false
[]
[solid-conduction]
type = LinearFVDiffusion
variable = T_solid
diffusion_coeff = ${k_s}
use_nonorthogonal_correction = false
[]
[]
[LinearFVBCs]
# velocity BCs
[inlet-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'ent_left'
variable = vel_x
functor = ${vin}
[]
[inlet-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'ent_left'
variable = vel_y
functor = '0.000'
[]
[walls-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'ent_bottom interface'
variable = vel_x
functor = 0.0
[]
[walls-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'ent_bottom interface'
variable = vel_y
functor = 0.0
[]
[outlet_p]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'fluid_right'
variable = pressure
functor = ${P_out}
[]
[outlet_u]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'fluid_right'
variable = vel_x
use_two_term_expansion = false
[]
[outlet_v]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'fluid_right'
variable = vel_y
use_two_term_expansion = false
[]
# freestream BCs for top of fluid domain
[freestream_u]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'fluid_top ent_top'
variable = vel_x
use_two_term_expansion = false
[]
[freestream_v]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'fluid_top ent_top'
variable = vel_y
use_two_term_expansion = false
[]
[freestream_p]
type = LinearFVAdvectionDiffusionFunctorNeumannBC
boundary = 'fluid_top ent_top'
variable = pressure
functor = 0
[]
# temperature BCs
[inlet_T]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T_fluid
functor = ${Tin}
boundary = 'ent_left'
[]
[heated_wall_solid]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T_solid
functor = ${T_s_bottom}
boundary = 'solid_bottom'
[]
[insulated_fluid]
type = LinearFVAdvectionDiffusionFunctorNeumannBC
variable = T_fluid
functor = 0
boundary = 'ent_bottom ent_top fluid_top'
[]
[insulated_solid]
type = LinearFVAdvectionDiffusionFunctorNeumannBC
variable = T_solid
functor = 0
boundary = 'solid_left solid_right'
[]
[outlet_T]
type = LinearFVAdvectionDiffusionOutflowBC
variable = T_fluid
use_two_term_expansion = false
boundary = 'fluid_right'
[]
[fluid_solid]
type = LinearFVDirichletCHTBC
variable = T_fluid
boundary = interface
functor = interface_temperature_to_fluid_interface
[]
[solid_fluid]
type = LinearFVRobinCHTBC
variable = T_solid
boundary = interface
h = ${h_s}
thermal_conductivity = ${k_s}
incoming_flux = heat_flux_to_solid_interface
surface_temperature = interface_temperature_to_solid_interface
[]
[]
[FunctorMaterials]
[rhocpT]
property_name = 'rhocpT'
type = ParsedFunctorMaterial
functor_names = 'T_fluid'
expression = '${rho}*${cp}*T_fluid'
[]
[]
[Postprocessors]
[h_in]
type = VolumetricFlowRate
boundary = 'ent_left'
vel_x = vel_x
vel_y = vel_y
rhie_chow_user_object = rc
advected_quantity = 'rhocpT'
subtract_mesh_velocity = false
[]
[h_out]
type = VolumetricFlowRate
boundary = 'fluid_right fluid_top ent_top interface'
vel_x = vel_x
vel_y = vel_y
rhie_chow_user_object = rc
advected_quantity = 'rhocpT'
advected_interp_method = upwind
subtract_mesh_velocity = false
[]
[]
[VectorPostprocessors]
[y_vs_ts]
type = LineValueSampler
variable = 'T_solid'
start_point = '0.05 -1e-9 0' # making sure we are always in the domain
end_point = '0.05 ${fparse -b+1e-9} 0'
num_points = 8
sort_by = id
warn_discontinuous_face_values = false
[]
[y_vs_tf]
type = LineValueSampler
variable = 'T_fluid'
start_point = '0.05 1e-9 0' # making sure we are always in the domain
end_point = '0.05 ${fparse b-1e-9} 0'
num_points = 12
sort_by = id
warn_discontinuous_face_values = false
[]
[]
[Executioner]
type = SIMPLE
num_iterations = 1000
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
rhie_chow_user_object = 'rc'
momentum_l_abs_tol = 1e-10
pressure_l_abs_tol = 1e-10
momentum_l_tol = 0
pressure_l_tol = 0
momentum_equation_relaxation = 0.9
pressure_variable_relaxation = 0.3
momentum_absolute_tolerance = 1e-7
pressure_absolute_tolerance = 1e-7
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
energy_system = 'energy_system'
solid_energy_system = 'solid_energy_system'
energy_l_abs_tol = 1e-10
solid_energy_l_abs_tol = 1e-10
energy_l_tol = 0
solid_energy_l_tol = 0
energy_equation_relaxation = 1.0
energy_absolute_tolerance = 1e-7
solid_energy_absolute_tolerance = 1e-7
energy_petsc_options_iname = '-pc_type -pc_hypre_type'
energy_petsc_options_value = 'hypre boomeramg'
solid_energy_petsc_options_iname = '-pc_type -pc_hypre_type'
solid_energy_petsc_options_value = 'hypre boomeramg'
cht_interfaces = 'interface'
cht_solid_flux_relaxation = 0.4
cht_fluid_flux_relaxation = 0.4
cht_solid_temperature_relaxation = 0.4
cht_fluid_temperature_relaxation = 0.4
max_cht_fpi = 3
print_fields = false
[]
[Outputs]
csv = true
execute_on = timestep_end
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/2d-heated/fluid.i)
mu = 2.6
rho = 1.0
advected_interp_method = 'upwind'
cp = 1000
k = 1
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '0.25 0.25'
dy = '0.2'
ix = '5 5'
iy = '5'
subdomain_id = '0 1'
[]
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system energy_system'
previous_nl_solution_required = true
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = 0.5
solver_sys = u_system
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
initial_condition = 0.0
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
initial_condition = 0.2
[]
[T_fluid]
type = MooseLinearVariableFVReal
solver_sys = energy_system
initial_condition = 300
[]
[]
[FVInterpolationMethods]
[upwind]
type = FVAdvectedUpwind
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[h_advection]
type = LinearFVEnergyAdvection
variable = T_fluid
advected_quantity = temperature
cp = ${cp}
advected_interp_method = ${advected_interp_method}
rhie_chow_user_object = 'rc'
[]
[conduction]
type = LinearFVDiffusion
variable = T_fluid
diffusion_coeff = ${k}
use_nonorthogonal_correction = false
[]
[heat_exchange]
type = LinearFVVolumetricHeatTransfer
variable = T_fluid
h_solid_fluid = 100
T_fluid = T_fluid
T_solid = T_solid
is_solid = false
block = 1
[]
[]
[FunctorMaterials]
[constant_functors]
type = GenericFunctorMaterial
prop_names = 'cp'
prop_values = '${cp}'
[]
[]
[LinearFVBCs]
[inlet-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_x
functor = '1.1'
[]
[inlet-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_y
functor = '0.0'
[]
[walls-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom'
variable = vel_x
functor = 0.0
[]
[walls-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom'
variable = vel_y
functor = 0.0
[]
[outlet_p]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'right'
variable = pressure
functor = 1.4
[]
[outlet_u]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_x
use_two_term_expansion = false
boundary = right
[]
[outlet_v]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_y
use_two_term_expansion = false
boundary = right
[]
[inlet_wall_T]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T_fluid
functor = 300
boundary = 'left top bottom'
[]
[outlet_T]
type = LinearFVAdvectionDiffusionOutflowBC
variable = T_fluid
use_two_term_expansion = false
boundary = right
[]
[]
[AuxVariables]
[T_solid]
type = MooseLinearVariableFVReal
initial_condition = 300
block = 1
[]
[]
[MultiApps]
inactive = 'solid'
[solid]
type = FullSolveMultiApp
input_files = solid.i
execute_on = timestep_begin
no_restore = true
[]
[]
[Transfers]
inactive = 'from_solid to_solid'
[from_solid]
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = solid
source_variable = 'T_solid'
variable = 'T_solid'
execute_on = timestep_begin
from_blocks = 1
[]
[to_solid]
type = MultiAppGeneralFieldShapeEvaluationTransfer
to_multi_app = solid
source_variable = 'T_fluid'
variable = 'T_fluid'
execute_on = timestep_begin
to_blocks = 1
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-13
pressure_l_abs_tol = 1e-13
energy_l_abs_tol = 1e-13
momentum_l_tol = 0
pressure_l_tol = 0
energy_l_tol = 0
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
energy_system = 'energy_system'
momentum_equation_relaxation = 0.8
energy_equation_relaxation = 0.9
pressure_variable_relaxation = 0.3
num_iterations = 20
pressure_absolute_tolerance = 1e-10
momentum_absolute_tolerance = 1e-10
energy_absolute_tolerance = 1e-10
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
energy_petsc_options_iname = '-pc_type -pc_hypre_type'
energy_petsc_options_value = 'hypre boomeramg'
print_fields = false
continue_on_max_its = true
[]
[Outputs]
exodus = true
execute_on = timestep_end
[]
(modules/navier_stokes/test/tests/finite_volume/ins/natural_convection/linear_segregated/2d/diff_heated_cavity_linear_segregated.i)
################################################################################
# MATERIAL PROPERTIES
################################################################################
rho = 3279.
T_0 = 875.0
mu = 1.
k_cond = 38.0
cp = 640.
alpha = 3.26e-5
walls = 'right left top bottom'
[GlobalParams]
rhie_chow_user_object = 'ins_rhie_chow_interpolator'
advected_interp_method = 'upwind'
u = vel_x
v = vel_y
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system energy_system'
previous_nl_solution_required = true
[]
################################################################################
# GEOMETRY
################################################################################
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 15
ny = 15
[]
[]
################################################################################
# EQUATIONS: VARIABLES, KERNELS & BCS
################################################################################
[UserObjects]
[ins_rhie_chow_interpolator]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
solver_sys = u_system
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
[]
[pressure]
type = MooseLinearVariableFVReal
initial_condition = 0
solver_sys = pressure_system
[]
[T_fluid]
type = MooseLinearVariableFVReal
solver_sys = energy_system
initial_condition = 875
[]
[]
[FVInterpolationMethods]
[upwind]
type = FVAdvectedUpwind
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = upwind
mu = ${mu}
momentum_component = 'x'
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[u_buoyancy]
type = LinearFVMomentumBoussinesq
variable = vel_x
T_fluid = T_fluid
gravity = '0 -9.8 0'
rho = ${rho}
ref_temperature = ${T_0}
alpha_name = ${alpha}
momentum_component = 'x'
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = upwind
mu = ${mu}
momentum_component = 'y'
use_nonorthogonal_correction = false
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[v_buoyancy]
type = LinearFVMomentumBoussinesq
variable = vel_y
T_fluid = T_fluid
gravity = '0 -9.81 0'
rho = ${rho}
ref_temperature = ${T_0}
alpha_name = ${alpha}
momentum_component = 'y'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = false
[]
####### FUEL ENERGY EQUATION #######
[heat_advection]
type = LinearFVEnergyAdvection
variable = T_fluid
advected_quantity = temperature
cp = ${cp}
[]
[conduction]
type = LinearFVDiffusion
variable = T_fluid
diffusion_coeff = ${fparse k_cond}
[]
[]
[LinearFVBCs]
[no-slip-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = vel_x
boundary = ${walls}
functor = 0
[]
[no-slip-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = vel_y
boundary = ${walls}
functor = 0
[]
[T_cold]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T_fluid
boundary = 'right'
functor = 870.0
[]
[T_hot]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T_fluid
boundary = 'left'
functor = 880.0
[]
[T_all]
type = LinearFVAdvectionDiffusionExtrapolatedBC
variable = T_fluid
boundary = 'top bottom'
use_two_term_expansion = false
[]
[pressure]
type = LinearFVPressureFluxBC
boundary = 'top bottom left right'
variable = pressure
HbyA_flux = HbyA
Ainv = Ainv
u = vel_x
v = vel_y
rho = ${rho}
[]
[]
[FunctorMaterials]
[constant_functors]
type = GenericFunctorMaterial
prop_names = 'cp alpha_b'
prop_values = '${cp} ${alpha}'
[]
[]
################################################################################
# EXECUTION / SOLVE
################################################################################
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-11
pressure_l_abs_tol = 1e-11
energy_l_abs_tol = 1e-11
momentum_l_tol = 0
pressure_l_tol = 0
energy_l_tol = 0
rhie_chow_user_object = 'ins_rhie_chow_interpolator'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
energy_system = 'energy_system'
momentum_equation_relaxation = 0.7
pressure_variable_relaxation = 0.3
energy_equation_relaxation = 0.9
num_iterations = 1500
pressure_absolute_tolerance = 1e-8
momentum_absolute_tolerance = 1e-8
energy_absolute_tolerance = 1e-8
print_fields = false
momentum_l_max_its = 300
pin_pressure = true
pressure_pin_value = 0.0
pressure_pin_point = '0.5 0.0 0.0'
# momentum_petsc_options = '-ksp_monitor'
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
energy_petsc_options_iname = '-pc_type -pc_hypre_type'
energy_petsc_options_value = 'hypre boomeramg'
continue_on_max_its = true
[]
################################################################################
# SIMULATION OUTPUTS
################################################################################
[Outputs]
#exodus = true
[out]
type = Exodus
file_base = 'diff_heated_cavity_linear_segregated_out'
[]
[]
(modules/navier_stokes/test/tests/finite_volume/ins/lid-driven/linear-segregated/lid-driven-segregated.i)
mu = .01
rho = 1
advected_interp_method = 'average'
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = .1
ymin = 0
ymax = .1
nx = 3
ny = 3
[]
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system'
previous_nl_solution_required = true
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = 0.0
solver_sys = u_system
[]
[vel_y]
type = MooseLinearVariableFVReal
initial_condition = 0.0
solver_sys = v_system
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
initial_condition = 0.2
[]
[]
[FVInterpolationMethods]
[average]
type = FVGeometricAverage
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[]
[LinearFVBCs]
[top_x]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = vel_x
boundary = 'top'
functor = 1
[]
[no_slip_x]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = vel_x
boundary = 'left right bottom'
functor = 0
[]
[no_slip_y]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = vel_y
boundary = 'left right top bottom'
functor = 0
[]
[pressure-extrapolation]
type = LinearFVExtrapolatedPressureBC
boundary = 'left right top bottom'
variable = pressure
use_two_term_expansion = true
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-10
pressure_l_abs_tol = 1e-10
momentum_l_tol = 0
pressure_l_tol = 0
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
momentum_equation_relaxation = 0.8
pressure_variable_relaxation = 0.3
num_iterations = 500
pressure_absolute_tolerance = 1e-10
momentum_absolute_tolerance = 1e-10
# The momentum systems are diagonally dominant and converge in a few Krylov iterations, so a cheap
# SOR preconditioner beats building a full AMG hierarchy (whose setup would dominate the solve).
momentum_petsc_options_iname = '-pc_type'
momentum_petsc_options_value = 'sor'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
# The pressure Poisson operator barely changes between SIMPLE iterations, so we only rebuild its
# AMG preconditioner every few iterations and reuse it in between, skipping most of the (expensive)
# AMG setup. Use a smaller value if the pressure operator changes quickly during the solve.
pressure_pc_recompute_frequency = 20
print_fields = false
pin_pressure = true
pressure_pin_value = 0.0
pressure_pin_point = '0.05 0.05 0.0'
[]
[Outputs]
exodus = true
csv = false
perf_graph = false
print_nonlinear_residuals = false
print_linear_residuals = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/turbulence/channel/linear-segregated/channel_heated-physics.i)
!include header_and_mesh.i
q = 5
cp = 300
[Problem]
linear_sys_names = 'u_system v_system pressure_system energy_system TKE_system TKED_system'
previous_nl_solution_required = true
[]
# These are only needed when solving for enthalpy
# Alternatively, a FluidProperties user object may be used
[FunctorMaterials]
active = 'rho_h'
# These two are for solving for enthalpy without using a FluidProperties object
[h_from_T]
type = ParsedFunctorMaterial
expression = '${cp} * T_fluid'
functor_names = 'T_fluid'
property_name = 'h_from_p_T_functor'
[]
[T_from_h]
type = ParsedFunctorMaterial
expression = 'h / ${cp}'
functor_names = 'h'
property_name = 'T_from_p_h_functor'
[]
# This one is for computing the enthalpy density without using a FluidProperties object
[rho_h]
type = ParsedFunctorMaterial
expression = '${rho} * ${cp} * T_fluid'
functor_names = 'T_fluid'
property_name = 'rho_h'
[]
[]
[Physics]
[NavierStokes]
[FlowSegregated/flow]
velocity_variable = 'vel_x vel_y'
pressure_variable = 'pressure'
# Initial conditions
initial_velocity = '${bulk_u} 0 0'
initial_pressure = '1e-8'
# Material properties
density = ${rho}
dynamic_viscosity = ${mu}
# Boundary conditions
inlet_boundaries = 'left'
momentum_inlet_types = 'fixed-velocity'
momentum_inlet_functors = '${bulk_u} 0'
wall_boundaries = 'top bottom'
momentum_wall_types = 'noslip noslip'
outlet_boundaries = 'right'
momentum_outlet_types = 'fixed-pressure'
pressure_functors = '0'
# Numerical parameters
include_deviatoric_stress = true
orthogonality_correction = false
pressure_two_term_bc_expansion = false
momentum_two_term_bc_expansion = false
momentum_advection_interpolation = ${advected_interp_method}
system_names = 'u_system v_system pressure_system'
[]
[FluidHeatTransferSegregated/energy]
# turbulence Physics coupling picked up automatically
initial_temperature = 0
thermal_conductivity = 1.1
specific_heat = ${cp}
energy_inlet_types = 'fixed-temperature'
energy_inlet_functors = '0'
energy_wall_types = 'heatflux heatflux'
energy_wall_functors = '0 0'
external_heat_source = '${q}'
[]
[TurbulenceSegregated/k-epsilon]
# Model
turbulence_handling = 'k-epsilon'
tke_name = TKE
tked_name = TKED
system_names = 'TKE_system TKED_system'
fluid_heat_transfer_physics = energy
initial_tke = ${k_init}
initial_tked = ${eps_init}
# Model parameters
mu_t_ratio_max = 1e20
sigma_k = ${sigma_k}
sigma_eps = ${sigma_eps}
C_pl = 1e10
C1_eps = ${C1_eps}
C2_eps = ${C2_eps}
Pr_t = 0.9
k_t_as_aux_variable = true
turbulence_walls = ${walls}
wall_treatment_eps = ${wall_treatment}
bulk_wall_treatment = ${bulk_wall_treatment}
use_nonorthogonal_correction = false
[]
[]
[]
# Boundary conditions are not implemented for turbulent quantities at this time
[LinearFVBCs]
[inlet_TKE]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = TKE
functor = '${k_init}'
[]
[outlet_TKE]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'right'
variable = TKE
use_two_term_expansion = false
[]
[inlet_TKED]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = TKED
functor = '${eps_init}'
[]
[outlet_TKED]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'right'
variable = TKED
use_two_term_expansion = false
[]
[]
[Executioner]
type = SIMPLE
rhie_chow_user_object = 'ins_rhie_chow_interpolator'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
energy_system = 'energy_system'
turbulence_systems = 'TKE_system TKED_system'
momentum_l_abs_tol = 1e-14
pressure_l_abs_tol = 1e-14
turbulence_l_abs_tol = 1e-14
energy_l_abs_tol = 1e-14
momentum_l_tol = 1e-14
pressure_l_tol = 1e-14
energy_l_tol = 1e-14
turbulence_l_tol = 1e-14
momentum_equation_relaxation = 0.7
pressure_variable_relaxation = 0.3
energy_equation_relaxation = 0.8
turbulence_equation_relaxation = '0.2 0.2'
turbulence_field_relaxation = '0.2 0.2'
num_iterations = 1000
pressure_absolute_tolerance = 1e-12
momentum_absolute_tolerance = 1e-12
energy_absolute_tolerance = 1e-12
turbulence_absolute_tolerance = '1e-12 1e-12'
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
energy_petsc_options_iname = '-pc_type -pc_hypre_type'
energy_petsc_options_value = 'hypre boomeramg'
turbulence_petsc_options_iname = '-pc_type -pc_hypre_type'
turbulence_petsc_options_value = 'hypre boomeramg'
print_fields = false
continue_on_max_its = true
[]
variables_to_sample = 'vel_x vel_y pressure T_fluid TKE TKED'
!include postprocessing.i
# More postprocessor for temperature
[Postprocessors]
[outlet_T]
type = SideAverageValue
boundary = right
variable = T_fluid
[]
[Q_out]
type = VolumetricFlowRate
boundary = 'right'
vel_x = 'vel_x'
vel_y = 'vel_y'
advected_quantity = 'rho_h'
rhie_chow_user_object = 'ins_rhie_chow_interpolator'
[]
[balance_percent]
type = ParsedPostprocessor
expression = '100 * (0 - Q_out + 2 * ${L} * ${H} * ${q}) / Q_out'
pp_names = 'Q_out'
[]
[]
(modules/navier_stokes/test/tests/finite_volume/ins/turbulence/bfs/linear-segregated/BFS_ERCOFTAC.i)
Re = 5100
rho = 1.0
bulk_u = 1.0
H = 1.0
mu = '${fparse rho * bulk_u * H / Re}'
advected_interp_method = 'upwind'
### k-epsilon Closure Parameters ###
sigma_k = 1.0
sigma_eps = 1.3
C1_eps = 1.44
C2_eps = 1.92
C_mu = 0.09
### Initial and Boundary Conditions ###
intensity = 0.01
k_init = '${fparse 1.5*(intensity * bulk_u)^2}'
eps_init = '${fparse C_mu^0.75 * k_init^1.5 / H}'
### Modeling parameters ###
bulk_wall_treatment = false
walls = 'bottom wall-side top'
wall_treatment = 'eq_incremental' # Options: eq_newton, eq_incremental, eq_linearized, neq
[Mesh]
[gen]
type = CartesianMeshGenerator
dim = 2
dx = '${fparse 10.0*H} ${fparse 20.0*H}'
dy = '${H} ${fparse 5*H}'
ix = '8 16'
iy = '2 8'
subdomain_id = '
2 1
1 1
'
[]
[corner_walls]
type = SideSetsBetweenSubdomainsGenerator
input = gen
primary_block = '1'
paired_block = '2'
new_boundary = 'wall-side'
[]
[delete_bottom]
type = BlockDeletionGenerator
input = corner_walls
block = '2'
[]
# Prevent test diffing on distributed parallel element numbering
allow_renumbering = false
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system TKE_system TKED_system'
previous_nl_solution_required = true
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = ${bulk_u}
solver_sys = u_system
[]
[vel_y]
type = MooseLinearVariableFVReal
initial_condition = 0
solver_sys = v_system
[]
[pressure]
type = MooseLinearVariableFVReal
initial_condition = 1e-8
solver_sys = pressure_system
[]
[TKE]
type = MooseLinearVariableFVReal
solver_sys = TKE_system
initial_condition = ${k_init}
[]
[TKED]
type = MooseLinearVariableFVReal
solver_sys = TKED_system
initial_condition = ${eps_init}
[]
[]
[FVInterpolationMethods]
[upwind]
type = FVAdvectedUpwind
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = ${advected_interp_method}
mu = 'mu_t'
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
use_deviatoric_terms = yes
[]
[u_diffusion]
type = LinearFVDiffusion
variable = vel_x
diffusion_coeff = ${mu}
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = ${advected_interp_method}
mu = 'mu_t'
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
use_deviatoric_terms = yes
[]
[v_diffusion]
type = LinearFVDiffusion
variable = vel_y
diffusion_coeff = ${mu}
use_nonorthogonal_correction = false
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[TKE_advection]
type = LinearFVTurbulentAdvection
variable = TKE
advected_interp_method_name = ${advected_interp_method}
[]
[TKE_diffusion]
type = LinearFVTurbulentDiffusion
variable = TKE
diffusion_coeff = ${mu}
use_nonorthogonal_correction = false
[]
[TKE_turb_diffusion]
type = LinearFVTurbulentDiffusion
variable = TKE
diffusion_coeff = 'mu_t'
scaling_coeff = ${sigma_k}
use_nonorthogonal_correction = false
[]
[TKE_source_sink]
type = LinearFVTKESourceSink
variable = TKE
u = vel_x
v = vel_y
epsilon = TKED
rho = ${rho}
mu = ${mu}
mu_t = 'mu_t'
walls = ${walls}
wall_treatment = ${wall_treatment}
C_pl = 1e10
[]
[TKED_advection]
type = LinearFVTurbulentAdvection
variable = TKED
advected_interp_method_name = ${advected_interp_method}
walls = ${walls}
[]
[TKED_diffusion]
type = LinearFVTurbulentDiffusion
variable = TKED
diffusion_coeff = ${mu}
use_nonorthogonal_correction = false
walls = ${walls}
[]
[TKED_turb_diffusion]
type = LinearFVTurbulentDiffusion
variable = TKED
diffusion_coeff = 'mu_t'
scaling_coeff = ${sigma_eps}
use_nonorthogonal_correction = false
walls = ${walls}
[]
[TKED_source_sink]
type = LinearFVTKEDSourceSink
variable = TKED
u = vel_x
v = vel_y
tke = TKE
rho = ${rho}
mu = ${mu}
mu_t = 'mu_t'
C1_eps = ${C1_eps}
C2_eps = ${C2_eps}
walls = ${walls}
wall_treatment = ${wall_treatment}
C_pl = 1e10
[]
[]
[LinearFVBCs]
[inlet-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_x
functor = '${bulk_u}'
[]
[inlet-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_y
functor = '0.0'
[]
[inlet_TKE]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = TKE
functor = '${k_init}'
[]
[inlet_TKED]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = TKED
functor = '${eps_init}'
[]
[outlet_p]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'right'
variable = pressure
functor = 0.0
[]
[outlet_u]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'right'
variable = vel_x
use_two_term_expansion = false
[]
[outlet_v]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'right'
variable = vel_y
use_two_term_expansion = false
[]
[outlet_TKE]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'right'
variable = TKE
use_two_term_expansion = false
[]
[outlet_TKED]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'right'
variable = TKED
use_two_term_expansion = false
[]
[walls-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = ${walls}
variable = vel_x
functor = 0.0
[]
[walls-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = ${walls}
variable = vel_y
functor = 0.0
[]
[walls_mu_t]
type = LinearFVTurbulentViscosityWallFunctionBC
boundary = ${walls}
variable = 'mu_t'
u = vel_x
v = vel_y
rho = ${rho}
mu = ${mu}
tke = TKE
wall_treatment = ${wall_treatment}
[]
[]
[AuxVariables]
[mu_t]
type = MooseLinearVariableFVReal
initial_condition = '${fparse rho * C_mu * ${k_init}^2 / eps_init}'
[]
[yplus]
type = MooseLinearVariableFVReal
[]
[mu_eff]
type = MooseLinearVariableFVReal
initial_condition = '${fparse rho * C_mu * ${k_init}^2 / eps_init + mu}'
[]
[]
[AuxKernels]
[compute_mu_t]
type = kEpsilonViscosityAux
variable = mu_t
C_mu = ${C_mu}
tke = TKE
epsilon = TKED
mu = ${mu}
rho = ${rho}
u = vel_x
v = vel_y
bulk_wall_treatment = ${bulk_wall_treatment}
walls = ${walls}
wall_treatment = ${wall_treatment}
execute_on = 'NONLINEAR'
mu_t_ratio_max = 1e20
[]
[compute_y_plus]
type = RANSYPlusAux
variable = yplus
tke = TKE
mu = ${mu}
rho = ${rho}
u = vel_x
v = vel_y
walls = ${walls}
wall_treatment = ${wall_treatment}
execute_on = 'NONLINEAR'
[]
[compute_mu_eff]
type = ParsedAux
variable = 'mu_eff'
coupled_variables = 'mu_t'
expression = 'mu_t + ${mu}'
execute_on = 'NONLINEAR'
[]
[]
[Executioner]
type = SIMPLE
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
turbulence_systems = 'TKE_system TKED_system'
momentum_l_abs_tol = 1e-14
pressure_l_abs_tol = 1e-14
turbulence_l_abs_tol = 1e-14
momentum_l_tol = 1e-14
pressure_l_tol = 1e-14
turbulence_l_tol = 1e-14
momentum_equation_relaxation = 0.7
pressure_variable_relaxation = 0.3
turbulence_equation_relaxation = '0.5 0.5'
num_iterations = 1000
pressure_absolute_tolerance = 1e-12
momentum_absolute_tolerance = 1e-12
turbulence_absolute_tolerance = '1e-12 1e-12'
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
turbulence_petsc_options_iname = '-pc_type -pc_hypre_type'
turbulence_petsc_options_value = 'hypre boomeramg'
print_fields = false
continue_on_max_its = true
[]
[Outputs]
csv = true
[console]
type = Console
outlier_variable_norms = false
[]
[]
[VectorPostprocessors]
[side_bottom]
type = SideValueSampler
boundary = 'bottom'
variable = 'vel_x vel_y pressure TKE TKED'
sort_by = 'x'
execute_on = 'timestep_end'
[]
[side_top]
type = SideValueSampler
boundary = 'top'
variable = 'vel_x vel_y pressure TKE TKED'
sort_by = 'x'
execute_on = 'timestep_end'
[]
[line_entry_channel_wall]
type = LineValueSampler
start_point = '${fparse 0.5 * H} ${fparse 1.00001 * H} 0'
end_point = '${fparse 29.5 * H} ${fparse 1.00001 * H} 0'
num_points = 24
variable = 'vel_x vel_y pressure TKE TKED'
sort_by = 'x'
execute_on = 'timestep_end'
[]
[line_quarter_entry_channel]
type = LineValueSampler
start_point = '${fparse 0.5 * H} ${fparse 2.25001 * H} 0'
end_point = '${fparse 29.5 * H} ${fparse 2.25001 * H} 0'
num_points = 24
variable = 'vel_x vel_y pressure TKE TKED'
sort_by = 'x'
execute_on = 'timestep_end'
[]
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/2d/pressure-drop-advection.i)
rho = 1
u_inlet = 1
height = 1
mu = 0.02
nx = 12
ny = 3
advected_interp_method = 'average'
momentum_relaxation = 0.5
pressure_relaxation = 1.0
# Reference pressure drop computed from this input with advected_interp_method = average,
# nx = 192, ny = 48, use_two_term_expansion = true on the velocity outflow and
# pressure extrapolation BCs, and pressure/momentum absolute tolerances of 1e-10. The
# convergence test compares the absolute pressure-drop deviation from this stored
# refined value.
reference_pressure_drop = 0.8386252
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 5
ymin = 0
ymax = ${height}
nx = ${nx}
ny = ${ny}
[]
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system'
previous_nl_solution_required = true
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
pressure_projection_method = CONSISTENT
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = ${u_inlet}
solver_sys = u_system
[]
[vel_y]
type = MooseLinearVariableFVReal
initial_condition = 0
solver_sys = v_system
[]
[pressure]
type = MooseLinearVariableFVReal
initial_condition = 0
solver_sys = pressure_system
[]
[]
[Functions]
[inlet_u]
type = ParsedFunction
expression = '30 * ${u_inlet} * y^2 * (${height} - y)^2 / ${height}^4'
[]
[]
[FVInterpolationMethods]
[average]
type = FVGeometricAverage
[]
[upwind]
type = FVAdvectedUpwind
[]
[vanLeer]
type = FVAdvectedVanLeerWeightBased
[]
[min_mod]
type = FVAdvectedMinmodWeightBased
[]
[venkatakrishnan]
type = FVAdvectedMUSCLDeferredCorrection
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[]
[LinearFVBCs]
[inlet-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_x
functor = inlet_u
[]
[inlet-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_y
functor = 0
[]
[walls-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom'
variable = vel_x
functor = 0
[]
[walls-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom'
variable = vel_y
functor = 0
[]
[outlet_p]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'right'
variable = pressure
functor = 0
[]
[inlet_p]
type = LinearFVExtrapolatedPressureBC
boundary = 'left'
variable = pressure
use_two_term_expansion = true
[]
[walls_p]
type = LinearFVExtrapolatedPressureBC
boundary = 'top bottom'
variable = pressure
use_two_term_expansion = true
[]
[outlet_u]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_x
use_two_term_expansion = true
boundary = right
[]
[outlet_v]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_y
use_two_term_expansion = true
boundary = right
[]
[]
[Executioner]
type = SIMPLE
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
momentum_equation_relaxation = ${momentum_relaxation}
pressure_variable_relaxation = ${pressure_relaxation}
num_iterations = 2000
pressure_absolute_tolerance = 1e-8
momentum_absolute_tolerance = 1e-8
momentum_l_abs_tol = 1e-10
pressure_l_abs_tol = 1e-10
momentum_l_tol = 0
pressure_l_tol = 0
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
print_fields = false
[]
[Postprocessors]
[h]
type = AverageElementSize
execute_on = 'timestep_end'
[]
[pressure_drop]
type = PressureDrop
pressure = pressure
upstream_boundary = 'left'
downstream_boundary = 'right'
boundary = 'left right'
[]
[pressure_drop_deviation]
type = ParsedPostprocessor
expression = 'abs(pressure_drop - ${reference_pressure_drop})'
pp_names = 'pressure_drop'
[]
[]
[Outputs]
exodus = false
csv = true
print_linear_residuals = false
print_nonlinear_residuals = false
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/SIMPLEC/2d/2d-velocity-pressure.i)
mu = 2.6
rho = 1.0
advected_interp_method = 'average'
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '1.0'
dy = '0.1'
ix = '20'
iy = '3'
[]
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system'
previous_nl_solution_required = true
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
pressure_projection_method = consistent
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = 0.5
solver_sys = u_system
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
initial_condition = 0.0
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
initial_condition = 0.2
[]
[]
[FVInterpolationMethods]
[average]
type = FVGeometricAverage
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[]
[LinearFVBCs]
[inlet-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_x
functor = '1.1'
[]
[inlet-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_y
functor = '0.0'
[]
[walls-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom'
variable = vel_x
functor = 0.0
[]
[walls-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom'
variable = vel_y
functor = 0.0
[]
[outlet_p]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'right'
variable = pressure
functor = 1.4
[]
[outlet_u]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_x
use_two_term_expansion = false
boundary = right
[]
[outlet_v]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_y
use_two_term_expansion = false
boundary = right
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-10
pressure_l_abs_tol = 1e-10
momentum_l_tol = 0
pressure_l_tol = 0
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
momentum_equation_relaxation = 0.8
pressure_variable_relaxation = 1.0
num_iterations = 100
pressure_absolute_tolerance = 1e-10
momentum_absolute_tolerance = 1e-10
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
print_fields = false
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/friction/2d-rc-friction-standard-linear-physics.i)
mu = 1.1
rho = 1.1
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 5
ymin = -1
ymax = 1
nx = 50
ny = 10
[]
[]
[Physics]
[NavierStokes]
[FlowSegregated]
[flow]
compressibility = 'incompressible'
density = 'rho'
dynamic_viscosity = 'mu'
initial_velocity = '1 1 0'
initial_pressure = 0.0
inlet_boundaries = 'left'
momentum_inlet_types = 'fixed-velocity'
momentum_inlet_functors = '1 0'
wall_boundaries = 'top bottom'
momentum_wall_types = 'noslip noslip'
outlet_boundaries = 'right'
momentum_outlet_types = 'fixed-pressure'
pressure_functors = '0'
friction_types = 'darcy'
friction_coeffs = 'friction_coefficient'
momentum_advection_interpolation = 'average'
[]
[]
[]
[]
[FunctorMaterials]
[const]
type = ADGenericFunctorMaterial
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[]
[friction_coefficient]
type = ADGenericVectorFunctorMaterial
prop_names = 'friction_coefficient'
prop_values = '25 25 25'
[]
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system'
[]
[Executioner]
type = SIMPLE
rhie_chow_user_object = 'ins_rhie_chow_interpolator'
# Systems
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
momentum_equation_relaxation = 0.8
pressure_variable_relaxation = 0.3
# We need to converge the problem to show conservation
num_iterations = 200
pressure_absolute_tolerance = 1e-10
momentum_absolute_tolerance = 1e-10
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
momentum_l_abs_tol = 1e-13
pressure_l_abs_tol = 1e-13
momentum_l_tol = 0
pressure_l_tol = 0
# print_fields = true
continue_on_max_its = true
[]
[Outputs]
exodus = true
csv = true
[]
[Postprocessors]
[dp]
type = PressureDrop
pressure = 'pressure'
upstream_boundary = 'left'
downstream_boundary = 'right'
boundary = 'left right'
[]
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/segregated-comparison/segregated-linear.i)
mu = 2.6
rho = 1.0
advected_interp_method = 'average'
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '0.3'
dy = '0.3'
ix = '3'
iy = '3'
[]
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system'
previous_nl_solution_required = true
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = 0.5
solver_sys = u_system
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
initial_condition = 0.0
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
initial_condition = 0.2
[]
[]
[FVInterpolationMethods]
[average]
type = FVGeometricAverage
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[]
[LinearFVBCs]
[inlet-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_x
functor = '1.1'
[]
[inlet-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_y
functor = '0.0'
[]
[walls-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom'
variable = vel_x
functor = 0.0
[]
[walls-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom'
variable = vel_y
functor = 0.0
[]
[outlet_p]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'right'
variable = pressure
functor = 1.4
[]
[outlet_u]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_x
use_two_term_expansion = false
boundary = right
[]
[outlet_v]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_y
use_two_term_expansion = false
boundary = right
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-10
pressure_l_abs_tol = 1e-10
momentum_l_tol = 0
pressure_l_tol = 0
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
momentum_equation_relaxation = 0.8
pressure_variable_relaxation = 0.3
num_iterations = 2
pressure_absolute_tolerance = 1e-10
momentum_absolute_tolerance = 1e-10
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
print_fields = false
[]
[Outputs]
exodus = true
execute_on = TIMESTEP_END
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/2d/reconstructed-force-channel.i)
mu = 1
rho = 1
pressure_gradient_method = reconstructed
[Mesh]
[channel]
type = CartesianMeshGenerator
dim = 2
# Twenty cells per section resolve the interface-localized oscillation without making this
# two-solve comparison unnecessarily expensive.
dx = '1 1 1'
ix = '20 20 20'
dy = 1
iy = 3
subdomain_id = '0 1 2'
[]
[blocks]
type = RenameBlockGenerator
input = channel
old_block = '0 1 2'
new_block = 'upstream forced downstream'
[]
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system'
previous_nl_solution_required = true
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = 1
solver_sys = u_system
[]
[vel_y]
type = MooseLinearVariableFVReal
initial_condition = 0
solver_sys = v_system
[]
[pressure]
type = MooseLinearVariableFVReal
initial_condition = 0
solver_sys = pressure_system
gradient_method = ${pressure_gradient_method}
[]
[]
[FVGradientMethods]
[reconstructed]
type = FVReconstructedPressureGradient
base_gradient_method = green-gauss
# This is the relaxation used by the reconstructed-gradient channel regression tests.
gradient_relaxation = 0.1
[]
[]
[FVInterpolationMethods]
[upwind]
type = FVAdvectedUpwind
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = upwind
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = x
rhie_chow_user_object = rc
use_nonorthogonal_correction = false
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = upwind
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = y
rhie_chow_user_object = rc
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = x
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = y
[]
[middle_force]
type = LinearFVSource
variable = vel_x
# The large source makes the pressure-gradient jump dominate truncation error and visibly
# excites the unsupported cell-velocity mode when reconstruction is disabled.
source_density = 1e4
block = forced
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[]
[LinearFVBCs]
[inlet_u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = left
variable = vel_x
functor = 1
[]
[inlet_v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = left
variable = vel_y
functor = 0
[]
[symmetry_u]
type = LinearFVVelocitySymmetryBC
boundary = 'top bottom'
variable = vel_x
momentum_component = x
u = vel_x
v = vel_y
[]
[symmetry_v]
type = LinearFVVelocitySymmetryBC
boundary = 'top bottom'
variable = vel_y
momentum_component = y
u = vel_x
v = vel_y
[]
[pressure_flux]
type = LinearFVPressureFluxBC
boundary = left
variable = pressure
HbyA_flux = HbyA
Ainv = Ainv
u = vel_x
v = vel_y
rho = ${rho}
[]
[pressure_symmetry]
type = LinearFVPressureSymmetryBC
boundary = 'top bottom'
variable = pressure
HbyA_flux = HbyA
[]
[outlet_u]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = right
variable = vel_x
use_two_term_expansion = false
[]
[outlet_v]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = right
variable = vel_y
use_two_term_expansion = false
[]
[outlet_p]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = right
variable = pressure
functor = 0
[]
[]
[Postprocessors]
[upstream_vel_x]
type = ElementAverageValue
variable = vel_x
block = upstream
execute_on = FINAL
[]
[forced_vel_x]
type = ElementAverageValue
variable = vel_x
block = forced
execute_on = FINAL
[]
[downstream_vel_x]
type = ElementAverageValue
variable = vel_x
block = downstream
execute_on = FINAL
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-10
pressure_l_abs_tol = 1e-10
momentum_l_tol = 0
pressure_l_tol = 0
rhie_chow_user_object = rc
momentum_systems = 'u_system v_system'
pressure_system = pressure_system
momentum_equation_relaxation = 0.8
pressure_variable_relaxation = 0.3
# Five hundred iterations allow the reconstructed coupling pressure gradient to relax to the same
# uniform steady field as the standard gradient. The reconstructed momentum residual is
# cancellation-dominated at the source jumps and does not satisfy the generic normalized monitor.
num_iterations = 500
continue_on_max_its = true
# Relative to the 1e4 source, this requires the ordinary outer residuals to fall by eleven orders
# of magnitude while remaining above platform-level roundoff stagnation.
pressure_absolute_tolerance = 1e-7
momentum_absolute_tolerance = 1e-7
momentum_petsc_options_iname = '-pc_type'
momentum_petsc_options_value = lu
pressure_petsc_options_iname = '-pc_type'
pressure_petsc_options_value = lu
print_fields = false
[]
[Outputs]
[csv]
type = CSV
execute_on = FINAL
[]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/two_phase/mixture_model/segregated/channel-drift-flux.i)
mu = 1.0
rho = 10.0
mu_d = 0.1
rho_d = 1.0
l = 2
# 'average' leads to slight oscillations, upwind may be preferred
# This method is selected for consistency with the original nonlinear input
advected_interp_method = 'average'
# TODO remove need for those
cp = 1
k = 1
cp_d = 1
k_d = 1
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = '${fparse l * 5}'
ymin = '${fparse -l / 2}'
ymax = '${fparse l / 2}'
nx = 10
ny = 4
[]
uniform_refine = 0
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system phi_system'
previous_nl_solution_required = true
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
solver_sys = u_system
initial_condition = 1
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
[]
[phase_2]
type = MooseLinearVariableFVReal
solver_sys = phi_system
[]
[]
[FVInterpolationMethods]
[average]
type = FVGeometricAverage
[]
[upwind]
type = FVAdvectedUpwind
[]
[]
[LinearFVKernels]
[flow_p_diffusion]
type = LinearFVPressureCorrectionDiffusion
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
variable = pressure
[]
[flow_HbyA_divergence]
type = LinearFVDivergence
face_flux = HbyA
force_boundary_execution = true
variable = pressure
[]
[flow_ins_momentum_flux_x]
type = LinearWCNSFVMomentumFlux
advected_interp_method_name = ${advected_interp_method}
momentum_component = x
mu = mu_mixture
rhie_chow_user_object = ins_rhie_chow_interpolator
u = vel_x
use_deviatoric_terms = false
use_nonorthogonal_correction = false
v = vel_y
variable = vel_x
[]
[flow_ins_momentum_flux_y]
type = LinearWCNSFVMomentumFlux
advected_interp_method_name = ${advected_interp_method}
momentum_component = y
mu = mu_mixture
rhie_chow_user_object = ins_rhie_chow_interpolator
u = vel_x
use_deviatoric_terms = false
use_nonorthogonal_correction = false
v = vel_y
variable = vel_y
[]
[mixture_drift_flux_x]
type = LinearWCNSFV2PMomentumDriftFlux
density_interp_method = average
fraction_dispersed = phase_2
momentum_component = x
rhie_chow_user_object = ins_rhie_chow_interpolator
rho_d = ${rho_d}
u_slip = vel_slip_x
v_slip = vel_slip_y
variable = vel_x
[]
[mixture_drift_flux_y]
type = LinearWCNSFV2PMomentumDriftFlux
density_interp_method = average
fraction_dispersed = phase_2
momentum_component = y
rhie_chow_user_object = ins_rhie_chow_interpolator
rho_d = ${rho_d}
u_slip = vel_slip_x
v_slip = vel_slip_y
variable = vel_y
[]
[flow_ins_momentum_pressure_x]
type = LinearFVMomentumPressure
momentum_component = x
pressure = pressure
variable = vel_x
[]
[flow_ins_momentum_pressure_y]
type = LinearFVMomentumPressure
momentum_component = y
pressure = pressure
variable = vel_y
[]
[flow_momentum_friction_0_x]
type = LinearFVMomentumFriction
Darcy_name = Darcy_coefficient_vec
momentum_component = x
mu = mu_mixture
variable = vel_x
[]
[flow_momentum_friction_0_y]
type = LinearFVMomentumFriction
Darcy_name = Darcy_coefficient_vec
momentum_component = y
mu = mu_mixture
variable = vel_y
[]
# Mixture phase equation
[mixture_ins_phase_2_advection]
type = LinearFVScalarAdvection
advected_interp_method_name = upwind
rhie_chow_user_object = ins_rhie_chow_interpolator
u_slip = vel_slip_x
v_slip = vel_slip_y
variable = phase_2
[]
[mixture_phase_interface_reaction]
type = LinearFVReaction
coeff = 0.1
variable = phase_2
[]
[mixture_phase_interface_source]
type = LinearFVSource
scaling_factor = 0.1
source_density = phase_1
variable = phase_2
[]
[]
[LinearFVBCs]
[vel_x_left]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = left
functor = 1
variable = vel_x
[]
[vel_y_left]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = left
functor = 0
variable = vel_y
[]
[pressure_extrapolation_inlet_left]
type = LinearFVExtrapolatedPressureBC
boundary = left
use_two_term_expansion = true
variable = pressure
[]
[vel_x_right]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = right
use_two_term_expansion = true
variable = vel_x
[]
[vel_y_right]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = right
use_two_term_expansion = true
variable = vel_y
[]
[pressure_right]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = right
functor = 0
variable = pressure
[]
[vel_x_bottom]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = bottom
functor = 0
variable = vel_x
[]
[vel_y_bottom]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = bottom
functor = 0
variable = vel_y
[]
[vel_x_top]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = top
functor = 0
variable = vel_x
[]
[vel_y_top]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = top
functor = 0
variable = vel_y
[]
[pressure_extrapolation_top_bottom]
type = LinearFVExtrapolatedPressureBC
boundary = 'top bottom'
use_two_term_expansion = true
variable = pressure
[]
[phase_2_left]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = left
functor = 0.1
variable = phase_2
[]
[phase_2_right]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = right
use_two_term_expansion = true
variable = phase_2
[]
[]
[FunctorMaterials]
[flow_ins_speed_material]
type = ADVectorMagnitudeFunctorMaterial
execute_on = ALWAYS
outputs = none
vector_magnitude_name = speed
x_functor = vel_x
y_functor = vel_y
[]
[mixture_phase_1_fraction]
type = ParsedFunctorMaterial
execute_on = ALWAYS
expression = '1 - phase_2'
functor_names = phase_2
output_properties = phase_1
outputs = all
property_name = phase_1
[]
[mixture_mixture_material]
type = WCNSLinearFVMixtureFunctorMaterial
execute_on = ALWAYS
limit_phase_fraction = true
outputs = all
phase_1_fraction = phase_2
phase_1_names = '${rho_d} ${mu_d} ${cp_d} ${k_d}'
phase_2_names = '${rho} ${mu} ${cp} ${k}'
prop_names = 'rho_mixture mu_mixture cp_mixture k_mixture'
[]
[mixture_slip_x]
type = WCNSFV2PSlipVelocityFunctorMaterial
execute_on = ALWAYS
gravity = '0 0 0'
linear_coef_name = Darcy_coefficient
momentum_component = x
mu = mu_mixture
outputs = all
particle_diameter = 0.01
rho = ${rho}
rho_d = ${rho_d}
slip_velocity_name = vel_slip_x
u = vel_x
v = vel_y
[]
[mixture_slip_y]
type = WCNSFV2PSlipVelocityFunctorMaterial
execute_on = ALWAYS
gravity = '0 0 0'
linear_coef_name = Darcy_coefficient
momentum_component = y
mu = mu_mixture
outputs = all
particle_diameter = 0.01
rho = ${rho}
rho_d = ${rho_d}
slip_velocity_name = vel_slip_y
u = vel_x
v = vel_y
[]
[mixture_dispersed_drag]
type = NSFVDispersePhaseDragFunctorMaterial
drag_coef_name = Darcy_coefficient
execute_on = ALWAYS
mu = mu_mixture
outputs = all
particle_diameter = 0.01
rho = rho_mixture
u = vel_x
v = vel_y
[]
[]
[UserObjects]
[ins_rhie_chow_interpolator]
type = RhieChowMassFlux
p_diffusion_kernel = flow_p_diffusion
pressure = pressure
rho = rho_mixture
u = vel_x
v = vel_y
[]
[]
[Executioner]
type = SIMPLE
rhie_chow_user_object = 'ins_rhie_chow_interpolator'
# Systems
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
active_scalar_systems = 'phi_system'
momentum_equation_relaxation = 0.8
active_scalar_equation_relaxation = '0.7'
pressure_variable_relaxation = 0.3
# We need to converge the problem to show conservation
num_iterations = 200
pressure_absolute_tolerance = 1e-10
momentum_absolute_tolerance = 1e-10
active_scalar_absolute_tolerance = '1e-10'
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
active_scalar_petsc_options_iname = '-pc_type -pc_hypre_type'
active_scalar_petsc_options_value = 'hypre boomeramg'
momentum_l_abs_tol = 1e-13
pressure_l_abs_tol = 1e-13
active_scalar_l_abs_tol = 1e-13
momentum_l_tol = 0
pressure_l_tol = 0
active_scalar_l_tol = 0
# print_fields = true
continue_on_max_its = true
[]
[Outputs]
csv = true
[]
[Postprocessors]
[Re]
type = ParsedPostprocessor
expression = '10.0 * 2 * 1'
[]
[average_phase2]
type = ElementAverageValue
variable = phase_2
[]
[dp]
type = PressureDrop
boundary = 'left right'
downstream_boundary = right
pressure = pressure
upstream_boundary = left
[]
[max_phase2]
type = ElementExtremeValue
variable = phase_2
[]
[]
(modules/navier_stokes/test/tests/finite_volume/ins/radiation_s2s/two_slabs_cht_s2s_analytic.i)
# Two conducting slabs coupled to a conducting transparent gap by linear-FV
# conjugate heat transfer, with surface-to-surface radiation acting in parallel.
#
# The three regions are one-dimensional and have unit area:
#
# 1000 K | left solid | transparent conducting gap | right solid | 300 K
# x=0 0.1 0.2 0.3
#
# Analytic model:
#
# q_total = k_s / L_s * (T_hot - T_left)
# = k_f / L_f * (T_left - T_right) + q_rad
# = k_s / L_s * (T_right - T_cold)
#
# q_rad = sigma * (T_left^4 - T_right^4)
# / (1 / eps_left + 1 / eps_right - 1)
#
# For equal solid resistances, define dT = T_left - T_right. The solid
# balances give T_left + T_right = T_hot + T_cold. Substitution into the gap
# balance produces one depressed cubic:
#
# cubic_A*dT^3 + cubic_B*dT - cubic_C = 0.
#
# Its unique real root, and every analytical temperature and heat-flux
# reference below, are evaluated with HIT fparse expressions. Therefore,
# changing only k_fluid updates both the simulation and its analytical checks.
#
# LinearFVRobinCHTBC exchanges adjacent FV-cell temperatures. The numerical
# solution consequently approaches these continuum references at first order
# under refinement; no mesh-dependent reference values are used here.
T_hot = 1000.0
T_cold = 300.0
L_solid = 0.1
L_gap = 0.1
k_solid = 10.0
# Change this value to move between radiation-, mixed-, and
# conduction-dominated regimes. Examples: 0.1, 3.4180137348, and 50.0.
k_fluid = 50
eps_left = 0.8
eps_right = 0.6
sigma = 5.67037e-8
# Virtual Robin-Robin coupling coefficients. They affect fixed-point
# convergence, but not the converged interface solution.
h_f = 1.0
h_s = 1.0
# ---------------------------------------------------------------------------
# Continuum analytical solution. For dT = T_left - T_right,
#
# A*dT^3 + B*dT - C = 0,
# p = B/A, r = C/A,
# dT = 2*sqrt(p/3)*sinh(asinh(3*r/(2*p)*sqrt(3/p))/3).
#
# This form avoids taking a fractional power of a negative number in Cardano's
# formula and has one real root because A, B, and C are positive.
temperature_sum = ${fparse T_hot+T_cold}
temperature_span = ${fparse T_hot-T_cold}
solid_resistance = ${fparse L_solid/k_solid}
gap_conductance = ${fparse k_fluid/L_gap}
emissivity_denominator = ${fparse 1/eps_left+1/eps_right-1}
cubic_A = ${fparse sigma*temperature_sum/(2*emissivity_denominator)}
cubic_B = ${fparse 1/(2*solid_resistance)+gap_conductance+sigma*temperature_sum^3/(2*emissivity_denominator)}
cubic_C = ${fparse temperature_span/(2*solid_resistance)}
cubic_p = ${fparse cubic_B/cubic_A}
cubic_r = ${fparse cubic_C/cubic_A}
interface_temperature_span = ${fparse 2*sqrt(cubic_p/3)*sinh(asinh(3*cubic_r/(2*cubic_p)*sqrt(3/cubic_p))/3)}
T_left_ref = ${fparse (temperature_sum+interface_temperature_span)/2}
T_right_ref = ${fparse (temperature_sum-interface_temperature_span)/2}
q_conduction_ref = ${fparse gap_conductance*interface_temperature_span}
q_radiation_ref = ${fparse sigma*(T_left_ref^4-T_right_ref^4)/emissivity_denominator}
q_total_ref = ${fparse q_conduction_ref+q_radiation_ref}
# Coarsest mesh of the spatial convergence study in mms_spatial.py, which
# refines it uniformly. The errors are already first order on this mesh, and
# starting this coarse keeps the study short enough for the default test suite.
nx_solid = 5
nx_gap = 5
[Problem]
kernel_coverage_check = false
linear_sys_names = 'energy_system solid_energy_system u_system v_system p_system'
previous_nl_solution_required = true
[]
[Mesh]
type = MeshGeneratorMesh
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '${L_solid} ${L_gap} ${L_solid}'
ix = '${nx_solid} ${nx_gap} ${nx_solid}'
dy = '1.0'
iy = '1'
subdomain_id = '1 5 2'
[]
# The sidesets are attached to the solid elements. This lets gray_lambert
# sample T_solid on both radiating surfaces.
[left_rad_sideset]
type = SideSetsBetweenSubdomainsGenerator
input = cmg
primary_block = 1
paired_block = 5
new_boundary = left_rad
[]
[right_rad_sideset]
type = SideSetsBetweenSubdomainsGenerator
input = left_rad_sideset
primary_block = 2
paired_block = 5
new_boundary = right_rad
[]
[rename_blocks]
type = RenameBlockGenerator
input = right_rad_sideset
old_block = '1 5 2'
new_block = 'left_solid fluid right_solid'
[]
[]
[Variables]
[T_fluid]
type = MooseLinearVariableFVReal
solver_sys = energy_system
initial_condition = 600
block = fluid
[]
# A single solid variable/system spans the two disconnected slabs.
[T_solid]
type = MooseLinearVariableFVReal
solver_sys = solid_energy_system
initial_condition = 600
block = 'left_solid right_solid'
[]
# Dummy flow variables retain the SIMPLE setup. Their systems are disabled.
[vel_x]
type = MooseLinearVariableFVReal
solver_sys = u_system
initial_condition = 0
block = fluid
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
initial_condition = 0
block = fluid
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = p_system
initial_condition = 0
block = fluid
[]
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = 1
p_diffusion_kernel = p_diffusion
block = fluid
[]
[view_factors_uo]
type = SpecifiedViewFactor
boundary = 'left_rad right_rad'
view_factors = '0 1;
1 0'
execute_on = INITIAL
[]
[gray_lambert]
type = ViewFactorObjectSurfaceRadiation
boundary = 'left_rad right_rad'
emissivity = '${eps_left} ${eps_right}'
temperature = T_solid
stefan_boltzmann_constant = ${sigma}
view_factor_object_name = view_factors_uo
execute_on = 'NONLINEAR TIMESTEP_END'
[]
[]
[LinearFVKernels]
[fluid_conduction]
type = LinearFVDiffusion
variable = T_fluid
diffusion_coeff = ${k_fluid}
block = fluid
use_nonorthogonal_correction = false
[]
# CHTHandler expects one conduction kernel for the solid energy system.
[solid_conduction]
type = LinearFVDiffusion
variable = T_solid
diffusion_coeff = ${k_solid}
block = 'left_solid right_solid'
use_nonorthogonal_correction = false
[]
# Required by RhieChowMassFlux although the pressure solve is disabled.
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
block = fluid
use_nonorthogonal_correction = false
[]
[]
[LinearFVBCs]
[hot_left]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T_solid
boundary = left
functor = ${T_hot}
[]
[cold_right]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T_solid
boundary = right
functor = ${T_cold}
[]
# Robin-Robin CHT at the left solid/gap interface.
[fluid_left]
type = LinearFVRobinCHTBC
variable = T_fluid
boundary = left_rad
h = ${h_f}
thermal_conductivity = ${k_fluid}
incoming_flux = heat_flux_to_fluid_left_rad
surface_temperature = interface_temperature_to_fluid_left_rad
[]
[solid_left]
type = LinearFVRobinCHTBC
variable = T_solid
boundary = left_rad
h = ${h_s}
thermal_conductivity = ${k_solid}
incoming_flux = heat_flux_to_solid_left_rad
surface_temperature = interface_temperature_to_solid_left_rad
[]
# Robin-Robin CHT at the right gap/solid interface.
[fluid_right]
type = LinearFVRobinCHTBC
variable = T_fluid
boundary = right_rad
h = ${h_f}
thermal_conductivity = ${k_fluid}
incoming_flux = heat_flux_to_fluid_right_rad
surface_temperature = interface_temperature_to_fluid_right_rad
[]
[solid_right]
type = LinearFVRobinCHTBC
variable = T_solid
boundary = right_rad
h = ${h_s}
thermal_conductivity = ${k_solid}
incoming_flux = heat_flux_to_solid_right_rad
surface_temperature = interface_temperature_to_solid_right_rad
[]
# Do not add LinearFVGrayLambertBC on left_rad/right_rad. The modified
# CHTHandler removes q_rad from the flux transferred through the transparent
# fluid and applies the corresponding surface loss/gain to the solids.
[]
[Postprocessors]
# Mesh size for the spatial convergence study
[h]
type = AverageElementSize
outputs = csv
[]
# Interface temperatures
[T_left_rad]
type = GrayLambertSurfaceRadiationPP
surface_radiation_object_name = gray_lambert
return_type = TEMPERATURE
boundary = left_rad
execute_on = NONLINEAR
[]
[T_right_rad]
type = GrayLambertSurfaceRadiationPP
surface_radiation_object_name = gray_lambert
return_type = TEMPERATURE
boundary = right_rad
execute_on = NONLINEAR
[]
# Radiative heat flux, positive from left to right
[q_radiation]
type = GrayLambertSurfaceRadiationPP
surface_radiation_object_name = gray_lambert
return_type = HEAT_FLUX_DENSITY
boundary = left_rad
execute_on = NONLINEAR
[]
# Total heat flux entering through the hot external boundary
[q_hot_boundary_outward]
type = BoundaryLinearFVFluxIntegral
boundary = left
linearfvkernels = solid_conduction
execute_on = NONLINEAR
[]
[q_total]
type = ParsedPostprocessor
pp_names = 'q_hot_boundary_outward'
expression = '-q_hot_boundary_outward'
execute_on = NONLINEAR
[]
# Conductive contribution through the middle region
[q_conduction]
type = ParsedPostprocessor
pp_names = 'q_total q_radiation'
expression = 'q_total-q_radiation'
execute_on = NONLINEAR
[]
# Analytical-solution errors
[T_left_rel_error]
type = ParsedPostprocessor
pp_names = 'T_left_rad'
expression = 'abs(T_left_rad-${T_left_ref})/${T_left_ref}'
execute_on = NONLINEAR
[]
[T_right_rel_error]
type = ParsedPostprocessor
pp_names = 'T_right_rad'
expression = 'abs(T_right_rad-${T_right_ref})/${T_right_ref}'
execute_on = NONLINEAR
[]
[q_radiation_rel_error]
type = ParsedPostprocessor
pp_names = 'q_radiation'
expression = 'abs(q_radiation-${q_radiation_ref})/${q_radiation_ref}'
execute_on = NONLINEAR
[]
[q_conduction_rel_error]
type = ParsedPostprocessor
pp_names = 'q_conduction'
expression = 'abs(q_conduction-${q_conduction_ref})/${q_conduction_ref}'
execute_on = NONLINEAR
[]
[q_total_rel_error]
type = ParsedPostprocessor
pp_names = 'q_total'
expression = 'abs(q_total-${q_total_ref})/${q_total_ref}'
execute_on = NONLINEAR
[]
[]
[Executioner]
type = SIMPLE
num_iterations = 1000
should_solve_momentum = false
should_solve_pressure = false
rhie_chow_user_object = rc
momentum_systems = 'u_system v_system'
pressure_system = p_system
energy_system = energy_system
solid_energy_system = solid_energy_system
energy_l_abs_tol = 1e-14
energy_l_tol = 1e-14
energy_equation_relaxation = 0.99
energy_field_relaxation = 0.99
# The fluid energy residual stagnates near 1e-10 in this problem, so a tighter
# tolerance is never reached. Matches linear_fv_gray_lambert_parallel_plates_simple.i.
energy_absolute_tolerance = 1e-8
solid_energy_l_abs_tol = 1e-14
solid_energy_l_tol = 1e-14
solid_energy_absolute_tolerance = 1e-12
energy_petsc_options_iname = '-pc_type'
energy_petsc_options_value = 'lu'
solid_energy_petsc_options_iname = '-pc_type'
solid_energy_petsc_options_value = 'lu'
cht_interfaces = 'left_rad right_rad'
cht_solid_flux_relaxation = '0.5 0.5'
cht_fluid_flux_relaxation = '0.5 0.5'
cht_solid_temperature_relaxation = '0.5 0.5'
cht_fluid_temperature_relaxation = '0.5 0.5'
cht_heat_flux_tolerance = 1e-10
max_cht_fpi = 10
# Parameter supplied by the radiation-aware CHTHandler.
surface_radiation_object_name = gray_lambert
print_fields = false
continue_on_max_its = false
[]
[Outputs]
execute_on = FINAL
exodus = true
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/block_restriction/linear-segregated/reconstructed-gradient.i)
mu = 1
rho = 1
flow_block = 2
restricted_blocks = '${flow_block}'
inlet_speed = 1
[Mesh]
[blocks]
type = CartesianMeshGenerator
dim = 2
dx = '1 1 1'
dy = '1'
ix = '1 2 1'
iy = '1'
subdomain_id = '1 ${flow_block} 3'
[]
[internal_inlet]
type = SideSetsBetweenSubdomainsGenerator
input = blocks
primary_block = ${flow_block}
paired_block = 1
new_boundary = internal_inlet
[]
[internal_outlet]
type = SideSetsBetweenSubdomainsGenerator
input = internal_inlet
primary_block = ${flow_block}
paired_block = 3
new_boundary = internal_outlet
[]
[delete_outside_blocks]
type = BlockDeletionGenerator
input = internal_outlet
block = '1 3'
[]
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system'
previous_nl_solution_required = true
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
block = ${restricted_blocks}
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = 0
solver_sys = u_system
block = ${restricted_blocks}
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
block = ${restricted_blocks}
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
block = ${restricted_blocks}
gradient_method = reconstructed
[]
[]
[FVGradientMethods]
[reconstructed]
type = FVReconstructedPressureGradient
base_gradient_method = green-gauss
# This moderate relaxation exposes the orientation feedback within the short regression.
gradient_relaxation = 0.5
[]
[]
[FVInterpolationMethods]
[average]
type = FVGeometricAverage
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = average
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = x
rhie_chow_user_object = rc
use_nonorthogonal_correction = false
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = average
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = y
rhie_chow_user_object = rc
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = x
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = y
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[]
[LinearFVBCs]
[prescribed-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'internal_inlet top bottom'
variable = vel_x
functor = ${inlet_speed}
[]
[prescribed-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'internal_inlet top bottom'
variable = vel_y
functor = 0
[]
[pressure-flux]
type = LinearFVPressureFluxBC
boundary = 'internal_inlet top bottom'
variable = pressure
HbyA_flux = HbyA
Ainv = Ainv
u = vel_x
v = vel_y
rho = ${rho}
[]
[outlet-pressure]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = internal_outlet
variable = pressure
functor = 0
[]
[outlet-u]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_x
use_two_term_expansion = false
boundary = internal_outlet
[]
[outlet-v]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_y
use_two_term_expansion = false
boundary = internal_outlet
[]
[]
[Functions]
[exact-u]
type = ParsedFunction
expression = ${inlet_speed}
[]
[exact-zero]
type = ParsedFunction
expression = 0
[]
[]
[Postprocessors]
[inlet-mass-flow]
type = VolumetricFlowRate
boundary = internal_inlet
vel_x = vel_x
vel_y = vel_y
advected_quantity = ${rho}
rhie_chow_user_object = rc
[]
[u-error]
type = ElementL2FunctorError
approximate = vel_x
exact = exact-u
block = ${flow_block}
[]
[v-error]
type = ElementL2FunctorError
approximate = vel_y
exact = exact-zero
block = ${flow_block}
[]
[pressure-error]
type = ElementL2FunctorError
approximate = pressure
exact = exact-zero
block = ${flow_block}
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-12
pressure_l_abs_tol = 1e-12
momentum_l_tol = 0
pressure_l_tol = 0
rhie_chow_user_object = rc
momentum_systems = 'u_system v_system'
pressure_system = pressure_system
momentum_equation_relaxation = 0.8
pressure_variable_relaxation = 0.3
# Three iterations let the first reconstructed candidate feed a subsequent momentum predictor.
num_iterations = 3
continue_on_max_its = true
pressure_absolute_tolerance = 1e-10
momentum_absolute_tolerance = 1e-10
momentum_petsc_options_iname = '-pc_type'
momentum_petsc_options_value = 'lu'
pressure_petsc_options_iname = '-pc_type'
pressure_petsc_options_value = 'lu'
print_fields = false
[]
[Outputs]
csv = true
execute_on = FINAL
[]
(modules/navier_stokes/test/tests/finite_volume/ins/lid-driven/linear-segregated/lid-driven-segregated-physics.i)
mu = .01
rho = 1
advected_interp_method = 'average'
pressure_diffusion_ainv_interp_method = 'average'
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = .1
ymin = 0
ymax = .1
nx = 3
ny = 3
[]
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system'
[]
[Physics]
[NavierStokes]
[FlowSegregated/flow]
velocity_variable = 'vel_x vel_y'
pressure_variable = 'pressure'
initial_velocity = '0 0 0'
initial_pressure = '0.2'
density = ${rho}
dynamic_viscosity = ${mu}
# use inlet for moving wall to match the reference input
# we could also use a noslip BC with a velocity wall functor
inlet_boundaries = 'top'
momentum_inlet_types = 'fixed-velocity'
momentum_inlet_functors = '1 0'
wall_boundaries = 'left right bottom'
momentum_wall_types = 'noslip noslip noslip'
orthogonality_correction = false
pressure_two_term_bc_expansion = true
momentum_advection_interpolation = ${advected_interp_method}
pressure_diffusion_interpolation = ${pressure_diffusion_ainv_interp_method}
[]
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-12
pressure_l_abs_tol = 1e-12
momentum_l_tol = 0
pressure_l_tol = 0
rhie_chow_user_object = 'ins_rhie_chow_interpolator'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
momentum_equation_relaxation = 0.8
pressure_variable_relaxation = 0.3
num_iterations = 100
pressure_absolute_tolerance = 1e-12
momentum_absolute_tolerance = 1e-12
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
print_fields = false
pin_pressure = true
pressure_pin_value = 0.0
pressure_pin_point = '0.05 0.05 0.0'
[]
[Outputs]
exodus = true
csv = false
perf_graph = false
print_nonlinear_residuals = false
print_linear_residuals = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/1d-scalar/channel-conservation-physics.i)
mu = 2.6
rho = 1.0
advected_interp_method = 'upwind'
# A large diffusion term makes the balance worse
# because some scalar diffuses to the inlet/outlet and
# the postprocessors are only measuring the advective term
k1 = 0
k2 = 0
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 1
dx = '1 1 1'
ix = '10 10 10'
subdomain_id = '0 1 0'
[]
[]
[Problem]
linear_sys_names = 'u_system pressure_system s1_system s2_system'
[]
[FVInterpolationMethods]
[custom_flow_upwind]
type = FVAdvectedUpwind
[]
[custom_scalar_upwind]
type = FVAdvectedUpwind
[]
[]
[Physics]
[NavierStokes]
[FlowSegregated]
[flow]
velocity_variable = 'vel_x'
pressure_variable = 'pressure'
initial_velocity = '0.5 0 0'
initial_pressure = '0.2'
density = ${rho}
dynamic_viscosity = ${mu}
# use inlet for moving wall to match the reference input
# we could also use a noslip BC with a velocity wall functor
inlet_boundaries = 'left'
momentum_inlet_types = 'fixed-velocity'
momentum_inlet_functors = '1'
outlet_boundaries = 'right'
momentum_outlet_types = 'fixed-pressure'
pressure_functors = '1.4'
orthogonality_correction = false
pressure_two_term_bc_expansion = false
momentum_two_term_bc_expansion = false
momentum_advection_interpolation_method_name = custom_flow_upwind
[]
[]
[ScalarTransportSegregated]
[scalar]
passive_scalar_names = 'scalar1 scalar2'
system_names = 's1_system s2_system'
initial_scalar_variables = '1.1 3'
passive_scalar_diffusivity = '${k1} ${k2}'
passive_scalar_coupled_source = 'q1; q2'
passive_scalar_inlet_types = 'fixed-value fixed-value'
passive_scalar_inlet_functors = '1; 2'
passive_scalar_advection_interpolation_method_name = custom_scalar_upwind
passive_scalar_two_term_bc_expansion = false
use_nonorthogonal_correction = false
[]
[]
[]
[]
# Note, we do not block restrict these source variables because
# there is not passive_scalar_coupled_source_blocks parameter at this time
[AuxVariables]
[q1]
type = MooseLinearVariableFVReal
[]
[q2]
type = MooseLinearVariableFVReal
[]
[]
[FVICs]
[q1]
type = FVConstantIC
variable = q1
value = 1
block = 1
[]
[q2]
type = FVConstantIC
variable = q2
value = 2
block = 1
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-13
pressure_l_abs_tol = 1e-13
passive_scalar_l_abs_tol = 1e-13
momentum_l_tol = 0
pressure_l_tol = 0
passive_scalar_l_tol = 0
rhie_chow_user_object = 'ins_rhie_chow_interpolator'
momentum_systems = 'u_system'
pressure_system = 'pressure_system'
passive_scalar_systems = 's1_system s2_system'
momentum_equation_relaxation = 0.4
pressure_variable_relaxation = 0.3
passive_scalar_equation_relaxation = '0.9 0.9'
# We need to converge the problem to show conservation
num_iterations = 200
pressure_absolute_tolerance = 1e-10
momentum_absolute_tolerance = 1e-10
passive_scalar_absolute_tolerance = '1e-9 1e-9'
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
# added to test PC reuse feature
momentum_pc_recompute_frequency = 2
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
passive_scalar_petsc_options_iname = '-pc_type -pc_hypre_type'
passive_scalar_petsc_options_value = 'hypre boomeramg'
# added to test PC reuse feature
passive_scalar_pc_recompute_frequency = 10
print_fields = false
continue_on_max_its = true
[]
[Outputs]
exodus = true
execute_on = timestep_end
# hide = 'pressure vel_x'
[csv]
type = CSV
hide = 'balance_s1 balance_s2'
[]
[]
[GlobalParams]
rhie_chow_user_object = 'ins_rhie_chow_interpolator'
subtract_mesh_velocity = false
advected_interp_method = ${advected_interp_method}
[]
[Postprocessors]
[s1_in]
type = VolumetricFlowRate
boundary = left
vel_x = vel_x
advected_quantity = 'scalar1'
[]
[s2_in]
type = VolumetricFlowRate
boundary = left
vel_x = vel_x
advected_quantity = 'scalar2'
[]
[s1_out]
type = VolumetricFlowRate
boundary = right
vel_x = vel_x
advected_quantity = 'scalar1'
[]
[s2_out]
type = VolumetricFlowRate
boundary = right
vel_x = vel_x
advected_quantity = 'scalar2'
[]
[balance_s1]
type = ParsedPostprocessor
expression = 's1_out + s1_in - 1'
pp_names = 's1_in s1_out'
[]
[balance_s2]
type = ParsedPostprocessor
expression = 's2_out + s2_in - 2'
pp_names = 's2_in s2_out'
[]
[]
(modules/navier_stokes/test/tests/finite_volume/wcns/enthalpy_equation/1d_test_h.i)
L = 30
nx = 600
bulk_u = 0.01
q_source = 50000.
A_cp = 976.78
B_cp = 1.0634
T_in = 860.
p_ref = 101325.0
rho = 2000.
advected_interp_method = 'upwind'
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
xmin = 0
xmax = ${L}
nx = ${nx}
[]
allow_renumbering = false
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
advected_interp_method = ${advected_interp_method}
u = vel_x
[]
[Problem]
linear_sys_names = 'u_system pressure_system energy_system'
previous_nl_solution_required = true
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
pressure = pressure
rho = 'rho'
p_diffusion_kernel = p_diffusion
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
solver_sys = u_system
initial_condition = ${bulk_u}
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
initial_condition = ${p_ref}
[]
[h]
type = MooseLinearVariableFVReal
solver_sys = energy_system
initial_condition = ${fparse 860.*1900.}
[]
[]
[AuxVariables]
[rho_var]
type = MooseLinearVariableFVReal
[]
[cp_var]
type = MooseLinearVariableFVReal
[]
[mu_var]
type = MooseLinearVariableFVReal
[]
[k_var]
type = MooseLinearVariableFVReal
[]
[T]
type = MooseLinearVariableFVReal
initial_condition = 860.
[]
[h_aux]
type = MooseLinearVariableFVReal
[]
[]
[FVInterpolationMethods]
[upwind]
type = FVAdvectedUpwind
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = ${advected_interp_method}
mu = 'mu'
momentum_component = 'x'
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[temp_advection]
type = LinearFVEnergyAdvection
variable = h
[]
[source]
type = LinearFVSource
variable = h
source_density = source_func
[]
[]
[LinearFVBCs]
[inlet_u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_x
functor = ${bulk_u} #${bulk_u} #'fully_developed_velocity'
[]
[inlet_h]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = h
boundary = 'left'
functor = 'h_from_p_T'
[]
[inlet_T]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T
boundary = 'left'
functor = ${T_in}
[]
[outlet_p]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'right'
variable = pressure
functor = ${p_ref}
[]
[outlet_h]
type = LinearFVAdvectionDiffusionOutflowBC
variable = h
use_two_term_expansion = false
boundary = 'right'
[]
[outlet_u]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_x
use_two_term_expansion = false
boundary = 'right'
[]
[]
[Functions]
[source_func]
type = ParsedFunction
expression = ${q_source}
[]
[T_analytical]
type = ParsedFunction
expression = ${fparse (-A_cp+sqrt(A_cp^2-2*B_cp*(-q_source/rho/bulk_u*L-A_cp*T_in-B_cp/2*T_in*T_in)))/B_cp}
[]
[]
[FunctorMaterials]
[enthalpy_material]
type = LinearFVEnthalpyFunctorMaterial
pressure = ${p_ref}
T_fluid = T
h = h
h_from_p_T_functor = h_from_p_T_functor
T_from_p_h_functor = T_from_p_h_functor
[]
[h_from_p_T_functor]
type = ParsedFunctorMaterial
property_name = 'h_from_p_T_functor'
functor_names = 'T'
expression = '${A_cp}*T+${B_cp}/2*(T^2)'
[]
[T_from_p_h_functor]
type = ParsedFunctorMaterial
property_name = 'T_from_p_h_functor'
functor_names = 'h'
expression = '(-${A_cp}+sqrt(${A_cp}^2+2*h*${B_cp}))/${B_cp}'
[]
[rho]
type = ADParsedFunctorMaterial
property_name = 'rho'
functor_names = 'T'
expression = ${rho}
[]
[cp]
type = ADParsedFunctorMaterial
property_name = 'cp'
functor_names = 'T'
expression = '${A_cp}+${B_cp}*T'
[]
[mu]
type = ADParsedFunctorMaterial
property_name = 'mu'
functor_names = 'T'
expression = '4.5e-3'
[]
[k]
type = ADParsedFunctorMaterial
property_name = 'k'
functor_names = 'T'
expression = 0.7
[]
[]
[AuxKernels]
[rho_out]
type = FunctorAux
functor = 'rho'
variable = 'rho_var'
execute_on = 'NONLINEAR'
[]
[cp_out]
type = FunctorAux
functor = 'cp'
variable = 'cp_var'
execute_on = 'NONLINEAR'
[]
[mu_out]
type = FunctorAux
functor = 'mu'
variable = 'mu_var'
execute_on = 'NONLINEAR'
[]
[k_out]
type = FunctorAux
functor = 'k'
variable = 'k_var'
execute_on = 'NONLINEAR'
[]
[T_from_h_functor_aux]
type = FunctorAux
functor = 'T_from_p_h'
variable = 'T'
execute_on = 'NONLINEAR'
[]
[h_from_T_functor_aux]
type = FunctorAux
functor = 'h_from_p_T'
variable = 'h_aux'
execute_on = 'NONLINEAR'
[]
[]
[Postprocessors]
[T_out_sim]
type = ElementalVariableValue
variable = T
elementid = ${fparse nx-1}
[]
[T_out_analytic]
type = FunctionValuePostprocessor
function = T_analytical
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-12
pressure_l_abs_tol = 1e-12
energy_l_abs_tol = 1e-12
momentum_l_tol = 0
pressure_l_tol = 0
energy_l_tol = 0
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system'
pressure_system = 'pressure_system'
energy_system = 'energy_system'
momentum_equation_relaxation = 0.7
pressure_variable_relaxation = 0.3
energy_equation_relaxation = 0.95
num_iterations = 100
pressure_absolute_tolerance = 1e-8
momentum_absolute_tolerance = 1e-8
energy_absolute_tolerance = 1e-6
print_fields = false
momentum_l_max_its = 200
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
energy_petsc_options_iname = '-pc_type -pc_hypre_type'
energy_petsc_options_value = 'hypre boomeramg'
continue_on_max_its = true
[]
[Outputs]
[out]
type = CSV
[]
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/2d-symmetric/channel.i)
mu = 2.6
rho = 1.2
advected_interp_method = 'upwind'
u_inlet = 1.1
half_width = 0.2
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '1.0'
dy = '${half_width}'
ix = '30'
iy = '15'
subdomain_id = '0'
[]
allow_renumbering = false
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system'
previous_nl_solution_required = true
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = 0.5
solver_sys = u_system
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
initial_condition = 0.0
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
initial_condition = 0.2
[]
[]
[FVInterpolationMethods]
[upwind]
type = FVAdvectedUpwind
[]
[]
[LinearFVKernels]
inactive = v_viscous_forcing
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[v_viscous_forcing]
type = LinearFVRZViscousSource
variable = vel_y
mu = ${mu}
momentum_component = 'y'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[]
[LinearFVBCs]
[inlet-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_x
functor = ${u_inlet}
[]
[inlet-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_y
functor = '0.0'
[]
[walls-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top'
variable = vel_x
functor = 0.0
[]
[walls-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top'
variable = vel_y
functor = 0.0
[]
[symmetry-u]
type = LinearFVVelocitySymmetryBC
variable = vel_x
momentum_component = x
u = vel_x
v = vel_y
boundary = 'bottom'
[]
[symmetry-v]
type = LinearFVVelocitySymmetryBC
variable = vel_y
momentum_component = y
u = vel_x
v = vel_y
boundary = 'bottom'
[]
[outlet_u]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_x
use_two_term_expansion = false
boundary = 'right'
[]
[outlet_v]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_y
use_two_term_expansion = false
boundary = 'right'
[]
[outlet_p]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'right'
variable = pressure
functor = 1.4
[]
[pressure-extrapolation]
type = LinearFVExtrapolatedPressureBC
boundary = 'top left'
variable = pressure
use_two_term_expansion = true
[]
[symmetry-p]
type = LinearFVPressureSymmetryBC
variable = pressure
boundary = 'bottom'
HbyA_flux = 'HbyA' # Functor created in the RhieChowMassFlux UO
[]
[]
[Functions]
[u_parabolic_profile]
type = ParsedFunction
expression = '3/2*${u_inlet}*(1 - pow(y/${half_width}, 2))' # Poiseuille profile
[]
[u_parabolic_profile_rz]
type = ParsedFunction
expression = '2*${u_inlet}*(1 - pow(y/${half_width}, 2))' # Cylindrical profile
[]
[]
[AuxVariables]
[vel_exact]
type = MooseLinearVariableFVReal
[]
[]
[AuxKernels]
[assign_vel_exact]
type = FunctionAux
variable = vel_exact
function = u_parabolic_profile
execute_on = TIMESTEP_END
[]
[]
[VectorPostprocessors]
[outlet_velocity_profile]
type = SideValueSampler
variable = 'vel_x vel_exact'
boundary = 'right'
sort_by = 'y'
execute_on = TIMESTEP_END
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-12
pressure_l_abs_tol = 1e-12
momentum_l_tol = 0
pressure_l_tol = 0
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
momentum_equation_relaxation = 0.5
pressure_variable_relaxation = 0.3
num_iterations = 1000
pressure_absolute_tolerance = 1e-10
momentum_absolute_tolerance = 1e-10
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
print_fields = false
continue_on_max_its = true
[]
[Outputs]
csv = true
execute_on = timestep_end
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/2d-scalar/channel-physics.i)
mu = 2.6
rho = 1.0
advected_interp_method = 'upwind'
scalar_advected_interp_method = ${advected_interp_method}
k1 = 0.1
k2 = 0.2
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '0.25 0.25'
dy = '0.2'
ix = '5 5'
iy = '5'
subdomain_id = '0 1'
[]
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system s1_system s2_system'
[]
[Physics]
[NavierStokes]
[FlowSegregated/flow]
velocity_variable = 'vel_x vel_y'
pressure_variable = 'pressure'
initial_velocity = '0.5 0 0'
initial_pressure = '0.2'
density = ${rho}
dynamic_viscosity = ${mu}
# use inlet for moving wall to match the reference input
# we could also use a noslip BC with a velocity wall functor
inlet_boundaries = 'left'
momentum_inlet_types = 'fixed-velocity'
momentum_inlet_functors = '1.1 0'
wall_boundaries = 'top bottom'
momentum_wall_types = 'noslip noslip'
outlet_boundaries = 'right'
momentum_outlet_types = 'fixed-pressure'
pressure_functors = '1.4'
orthogonality_correction = false
pressure_two_term_bc_expansion = false
momentum_advection_interpolation = ${advected_interp_method}
[]
[ScalarTransportSegregated/scalar]
passive_scalar_names = 'scalar1 scalar2'
system_names = 's1_system s2_system'
initial_scalar_variables = '1.1 3'
passive_scalar_diffusivity = '${k1} ${k2}'
passive_scalar_inlet_types = 'fixed-value fixed-value'
passive_scalar_inlet_functors = '1; 2'
passive_scalar_advection_interpolation = ${scalar_advected_interp_method}
passive_scalar_two_term_bc_expansion = false
use_nonorthogonal_correction = false
[]
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-13
pressure_l_abs_tol = 1e-13
passive_scalar_l_abs_tol = 1e-13
momentum_l_tol = 0
pressure_l_tol = 0
passive_scalar_l_tol = 0
rhie_chow_user_object = 'ins_rhie_chow_interpolator'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
passive_scalar_systems = 's1_system s2_system'
momentum_equation_relaxation = 0.8
passive_scalar_equation_relaxation = '0.9 0.9'
pressure_variable_relaxation = 0.3
# We need to converge the problem to show conservation
num_iterations = 200
pressure_absolute_tolerance = 1e-10
momentum_absolute_tolerance = 1e-10
passive_scalar_absolute_tolerance = '1e-10 1e-10'
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
passive_scalar_petsc_options_iname = '-pc_type -pc_hypre_type'
passive_scalar_petsc_options_value = 'hypre boomeramg'
print_fields = false
continue_on_max_its = true
[]
[Outputs]
exodus = true
execute_on = timestep_end
hide = 'pressure vel_x vel_y'
[]
(modules/navier_stokes/test/tests/finite_volume/wcns/enthalpy_equation/1d_test_h_fp.i)
L = 30
nx = 600
bulk_u = 0.01
p_ref = 101325.0
T_in = 860.
q_source = 20000.
advected_interp_method = 'upwind'
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
xmin = 0
xmax = ${L}
nx = ${nx}
[]
allow_renumbering = false
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
advected_interp_method = ${advected_interp_method}
u = vel_x
[]
[Problem]
linear_sys_names = 'u_system pressure_system energy_system'
previous_nl_solution_required = true
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
pressure = pressure
rho = 'rho'
p_diffusion_kernel = p_diffusion
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
solver_sys = u_system
initial_condition = ${bulk_u}
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
initial_condition = ${p_ref}
[]
[h]
type = MooseLinearVariableFVReal
solver_sys = energy_system
initial_condition = ${fparse 860.*240.}
[]
[]
[AuxVariables]
[rho_var]
type = MooseLinearVariableFVReal
[]
[cp_var]
type = MooseLinearVariableFVReal
[]
[mu_var]
type = MooseLinearVariableFVReal
[]
[k_var]
type = MooseLinearVariableFVReal
[]
[T]
type = MooseLinearVariableFVReal
initial_condition = ${T_in}
[]
[h_aux]
type = MooseLinearVariableFVReal
[]
[]
[FVInterpolationMethods]
[upwind]
type = FVAdvectedUpwind
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = ${advected_interp_method}
mu = 'mu'
momentum_component = 'x'
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[temp_advection]
type = LinearFVEnergyAdvection
variable = h
[]
[source]
type = LinearFVSource
variable = h
source_density = source_func
[]
[]
[LinearFVBCs]
[inlet_u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_x
functor = ${bulk_u}
[]
[inlet_h]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = h
boundary = 'left'
functor = 'h_from_p_T'
[]
[inlet_T]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T
boundary = 'left'
functor = ${T_in}
[]
[outlet_p]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'right'
variable = pressure
functor = ${p_ref}
[]
[outlet_h]
type = LinearFVAdvectionDiffusionOutflowBC
variable = h
use_two_term_expansion = false
boundary = 'right'
[]
[outlet_u]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_x
use_two_term_expansion = false
boundary = 'right'
[]
[]
[FluidProperties]
[lead]
type = LeadFluidProperties
[]
[]
[FunctorMaterials]
[enthalpy_material]
type = LinearFVEnthalpyFunctorMaterial
pressure = ${p_ref}
T_fluid = T
h = h
fp = lead
[]
[fluid_props_to_mat_props]
type = GeneralFunctorFluidProps
fp = lead
pressure = ${p_ref}
T_fluid = 'T'
speed = 1
porosity = 1
characteristic_length = 1
[]
[source_func]
type = ADParsedFunctorMaterial
property_name = source_func
functor_names = 'rho'
expression = ${q_source}
[]
[]
[AuxKernels]
[rho_out]
type = FunctorAux
functor = 'rho'
variable = 'rho_var'
execute_on = 'NONLINEAR'
[]
[cp_out]
type = FunctorAux
functor = 'cp'
variable = 'cp_var'
execute_on = 'NONLINEAR'
[]
[mu_out]
type = FunctorAux
functor = 'mu'
variable = 'mu_var'
execute_on = 'NONLINEAR'
[]
[k_out]
type = FunctorAux
functor = 'k'
variable = 'k_var'
execute_on = 'NONLINEAR'
[]
[T_from_h_functor_aux]
type = FunctorAux
functor = 'T_from_p_h'
variable = 'T'
execute_on = 'NONLINEAR'
[]
[h_from_T_functor_aux]
type = FunctorAux
functor = 'h_from_p_T'
variable = 'h_aux'
execute_on = 'NONLINEAR'
[]
[]
[Postprocessors]
[T_out_sim]
type = ElementalVariableValue
variable = T
elementid = ${fparse nx-1}
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-12
pressure_l_abs_tol = 1e-12
energy_l_abs_tol = 1e-12
momentum_l_tol = 0
pressure_l_tol = 0
energy_l_tol = 0
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system'
pressure_system = 'pressure_system'
energy_system = 'energy_system'
momentum_equation_relaxation = 0.7
pressure_variable_relaxation = 0.3
energy_equation_relaxation = 0.95
num_iterations = 100
pressure_absolute_tolerance = 1e-8
momentum_absolute_tolerance = 1e-8
energy_absolute_tolerance = 1e-6
print_fields = false
momentum_l_max_its = 200
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
energy_petsc_options_iname = '-pc_type -pc_hypre_type'
energy_petsc_options_value = 'hypre boomeramg'
continue_on_max_its = true
[]
[Outputs]
[out]
type = CSV
[]
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/2d/2d-velocity-pressure.i)
mu = 2.6
rho = 1.0
advected_interp_method = 'average'
pressure_gradient_method = 'green-gauss'
[Mesh]
allow_renumbering = false # Keep IDs stable for the ID-sorted ElementValueSampler output.
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '0.3'
dy = '0.3'
ix = '3'
iy = '3'
[]
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system'
previous_nl_solution_required = true
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = 0.5
solver_sys = u_system
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
initial_condition = 0.0
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
initial_condition = 0.2
gradient_method = ${pressure_gradient_method}
[]
[]
[FVGradientMethods]
[gg]
type = FVGreenGaussGradient
[]
[reconstructed]
type = FVReconstructedPressureGradient
base_gradient_method = green-gauss
gradient_relaxation = 0.1
[]
[]
[FVInterpolationMethods]
[average]
type = FVGeometricAverage
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[]
[LinearFVBCs]
inactive = 'inlet_and_wall_pressure_flux'
[inlet-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_x
functor = '1.1'
[]
[inlet-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_y
functor = '0.0'
[]
[walls-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom'
variable = vel_x
functor = 0.0
[]
[walls-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom'
variable = vel_y
functor = 0.0
[]
[outlet_p]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'right'
variable = pressure
functor = 1.4
[]
[inlet_and_wall_pressure_flux]
type = LinearFVPressureFluxBC
boundary = 'left top bottom'
variable = pressure
HbyA_flux = HbyA
Ainv = Ainv
u = vel_x
v = vel_y
rho = ${rho}
[]
[outlet_u]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_x
use_two_term_expansion = false
boundary = right
[]
[outlet_v]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_y
use_two_term_expansion = false
boundary = right
[]
[]
[VectorPostprocessors]
[solution]
type = ElementValueSampler
variable = 'vel_x vel_y pressure'
sort_by = id
execute_on = TIMESTEP_END
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-10
pressure_l_abs_tol = 1e-10
momentum_l_tol = 0
pressure_l_tol = 0
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
momentum_equation_relaxation = 0.8
pressure_variable_relaxation = 0.3
num_iterations = 100
pressure_absolute_tolerance = 1e-10
momentum_absolute_tolerance = 1e-10
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
print_fields = false
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/steady-transient-compare/simple.i)
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-10
pressure_l_abs_tol = 1e-10
energy_l_abs_tol = 1e-10
momentum_l_tol = 0
pressure_l_tol = 0
energy_l_tol = 0
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
energy_system = 'energy_system'
momentum_equation_relaxation = 0.9
energy_equation_relaxation = 1.0
pressure_variable_relaxation = 0.3
num_iterations = 200
pressure_absolute_tolerance = 1e-10
momentum_absolute_tolerance = 1e-10
energy_absolute_tolerance = 1e-10
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
energy_petsc_options_iname = '-pc_type -pc_hypre_type'
energy_petsc_options_value = 'hypre boomeramg'
print_fields = false
[]
(modules/navier_stokes/test/tests/finite_volume/ins/natural_convection/linear_segregated/2d/diff_heated_cavity_s2s_rad.i)
################################################################################
# MATERIAL PROPERTIES
################################################################################
rho = 3279.
T_0 = 875.0
mu = 1.
k_cond = 38.0
cp = 640.
alpha = 3.26e-5
eps = 1.0
rad_left = 'left_0 left_1 left_2 left_3 left_4'
rad_right = 'right_0 right_1 right_2 right_3 right_4'
rad_top = 'top_0 top_1 top_2 top_3 top_4'
rad_bottom = 'bottom_0 bottom_1 bottom_2 bottom_3 bottom_4'
rad_fixed = '${rad_left} ${rad_right}'
rad_variable = '${rad_top} ${rad_bottom}'
rad_all = '${rad_left} ${rad_right} ${rad_top} ${rad_bottom}'
walls = ${rad_all}
[GlobalParams]
rhie_chow_user_object = 'ins_rhie_chow_interpolator'
advected_interp_method = 'upwind'
u = vel_x
v = vel_y
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system energy_system'
previous_nl_solution_required = true
[]
################################################################################
# GEOMETRY
################################################################################
[Mesh]
type = MeshGeneratorMesh
parallel_type = replicated
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 20
ny = 20
[]
[patch_left]
type = PatchSidesetGenerator
input = gen
boundary = left
n_patches = 5
partitioner = centroid
centroid_partitioner_direction = y
[]
[patch_right]
type = PatchSidesetGenerator
input = patch_left
boundary = right
n_patches = 5
partitioner = centroid
centroid_partitioner_direction = y
[]
[patch_top]
type = PatchSidesetGenerator
input = patch_right
boundary = top
n_patches = 5
partitioner = centroid
centroid_partitioner_direction = x
[]
[patch_bottom]
type = PatchSidesetGenerator
input = patch_top
boundary = bottom
n_patches = 5
partitioner = centroid
centroid_partitioner_direction = x
[]
[delete_original_sidesets]
type = BoundaryDeletionGenerator
input = patch_bottom
boundary_names = 'left right top bottom'
[]
[]
################################################################################
# EQUATIONS: VARIABLES, KERNELS & BCS
################################################################################
[UserObjects]
[ins_rhie_chow_interpolator]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
[]
[view_factor_study]
type = ViewFactorRayStudy
boundary = ${rad_all}
execute_on = INITIAL
face_order = FOURTH
polar_quad_order = 12
azimuthal_quad_order = 4
warn_subdomain_hmax = false
[]
[view_factor]
type = RayTracingViewFactor
boundary = ${rad_all}
ray_study_name = view_factor_study
normalize_view_factor = true
execute_on = INITIAL
[]
[gray_lambert]
type = ViewFactorObjectSurfaceRadiation
boundary = ${rad_all}
fixed_temperature_boundary = ${rad_fixed}
fixed_boundary_temperatures = '880 880 880 880 880
870 870 870 870 870'
# Top and bottom are variable-temperature radiating surfaces.
adiabatic_boundary = ''
emissivity = '${eps} ${eps} ${eps} ${eps} ${eps}
${eps} ${eps} ${eps} ${eps} ${eps}
${eps} ${eps} ${eps} ${eps} ${eps}
${eps} ${eps} ${eps} ${eps} ${eps}'
temperature = T_fluid
view_factor_object_name = view_factor
# NONLINEAR updates the radiation solution between SIMPLE iterations.
execute_on = 'NONLINEAR'
[]
[]
[RayBCs]
[view_factor]
type = ViewFactorRayBC
boundary = ${rad_all}
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
solver_sys = u_system
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
[]
[pressure]
type = MooseLinearVariableFVReal
initial_condition = 0
solver_sys = pressure_system
[]
[T_fluid]
type = MooseLinearVariableFVReal
solver_sys = energy_system
initial_condition = 875
[]
[]
[FVInterpolationMethods]
[upwind]
type = FVAdvectedUpwind
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = upwind
mu = ${mu}
momentum_component = 'x'
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[u_buoyancy]
type = LinearFVMomentumBoussinesq
variable = vel_x
T_fluid = T_fluid
gravity = '0 -9.8 0'
rho = ${rho}
ref_temperature = ${T_0}
alpha_name = ${alpha}
momentum_component = 'x'
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = upwind
mu = ${mu}
momentum_component = 'y'
use_nonorthogonal_correction = false
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[v_buoyancy]
type = LinearFVMomentumBoussinesq
variable = vel_y
T_fluid = T_fluid
gravity = '0 -9.81 0'
rho = ${rho}
ref_temperature = ${T_0}
alpha_name = ${alpha}
momentum_component = 'y'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = false
[]
####### FLUID ENERGY EQUATION #######
[heat_advection]
type = LinearFVEnergyAdvection
variable = T_fluid
advected_quantity = temperature
cp = ${cp}
[]
[conduction]
type = LinearFVDiffusion
variable = T_fluid
diffusion_coeff = ${fparse k_cond}
[]
[]
[LinearFVBCs]
[no-slip-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = vel_x
boundary = ${walls}
functor = 0
[]
[no-slip-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = vel_y
boundary = ${walls}
functor = 0
[]
[T_cold]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T_fluid
boundary = ${rad_right}
functor = 870.0
[]
[T_hot]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T_fluid
boundary = ${rad_left}
functor = 880.0
[]
[radiation_top_bottom]
type = LinearFVGrayLambertBC
variable = T_fluid
temperature_radiation = T_fluid
coeff_diffusion = ${k_cond}
surface_radiation_object_name = gray_lambert
boundary = ${rad_variable}
[]
[pressure]
type = LinearFVPressureFluxBC
boundary = ${walls}
variable = pressure
HbyA_flux = HbyA
Ainv = Ainv
u = vel_x
v = vel_y
rho = ${rho}
[]
[]
[FunctorMaterials]
[constant_functors]
type = GenericFunctorMaterial
prop_names = 'cp alpha_b'
prop_values = '${cp} ${alpha}'
[]
[]
################################################################################
# EXECUTION / SOLVE
################################################################################
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-14
pressure_l_abs_tol = 1e-14
energy_l_abs_tol = 1e-14
momentum_l_tol = 0
pressure_l_tol = 0
energy_l_tol = 0
rhie_chow_user_object = 'ins_rhie_chow_interpolator'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
energy_system = 'energy_system'
momentum_equation_relaxation = 0.7
pressure_variable_relaxation = 0.3
energy_equation_relaxation = 0.9
num_iterations = 1500
# Tight enough that the gold file does not depend on the number of MPI ranks.
pressure_absolute_tolerance = 1e-11
momentum_absolute_tolerance = 1e-11
energy_absolute_tolerance = 1e-11
print_fields = false
momentum_l_max_its = 300
pin_pressure = true
pressure_pin_value = 0.0
pressure_pin_point = '0.5 0.0 0.0'
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
energy_petsc_options_iname = '-pc_type -pc_hypre_type'
energy_petsc_options_value = 'hypre boomeramg'
continue_on_max_its = true
[]
################################################################################
# SIMULATION OUTPUTS
################################################################################
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/mms/linear-segregated/2d-symmetric-vortex-rz/2d-symmetric-vortex-rz-spacedependent.i)
mu_ref = 1.2
mu_r = 0.1
mu_x = 0.2
rho_ref = 1.4
rho_r = 0.15
rho_x = 0.25
use_dev = true
advected_interp_method = 'average'
[Problem]
linear_sys_names = 'u_system v_system pressure_system'
previous_nl_solution_required = true
[]
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
[]
coord_type = 'RZ'
rz_coord_axis = x
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = rho_fun
p_diffusion_kernel = p_diffusion
pressure_projection_method = consistent
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = 0.0
solver_sys = u_system
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
initial_condition = 0.0
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
initial_condition = 0.0
[]
[]
[FVInterpolationMethods]
[average]
type = FVGeometricAverage
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = ${advected_interp_method}
mu = mu_fun
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
use_deviatoric_terms = ${use_dev}
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = ${advected_interp_method}
mu = mu_fun
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
use_deviatoric_terms = ${use_dev}
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[u_forcing]
type = LinearFVSource
variable = vel_x
source_density = forcing_u
[]
[v_forcing]
type = LinearFVSource
variable = vel_y
source_density = forcing_v
[]
[v_viscous_forcing]
type = LinearFVRZViscousSource
variable = vel_y
mu = mu_fun
momentum_component = 'y'
u = vel_x
v = vel_y
use_deviatoric_terms = ${use_dev}
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = 'Ainv'
use_nonorthogonal_correction = false
use_nonorthogonal_correction_on_boundary = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = 'HbyA'
force_boundary_execution = true
[]
[]
[LinearFVBCs]
[no-slip-wall-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left right top'
variable = vel_x
functor = exact_u
[]
[no-slip-wall-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left right top'
variable = vel_y
functor = exact_v
[]
[symmetry-u]
type = LinearFVVelocitySymmetryBC
boundary = 'bottom'
variable = vel_x
u = vel_x
v = vel_y
momentum_component = x
[]
[symmetry-v]
type = LinearFVVelocitySymmetryBC
boundary = 'bottom'
variable = vel_y
u = vel_x
v = vel_y
momentum_component = y
[]
[pressure-extrapolation]
type = LinearFVExtrapolatedPressureBC
boundary = 'top left right'
variable = pressure
use_two_term_expansion = true
[]
[pressure-symmetry]
type = LinearFVPressureSymmetryBC
boundary = 'bottom'
variable = pressure
HbyA_flux = 'HbyA'
[]
[]
[AuxVariables]
[vel_x_aux]
type = MooseLinearVariableFVReal
initial_condition = 0.0
[]
[vel_y_aux]
type = MooseLinearVariableFVReal
initial_condition = 0.0
[]
[pressure_aux]
type = MooseLinearVariableFVReal
initial_condition = 0.0
[]
[]
[AuxKernels]
[vel_x_function_aux]
type = FunctionAux
variable = vel_x_aux
function = exact_u
execute_on = TIMESTEP_END
[]
[vel_y_function_aux]
type = FunctionAux
variable = vel_y_aux
function = exact_v
execute_on = TIMESTEP_END
[]
[pressure_function_aux]
type = FunctionAux
variable = pressure_aux
function = exact_p
execute_on = TIMESTEP_END
[]
[]
[Functions]
# --------------------------------------------------
# Material property functions
# --------------------------------------------------
[rho_fun]
type = ParsedFunction
symbol_names = 'rho_ref rho_r rho_x'
symbol_values = '${rho_ref} ${rho_r} ${rho_x}'
expression = 'rho_ref + rho_x*x + rho_r*y'
[]
[mu_fun]
type = ParsedFunction
symbol_names = 'mu_ref mu_r mu_x'
symbol_values = '${mu_ref} ${mu_r} ${mu_x}'
expression = 'mu_ref + mu_x*x + mu_r*y'
[]
# --------------------------------------------------
# Convenience reciprocals
# --------------------------------------------------
[S]
type=ParsedFunction
symbol_names = 'rho_fun'
symbol_values = 'rho_fun'
expression='1.0/rho_fun'
[]
[S2]
type=ParsedFunction
symbol_names = 'rho_fun'
symbol_values = 'rho_fun'
expression='(1.0/rho_fun)^2'
[]
[S3]
type=ParsedFunction
symbol_names = 'rho_fun'
symbol_values = 'rho_fun'
expression='(1.0/rho_fun)^3'
[]
# --------------------------------------------------
# Building blocks
# --------------------------------------------------
[A]
type=ParsedFunction
expression='x^2*(1-x)^2'
[]
[Ap]
type=ParsedFunction
expression='2*x - 6*x^2 + 4*x^3'
[]
[App]
type=ParsedFunction
expression='2 - 12*x + 12*x^2'
[]
[Appp]
type=ParsedFunction
expression='-12 + 24*x'
[]
[Q]
type=ParsedFunction
expression='4*y^2 - 10*y^3 + 6*y^4'
[]
[Qp]
type=ParsedFunction
expression='8*y - 30*y^2 + 24*y^3'
[]
[Qpp]
type=ParsedFunction
expression='8 - 60*y + 72*y^2'
[]
[R]
type=ParsedFunction
expression='y^3 - 2*y^4 + y^5'
[]
[Rp]
type=ParsedFunction
expression='3*y^2 - 8*y^3 + 5*y^4'
[]
[Rpp]
type=ParsedFunction
expression='6*y - 24*y^2 + 20*y^3'
[]
# --------------------------------------------------
# Exact solutions
# --------------------------------------------------
[exact_u]
type=ParsedFunction
symbol_names = 'A Q rho_fun'
symbol_values = 'A Q rho_fun'
expression='A*Q / rho_fun'
[]
[exact_v]
type=ParsedFunction
symbol_names = 'Ap R rho_fun'
symbol_values = 'Ap R rho_fun'
expression='-Ap*R / rho_fun'
[]
[exact_p]
type=ParsedFunction
expression='x*y^2'
[]
# --------------------------------------------------
# First derivatives
# --------------------------------------------------
[ux]
type=ParsedFunction
symbol_names = 'A Ap Q rho_fun rho_x'
symbol_values = 'A Ap Q rho_fun ${rho_x}'
expression='(Ap*Q)/rho_fun - (A*Q*rho_x)/rho_fun^2'
[]
[ur]
type=ParsedFunction
symbol_names = 'A Q Qp rho_fun rho_r'
symbol_values = 'A Q Qp rho_fun ${rho_r}'
expression='(A*Qp)/rho_fun - (A*Q*rho_r)/rho_fun^2'
[]
[vx]
type=ParsedFunction
symbol_names = 'App Ap R rho_fun rho_x'
symbol_values = 'App Ap R rho_fun ${rho_x}'
expression='-(App*R)/rho_fun + (Ap*R*rho_x)/rho_fun^2'
[]
[vr]
type=ParsedFunction
symbol_names = 'Ap Rp R rho_fun rho_r'
symbol_values = 'Ap Rp R rho_fun ${rho_r}'
expression='-(Ap*Rp)/rho_fun + (Ap*R*rho_r)/rho_fun^2'
[]
# --------------------------------------------------
# Second derivatives
# --------------------------------------------------
[uxx]
type = ParsedFunction
symbol_names = 'rho_x App Q S Ap S2 A S3'
symbol_values = '${rho_x} App Q S Ap S2 A S3'
expression = 'App*Q*S - 2*Ap*Q*rho_x*S2 + 2*A*Q*(rho_x^2)*S3'
[]
[uxr]
type = ParsedFunction
symbol_names = 'rho_x rho_r Ap Qp S Q S2 A S3'
symbol_values = '${rho_x} ${rho_r} Ap Qp S Q S2 A S3'
expression = 'Ap*Qp*S - Ap*Q*rho_r*S2 - A*Qp*rho_x*S2 + 2*A*Q*(rho_x*rho_r)*S3'
[]
[urr]
type = ParsedFunction
symbol_names = 'rho_r A Qpp S Qp S2 Q S3'
symbol_values = '${rho_r} A Qpp S Qp S2 Q S3'
expression = 'A*Qpp*S - 2*A*Qp*rho_r*S2 + 2*A*Q*(rho_r^2)*S3'
[]
[vxx]
type = ParsedFunction
symbol_names = 'rho_x Appp R S App S2 Ap S3'
symbol_values = '${rho_x} Appp R S App S2 Ap S3'
expression = '-Appp*R*S + 2*App*R*rho_x*S2 - 2*Ap*R*(rho_x^2)*S3'
[]
[vxr]
type = ParsedFunction
symbol_names = 'rho_x rho_r App Rp S R Ap S2 S3'
symbol_values = '${rho_x} ${rho_r} App Rp S R Ap S2 S3'
expression = '-App*Rp*S + (App*R*rho_r + Ap*Rp*rho_x)*S2 - 2*Ap*R*(rho_x*rho_r)*S3'
[]
[vrr]
type = ParsedFunction
symbol_names = 'rho_r Ap Rpp S Rp S2 R S3'
symbol_values = '${rho_r} Ap Rpp S Rp S2 R S3'
expression = '-Ap*Rpp*S + 2*Ap*Rp*rho_r*S2 - 2*Ap*R*(rho_r^2)*S3'
[]
# --------------------------------------------------
# Derivatives of theta
# --------------------------------------------------
[theta]
type = ParsedFunction
symbol_names = 'ux vr exact_v'
symbol_values = 'ux vr exact_v'
expression = 'ux + vr + (exact_v/y)'
[]
[thetax]
type = ParsedFunction
symbol_names = 'uxx vxr vx'
symbol_values = 'uxx vxr vx'
expression = 'uxx + vxr + (vx/y)'
[]
[thetar]
type = ParsedFunction
symbol_names = 'uxr vrr vr exact_v'
symbol_values = 'uxr vrr vr exact_v'
expression = 'uxr + vrr + (vr/y) - (exact_v/(y^2))'
[]
# --------------------------------------------------
# Stress components
# --------------------------------------------------
[tau_xx]
type=ParsedFunction
symbol_names = 'ux theta mu_fun'
symbol_values = 'ux theta mu_fun'
expression='2*mu_fun*ux - (2.0/3.0)*mu_fun*theta'
[]
[tau_rr]
type=ParsedFunction
symbol_names = 'vr theta mu_fun'
symbol_values = 'vr theta mu_fun'
expression='2*mu_fun*vr - (2.0/3.0)*mu_fun*theta'
[]
[tau_xr]
type=ParsedFunction
symbol_names = 'ur vx mu_fun'
symbol_values = 'ur vx mu_fun'
expression='mu_fun*(ur + vx)'
[]
[tau_tt]
type=ParsedFunction
symbol_names = 'exact_v theta mu_fun'
symbol_values = 'exact_v theta mu_fun'
expression='2*mu_fun*(exact_v/y) - (2.0/3.0)*mu_fun*theta'
[]
# --------------------------------------------------
# Convective fluxes
# --------------------------------------------------
[Fxx]
type=ParsedFunction
symbol_names = 'exact_u rho_fun'
symbol_values = 'exact_u rho_fun'
expression='rho_fun*exact_u*exact_u'
[]
[Fxr]
type=ParsedFunction
symbol_names = 'exact_u exact_v rho_fun'
symbol_values = 'exact_u exact_v rho_fun'
expression='rho_fun*exact_u*exact_v'
[]
[Frx]
type=ParsedFunction
symbol_names = 'exact_u exact_v rho_fun'
symbol_values = 'exact_u exact_v rho_fun'
expression='rho_fun*exact_v*exact_u'
[]
[Frr]
type=ParsedFunction
symbol_names = 'exact_v rho_fun'
symbol_values = 'exact_v rho_fun'
expression='rho_fun*exact_v*exact_v'
[]
# --------------------------------------------------
# Stress derivatives
# --------------------------------------------------
[tau_xx_x]
type = ParsedFunction
symbol_names = 'mu_x ux mu_fun uxx theta thetax'
symbol_values = '${mu_x} ux mu_fun uxx theta thetax'
expression = '2*mu_x*ux + 2*mu_fun*uxx - (2.0/3.0)*(mu_x*theta + mu_fun*thetax)'
[]
[tau_xr_x]
type = ParsedFunction
symbol_names = 'mu_x ur vx mu_fun uxr vxx'
symbol_values = '${mu_x} ur vx mu_fun uxr vxx'
expression = 'mu_x*(ur + vx) + mu_fun*(uxr + vxx)'
[]
[tau_xr_r]
type = ParsedFunction
symbol_names = 'mu_r ur vx mu_fun urr vxr'
symbol_values = '${mu_r} ur vx mu_fun urr vxr'
expression = 'mu_r*(ur + vx) + mu_fun*(urr + vxr)'
[]
[tau_rr_r]
type = ParsedFunction
symbol_names = 'mu_r vr mu_fun vrr theta thetar'
symbol_values = '${mu_r} vr mu_fun vrr theta thetar'
expression = '2*mu_r*vr + 2*mu_fun*vrr - (2.0/3.0)*(mu_r*theta + mu_fun*thetar)'
[]
# --------------------------------------------------
# Conservative flux derivatives
# --------------------------------------------------
[Fxx_x]
type = ParsedFunction
symbol_names = 'rho_x A Ap Q S S2'
symbol_values = '${rho_x} A Ap Q S S2'
expression = '2*A*Ap*Q^2*S - A^2*Q^2*rho_x*S2'
[]
[Frx_r]
type = ParsedFunction
symbol_names = 'rho_r A Ap Qp R Q Rp S S2'
symbol_values = '${rho_r} A Ap Qp R Q Rp S S2'
expression = '-A*Ap*((Qp*R + Q*Rp)*S - Q*R*rho_r*S2)'
[]
[Fxr_x]
type = ParsedFunction
symbol_names = 'rho_x Ap A App Q R S S2'
symbol_values = '${rho_x} Ap A App Q R S S2'
expression = '-((Ap^2 + A*App)*Q*R*S - A*Ap*Q*R*rho_x*S2)'
[]
[Frr_r]
type = ParsedFunction
symbol_names = 'rho_r Ap R Rp S S2'
symbol_values = '${rho_r} Ap R Rp S S2'
expression = 'Ap^2*(2*R*Rp*S - R^2*rho_r*S2)'
[]
# --------------------------------------------------
# Pressure gradients
# --------------------------------------------------
[px]
type=ParsedFunction
expression='y^2'
[]
[pr]
type=ParsedFunction
expression='2*x*y'
[]
# --------------------------------------------------
# Forcing terms
# --------------------------------------------------
[forcing_u]
type = ParsedFunction
symbol_names = 'Fxx_x Frx Frx_r px tau_xx_x tau_xr tau_xr_r'
symbol_values = 'Fxx_x Frx Frx_r px tau_xx_x tau_xr tau_xr_r'
expression = 'Fxx_x + (Frx/y) + Frx_r + px - ( tau_xx_x + (tau_xr/y) + tau_xr_r )'
[]
[forcing_v]
type = ParsedFunction
symbol_names = 'Fxr_x Frr Frr_r pr tau_xr_x tau_rr tau_rr_r tau_tt'
symbol_values = 'Fxr_x Frr Frr_r pr tau_xr_x tau_rr tau_rr_r tau_tt'
expression = 'Fxr_x + (Frr/y) + Frr_r + pr - ( tau_xr_x + (tau_rr/y) + tau_rr_r - (tau_tt)/y )'
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-10
pressure_l_abs_tol = 1e-10
momentum_l_tol = 0
pressure_l_tol = 0
momentum_l_max_its = 500
pressure_l_max_its = 500
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
momentum_equation_relaxation = 0.85
pressure_variable_relaxation = 1.0
num_iterations = 10000
pressure_absolute_tolerance = 1e-8
momentum_absolute_tolerance = 1e-8
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
print_fields = false
continue_on_max_its = true
pin_pressure = true
pressure_pin_value = 0.125
pressure_pin_point = '0.5 0.5 0.0'
[]
[Outputs]
[csv]
type = CSV
execute_on = TIMESTEP_END
[]
[]
[Postprocessors]
[h]
type = AverageElementSize
execute_on = TIMESTEP_END
[]
[L2u]
type = ElementL2FunctorError
approximate = vel_x
exact = exact_u
execute_on = TIMESTEP_END
[]
[L2v]
type = ElementL2FunctorError
approximate = vel_y
exact = exact_v
execute_on = TIMESTEP_END
[]
[L2p]
approximate = pressure
exact = exact_p
type = ElementL2FunctorError
execute_on = TIMESTEP_END
[]
[]
(modules/navier_stokes/test/tests/finite_volume/ins/mms/linear-segregated/2d-vortex/spacedependent_mu/sl.i)
rho = 1
advected_interp_method = 'average'
[Problem]
linear_sys_names = 'u_system v_system pressure_system'
previous_nl_solution_required = true
[]
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
[]
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = 0.0
solver_sys = u_system
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
initial_condition = 0.0
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
initial_condition = 0
[]
[]
[FVInterpolationMethods]
[average]
type = FVGeometricAverage
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = ${advected_interp_method}
mu = 'mu'
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
use_deviatoric_terms = false
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = ${advected_interp_method}
mu = 'mu'
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
use_deviatoric_terms = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[u_forcing]
type = LinearFVSource
variable = vel_x
source_density = forcing_u
[]
[v_forcing]
type = LinearFVSource
variable = vel_y
source_density = forcing_v
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
use_nonorthogonal_correction_on_boundary = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[]
[LinearFVBCs]
[no-slip-wall-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left right top bottom'
variable = vel_x
functor = '0'
[]
[no-slip-wall-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left right top bottom'
variable = vel_y
functor = '0'
[]
[pressure-extrapolation]
type = LinearFVExtrapolatedPressureBC
boundary = 'left right top bottom'
variable = pressure
use_two_term_expansion = true
[]
[]
[Functions]
[exact_u]
type = ParsedFunction
expression = 'x^2*(1-x)^2*(2*y-6*y^2+4*y^3)'
[]
[exact_v]
type = ParsedFunction
expression = '-y^2*(1-y)^2*(2*x-6*x^2+4*x^3)'
[]
[exact_p]
type = ParsedFunction
expression = 'x*(1-x)'
[]
[mu]
type = ParsedFunction
expression = '1+(x-1)*x*(y-1)*y'
[]
[forcing_u]
type = ParsedFunction
expression = '-(2*x-1)*y*(y-1)*(2*x-6*x^2+4*x^3)*(2*y-6*y^2+4*y^3)'
'-(1+x*(x-1)*y*(y-1))*(2*y-6*y^2+4*y^3)*(2-12*x+12*x^2)'
'-(2*y-1)*x*(x-1)*(x^2*(1-x)^2*(2-12*y+12*y^2))'
'-(1+x*(x-1)*y*(y-1))*(x^2*(1-x)^2*(-12+24*y))'
'+1-2*x+rho*4*x^3*y^2*(2*y^2-2*y+1)*(y-1)^2*(-1+2*x)*(x-1)^3'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[forcing_v]
type = ParsedFunction
expression = '(2*y-1)*x*(x-1)*(2*y-6*y^2+4*y^3)*(2*x-6*x^2+4*x^3)'
'+(1+x*(x-1)*y*(y-1))*(2-12*y+12*y^2)*(2*x-6*x^2+4*x^3)'
'+(2*x-1)*y*(y-1)*(y^2*(1-y)^2*(2-12*x+12*x^2))'
'+(1+x*(x-1)*y*(y-1))*(y^2*(1-y)^2*(-12+24*x))'
'+rho*4*y^3*x^2*(2*x^2-2*x+1)*(x-1)^2*(-1+2*y)*(y-1)^3'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[forcing_u_deviatoric]
type = ParsedFunction
expression = '-2*(2*x-1)*y*(y-1)*(2*x-6*x^2+4*x^3)*(2*y-6*y^2+4*y^3)'
'-2*(1+x*(x-1)*y*(y-1))*(2*y-6*y^2+4*y^3)*(2-12*x+12*x^2)'
'-(2*y-1)*x*(x-1)*(x^2*(1-x)^2*(2-12*y+12*y^2)-y^2*(1-y)^2*(2-12*x+12*x^2))'
'-(1+x*(x-1)*y*(y-1))*(x^2*(1-x)^2*(-12+24*y)-(2*y-6*y^2+4*y^3)*(2-12*x+12*x^2))'
'+1-2*x+rho*4*x^3*y^2*(2*y^2-2*y+1)*(y-1)^2*(-1+2*x)*(x-1)^3'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[forcing_v_deviatoric]
type = ParsedFunction
expression = '2*(2*y-1)*x*(x-1)*(2*y-6*y^2+4*y^3)*(2*x-6*x^2+4*x^3)'
'+2*(1+x*(x-1)*y*(y-1))*(2-12*y+12*y^2)*(2*x-6*x^2+4*x^3)'
'-(2*x-1)*y*(y-1)*(x^2*(1-x)^2*(2-12*y+12*y^2)-y^2*(1-y)^2*(2-12*x+12*x^2))'
'-(1+x*(x-1)*y*(y-1))*(-y^2*(1-y)^2*(-12+24*x)+(2*x-6*x^2+4*x^3)*(2-12*y+12*y^2))'
'+rho*4*y^3*x^2*(2*x^2-2*x+1)*(x-1)^2*(-1+2*y)*(y-1)^3'
symbol_names = 'rho'
symbol_values = '${rho}'
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-10
pressure_l_abs_tol = 1e-10
momentum_l_max_its = 30
pressure_l_max_its = 30
momentum_l_tol = 0.0
pressure_l_tol = 0.0
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
momentum_equation_relaxation = 0.8
pressure_variable_relaxation = 0.3
num_iterations = 2000
pressure_absolute_tolerance = 1e-8
momentum_absolute_tolerance = 1e-8
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
print_fields = false
pin_pressure = true
pressure_pin_value = 0.25
pressure_pin_point = '0.5 0.5 0.0'
[]
[Outputs]
exodus = true
[csv]
type = CSV
execute_on = FINAL
[]
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'csv'
execute_on = FINAL
[]
[L2u]
type = ElementL2FunctorError
approximate = vel_x
exact = exact_u
outputs = 'csv'
execute_on = FINAL
[]
[L2v]
type = ElementL2FunctorError
approximate = vel_y
exact = exact_v
outputs = 'csv'
execute_on = FINAL
[]
[L2p]
approximate = pressure
exact = exact_p
type = ElementL2FunctorError
outputs = 'csv'
execute_on = FINAL
[]
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/eigen-multiapp/simple.i)
!include flow.i
[Executioner]
type = SIMPLE
rhie_chow_user_object = ins_rhie_chow_interpolator
momentum_systems = 'u_system v_system'
pressure_system = pressure_system
num_iterations = 1
continue_on_max_its = true
momentum_petsc_options_iname = '-pc_type'
momentum_petsc_options_value = 'jacobi'
pressure_petsc_options_iname = '-pc_type'
pressure_petsc_options_value = 'jacobi'
[]
[MultiApps]
inactive = eigen
[eigen]
type = FullSolveMultiApp
input_files = eigen.i
execute_on = timestep_end
[]
[]
(modules/navier_stokes/test/tests/finite_volume/ins/linear_fv_pressure_flux_bc/internal-neighbor.i)
# Unit properties and speed give the exact constant plug-flow solution used by the CSV comparisons.
mu = 1
rho = 1
flow_block = 2
inlet_speed = 1
[Mesh]
[blocks]
type = CartesianMeshGenerator
dim = 2
dx = '1 1'
dy = '1'
ix = '1 2'
iy = '1'
subdomain_id = '1 ${flow_block}'
[]
[internal_inlet]
type = SideSetsBetweenSubdomainsGenerator
input = blocks
primary_block = ${flow_block}
paired_block = 1
new_boundary = internal_inlet
[]
[delete_inlet_block]
type = BlockDeletionGenerator
input = internal_inlet
block = 1
[]
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system'
previous_nl_solution_required = true
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
block = ${flow_block}
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = ${inlet_speed}
solver_sys = u_system
block = ${flow_block}
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
block = ${flow_block}
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
block = ${flow_block}
[]
[]
[FVInterpolationMethods]
[average]
type = FVGeometricAverage
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = average
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = x
rhie_chow_user_object = rc
use_nonorthogonal_correction = false
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = average
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = y
rhie_chow_user_object = rc
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = x
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = y
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[]
[LinearFVBCs]
[prescribed-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'internal_inlet top bottom'
variable = vel_x
functor = ${inlet_speed}
[]
[prescribed-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'internal_inlet top bottom'
variable = vel_y
functor = 0
[]
[pressure-flux]
type = LinearFVPressureFluxBC
boundary = 'internal_inlet top bottom'
variable = pressure
HbyA_flux = HbyA
Ainv = Ainv
u = vel_x
v = vel_y
rho = ${rho}
[]
[outlet-pressure]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = right
variable = pressure
functor = 0
[]
[outlet-u]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_x
use_two_term_expansion = false
boundary = right
[]
[outlet-v]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_y
use_two_term_expansion = false
boundary = right
[]
[]
[Functions]
[exact-u]
type = ParsedFunction
expression = ${inlet_speed}
[]
[exact-zero]
type = ParsedFunction
expression = 0
[]
[]
[Postprocessors]
[inlet-mass-flow]
type = VolumetricFlowRate
boundary = internal_inlet
vel_x = vel_x
vel_y = vel_y
advected_quantity = ${rho}
rhie_chow_user_object = rc
[]
[u-error]
type = ElementL2FunctorError
approximate = vel_x
exact = exact-u
block = ${flow_block}
[]
[v-error]
type = ElementL2FunctorError
approximate = vel_y
exact = exact-zero
block = ${flow_block}
[]
[pressure-error]
type = ElementL2FunctorError
approximate = pressure
exact = exact-zero
block = ${flow_block}
[]
[]
[Executioner]
type = SIMPLE
# Tight algebraic tolerances make the reported errors sensitive to the internal-boundary sign.
momentum_l_abs_tol = 1e-12
pressure_l_abs_tol = 1e-12
momentum_l_tol = 0
pressure_l_tol = 0
rhie_chow_user_object = rc
momentum_systems = 'u_system v_system'
pressure_system = pressure_system
# These standard SIMPLE relaxation factors provide stable convergence for the tiny test mesh.
momentum_equation_relaxation = 0.8
pressure_variable_relaxation = 0.3
# Fifty iterations is a conservative cap; the exact initialized solution converges much sooner.
num_iterations = 50
# These nonlinear tolerances keep the final CSV errors below the comparison threshold.
pressure_absolute_tolerance = 1e-10
momentum_absolute_tolerance = 1e-10
momentum_petsc_options_iname = '-pc_type'
momentum_petsc_options_value = 'lu'
pressure_petsc_options_iname = '-pc_type'
pressure_petsc_options_value = 'lu'
print_fields = false
[]
[Outputs]
csv = true
execute_on = FINAL
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/2d/momentum-pressure-block-restricted.i)
mu = 2.6
rho = 1.0
advected_interp_method = 'average'
[Mesh]
[flow]
type = CartesianMeshGenerator
dim = 2
dx = '0.15 0.15'
dy = '0.3'
ix = '3 3'
iy = '3'
subdomain_id = '0 1'
[]
[outside]
type = GeneratedMeshGenerator
dim = 2
nx = 1
ny = 1
xmin = 2
xmax = 3
ymin = 2
ymax = 3
[]
[outside_block]
type = SubdomainIDGenerator
input = outside
subdomain_id = 2
[]
[mesh]
type = MeshCollectionGenerator
inputs = 'flow outside_block'
[]
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system'
previous_nl_solution_required = true
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
block = '0 1'
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = 0.5
solver_sys = u_system
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
initial_condition = 0.0
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
initial_condition = 0.2
[]
[]
[FVGradientMethods]
[gg2]
type = FVGreenGaussGradient
[]
[]
[FVInterpolationMethods]
[average]
type = FVGeometricAverage
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[u_pressure_left]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
block = '0 2'
[]
[u_pressure_right]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
block = '1 2'
[]
[v_pressure_left]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
block = '0 2'
[]
[v_pressure_right]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
block = '1 2'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[]
[LinearFVBCs]
[inlet-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_x
functor = '1.1'
[]
[inlet-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_y
functor = '0.0'
[]
[walls-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom'
variable = vel_x
functor = 0.0
[]
[walls-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom'
variable = vel_y
functor = 0.0
[]
[outlet_p]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'right'
variable = pressure
functor = 1.4
[]
[outlet_u]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_x
use_two_term_expansion = false
boundary = right
[]
[outlet_v]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_y
use_two_term_expansion = false
boundary = right
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-10
pressure_l_abs_tol = 1e-10
momentum_l_tol = 0
pressure_l_tol = 0
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
momentum_equation_relaxation = 0.8
pressure_variable_relaxation = 0.3
num_iterations = 100
pressure_absolute_tolerance = 1e-10
momentum_absolute_tolerance = 1e-10
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
print_fields = false
[]
(modules/navier_stokes/test/tests/finite_volume/ins/cht/bulk_heat_transfer/flow-around-square-linear.i)
mu = 0.01
rho = 1.1
k = 0.0005
cp = 10
k_s = 3.0
h_conv = 5
power_density = 10000
advected_interp_method = 'upwind'
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmin = 0
ymin = 0
ymax = 0.1
xmax = 0.1
[]
[subdomain1]
type = SubdomainBoundingBoxGenerator
input = generated_mesh
block_name = subdomain1
bottom_left = '0.04 0.04 0'
block_id = 1
top_right = '0.06 0.06 0'
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = 0
paired_block = 1
new_boundary = interface
[]
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system energy_system solid_energy_system'
previous_nl_solution_required = true
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
block = 0
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = 0.1
solver_sys = u_system
block = 0
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
initial_condition = 0.01
block = 0
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
initial_condition = 0.2
block = 0
[]
[T_fluid]
type = MooseLinearVariableFVReal
solver_sys = energy_system
initial_condition = 300
block = 0
[]
[T_solid]
type = MooseLinearVariableFVReal
solver_sys = solid_energy_system
initial_condition = 500
block = 1
[]
[]
[FVInterpolationMethods]
[upwind]
type = FVAdvectedUpwind
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = true
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = true
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = true
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[h_advection]
type = LinearFVEnergyAdvection
variable = T_fluid
advected_quantity = temperature
cp = ${cp}
advected_interp_method = ${advected_interp_method}
rhie_chow_user_object = 'rc'
[]
[conduction]
type = LinearFVDiffusion
variable = T_fluid
diffusion_coeff = ${k}
use_nonorthogonal_correction = true
[]
[solid-conduction]
type = LinearFVDiffusion
variable = T_solid
diffusion_coeff = ${k_s}
use_nonorthogonal_correction = true
[]
[solid-source]
type = LinearFVSource
variable = T_solid
source_density = ${power_density}
[]
[]
[LinearFVBCs]
[inlet-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_x
functor = '0.1'
[]
[inlet-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_y
functor = '0.0'
[]
[walls-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom interface'
variable = vel_x
functor = 0.0
[]
[walls-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom interface'
variable = vel_y
functor = 0.0
[]
[outlet_p]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'right'
variable = pressure
functor = 1.4
[]
[outlet_u]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_x
use_two_term_expansion = false
boundary = right
[]
[outlet_v]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_y
use_two_term_expansion = false
boundary = right
[]
[inlet_T]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T_fluid
functor = 300
boundary = 'left'
[]
[walls_T]
type = LinearFVAdvectionDiffusionFunctorNeumannBC
variable = T_fluid
functor = 0.0
boundary = 'top bottom'
[]
[outlet_T]
type = LinearFVAdvectionDiffusionOutflowBC
variable = T_fluid
use_two_term_expansion = false
boundary = right
[]
[fluid_solid]
type = LinearFVConvectiveHeatTransferBC
variable = T_fluid
T_solid = T_solid
T_fluid = T_fluid
boundary = interface
h = ${h_conv}
[]
[solid_fluid]
type = LinearFVConvectiveHeatTransferBC
variable = T_solid
T_solid = T_solid
T_fluid = T_fluid
boundary = interface
h = ${h_conv}
[]
[]
[FunctorMaterials]
[rhocpT]
property_name = 'rhocpT'
type = ParsedFunctorMaterial
functor_names = 'T_fluid'
expression = '${rho}*${cp}*T_fluid'
[]
[]
[Postprocessors]
[h_in]
type = VolumetricFlowRate
boundary = left
vel_x = vel_x
vel_y = vel_y
rhie_chow_user_object = rc
advected_quantity = 'rhocpT'
subtract_mesh_velocity = false
[]
[h_out]
type = VolumetricFlowRate
boundary = right
vel_x = vel_x
vel_y = vel_y
rhie_chow_user_object = rc
advected_quantity = 'rhocpT'
advected_interp_method = upwind
subtract_mesh_velocity = false
[]
[power]
type = ElementIntegralFunctorPostprocessor
functor = ${power_density}
block = 1
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-13
pressure_l_abs_tol = 1e-13
energy_l_abs_tol = 1e-13
solid_energy_l_abs_tol = 1e-13
momentum_l_tol = 0
pressure_l_tol = 0
energy_l_tol = 0
solid_energy_l_tol = 0
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
energy_system = 'energy_system'
solid_energy_system = 'solid_energy_system'
momentum_equation_relaxation = 0.8
energy_equation_relaxation = 1.0
pressure_variable_relaxation = 0.3
num_iterations = 1000
pressure_absolute_tolerance = 1e-10
momentum_absolute_tolerance = 1e-10
energy_absolute_tolerance = 1e-10
solid_energy_absolute_tolerance = 1e-10
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
energy_petsc_options_iname = '-pc_type -pc_hypre_type'
energy_petsc_options_value = 'hypre boomeramg'
solid_energy_petsc_options_iname = '-pc_type -pc_hypre_type'
solid_energy_petsc_options_value = 'hypre boomeramg'
print_fields = false
continue_on_max_its = true
[]
[Outputs]
exodus = true
execute_on = timestep_end
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/2d-heated/fluid-physics.i)
mu = 2.6
rho = 1.0
advected_interp_method = 'upwind'
cp = 1000
k = 1
h_cv = 100
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '0.25 0.25'
dy = '0.2'
ix = '5 5'
iy = '5'
subdomain_id = '0 1'
[]
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system energy_system'
previous_nl_solution_required = true
[]
[Physics]
[NavierStokes]
[FlowSegregated/flow]
velocity_variable = 'vel_x vel_y'
pressure_variable = 'pressure'
initial_velocity = '0.5 0 0'
initial_pressure = '0.2'
density = ${rho}
dynamic_viscosity = ${mu}
inlet_boundaries = 'left'
momentum_inlet_types = 'fixed-velocity'
momentum_inlet_functors = '1.1 0'
wall_boundaries = 'top bottom'
momentum_wall_types = 'noslip noslip'
outlet_boundaries = 'right'
momentum_outlet_types = 'fixed-pressure'
pressure_functors = '1.4'
orthogonality_correction = false
pressure_two_term_bc_expansion = false
momentum_two_term_bc_expansion = false
momentum_advection_interpolation = ${advected_interp_method}
[]
[FluidHeatTransferSegregated/energy]
solve_for_enthalpy = false
thermal_conductivity = ${k}
specific_heat = ${cp}
initial_temperature = 300
# Left is an inlet
energy_inlet_types = 'fixed-temperature'
energy_inlet_functors = '300'
# Top and bottom are fixed temperature 'inlets' in the reference kernel-based input
energy_wall_types = 'fixed-temperature fixed-temperature'
energy_wall_functors = '300 300'
external_heat_source = 0
ambient_convection_alpha = ${h_cv}
ambient_temperature = 'T_solid'
ambient_convection_blocks = '1'
energy_advection_interpolation = ${advected_interp_method}
energy_two_term_bc_expansion = false
use_nonorthogonal_correction = false
[]
[]
[]
[AuxVariables]
[T_solid]
type = MooseLinearVariableFVReal
initial_condition = 300
block = 1
[]
[]
[MultiApps]
inactive = 'solid'
[solid]
type = FullSolveMultiApp
input_files = solid.i
execute_on = timestep_begin
no_restore = true
[]
[]
[Transfers]
inactive = 'from_solid to_solid'
[from_solid]
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = solid
source_variable = 'T_solid'
variable = 'T_solid'
execute_on = timestep_begin
from_blocks = 1
[]
[to_solid]
type = MultiAppGeneralFieldShapeEvaluationTransfer
to_multi_app = solid
source_variable = 'T_fluid'
variable = 'T_fluid'
execute_on = timestep_begin
to_blocks = 1
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-13
pressure_l_abs_tol = 1e-13
energy_l_abs_tol = 1e-13
momentum_l_tol = 0
pressure_l_tol = 0
energy_l_tol = 0
rhie_chow_user_object = 'ins_rhie_chow_interpolator'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
energy_system = 'energy_system'
momentum_equation_relaxation = 0.8
energy_equation_relaxation = 0.9
pressure_variable_relaxation = 0.3
num_iterations = 20
pressure_absolute_tolerance = 1e-10
momentum_absolute_tolerance = 1e-10
energy_absolute_tolerance = 1e-10
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
energy_petsc_options_iname = '-pc_type -pc_hypre_type'
energy_petsc_options_value = 'hypre boomeramg'
print_fields = false
continue_on_max_its = true
[]
[Outputs]
exodus = true
execute_on = timestep_end
[]
(modules/navier_stokes/test/tests/finite_volume/ins/radiation_participating_media/p1_radiation_cht_SIMPLE.i)
# Coupled conduction and radiative heat transfer test in the linear FV system using the SIMPLE executioner.
# A 1D P1 radiation model is solved in the fluid region. Energy is solved in the
# fluid and solid region using two different variables. The radiative and conductive flux
# is maintained at the fluid-solid interface using conjugate heat transfer, Robin BCs for
# the solid side and Dirichlet BCs for the fluid side. Fixed temperatures are set at the solid and
# fluid external boundaries.
### Benchmark sources:
### https://hal.science/hal-02070285/document
nx = 10
Tw_left = 1.0
Tw_right = 0.0
sigma = 5.670374419e-8
sigma_a = 1.0
N = 0.1 # Stark number N = k sigma_a / (4*sigma*pow(T_w,3))
k_salt = ${fparse N*4*sigma*pow(Tw_left,3)/sigma_a}
k_solid = ${fparse 4.0*k_salt}
diffusion_coef = ${fparse 1/(3*sigma_a)}
b_eps = 1.0
rho = 1.
mu = 5.
h_s = 0.0
advected_interp_method = 'upwind'
[Mesh]
[salt_mesh]
type = GeneratedMeshGenerator
dim = 1
nx = ${nx}
xmin = 0
xmax = 1
subdomain_ids = 0
[]
[solid_mesh]
type = GeneratedMeshGenerator
dim = 1
nx = ${nx}
xmin = 1
xmax = 2
subdomain_ids = 1
[]
[give_name_solid]
type = RenameBlockGenerator
input = solid_mesh
old_block = 1
new_block = 'solid'
[]
[give_name_salt]
type = RenameBlockGenerator
input = salt_mesh
old_block = 0
new_block = 'salt'
[]
[stitch]
type = StitchMeshGenerator
inputs = 'give_name_salt give_name_solid'
stitch_boundaries_pairs = 'right left'
[]
[interface]
input = stitch
type = SideSetsBetweenSubdomainsGenerator
primary_block = 'solid'
paired_block = 'salt'
new_boundary = interface
[]
# Prevent test diffing on distributed parallel element numbering
allow_renumbering = false
[]
[Problem]
linear_sys_names = 'u_system pressure_system energy_system solid_energy_system radiation_system '
previous_nl_solution_required = true
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
block = 'salt'
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = 1e-6
solver_sys = 'u_system'
block = 'salt'
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = 'pressure_system'
initial_condition = 1e-6
block = 'salt'
[]
[T_fluid]
type = MooseLinearVariableFVReal
solver_sys = 'energy_system'
initial_condition = ${fparse Tw_left/2}
block = 'salt'
[]
[G]
type = MooseLinearVariableFVReal
solver_sys = 'radiation_system'
initial_condition = ${fparse 4*sigma*pow(Tw_left/2,4)}
block = 'salt'
[]
[T_solid]
type = MooseLinearVariableFVReal
solver_sys = 'solid_energy_system'
initial_condition = ${fparse Tw_left/2}
block = 'solid'
[]
[]
[Postprocessors]
[T_fluid_iface]
type = ElementalVariableValue
variable = T_fluid
elementid = ${fparse nx-1}
[]
[T_solid_iface]
type = ElementalVariableValue
variable = T_solid
elementid = ${fparse nx}
[]
[]
[FVInterpolationMethods]
[upwind]
type = FVAdvectedUpwind
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[fluid_conduction]
type = LinearFVDiffusion
variable = T_fluid
diffusion_coeff = ${k_salt}
use_nonorthogonal_correction = false
block = salt
[]
[fluid_radiation]
type = LinearFVP1TemperatureSourceSink
variable = T_fluid
G = 'G'
absorption_coeff = ${sigma_a}
block = salt
[]
[G_diffusion]
type = LinearFVDiffusion
variable = G
diffusion_coeff = ${diffusion_coef}
block = salt
[]
[G_source_and_sink]
type = LinearFVP1RadiationSourceSink
variable = G
temperature_radiation = 'T_fluid'
absorption_coeff = ${sigma_a}
block = salt
[]
[solid_conduction]
type = LinearFVDiffusion
variable = T_solid
diffusion_coeff = ${k_solid}
use_nonorthogonal_correction = false
block = solid
[]
[]
[LinearFVBCs]
# velocity BCs
[walls-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left interface'
variable = vel_x
functor = 0.0
[]
# temperature BCs
[left_bc_T]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T_fluid
boundary = 'left'
functor = ${Tw_left}
[]
[right_bc_T]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T_solid
boundary = 'right'
functor = ${Tw_right}
[]
# G
[right_bc_G]
type = LinearFVP1RadiationMarshakBC
boundary = 'interface'
variable = G
temperature_radiation = 'T_fluid'
coeff_diffusion = ${diffusion_coef}
boundary_emissivity = ${b_eps}
[]
[left_bc_G]
type = LinearFVP1RadiationMarshakBC
boundary = 'left'
variable = G
temperature_radiation = ${Tw_left}
coeff_diffusion = ${diffusion_coef}
boundary_emissivity = ${b_eps}
[]
# cht
[fluid_solid]
type = LinearFVDirichletCHTBC
variable = T_fluid
boundary = interface
functor = interface_temperature_to_fluid_interface
[]
[solid_fluid]
type = LinearFVRobinCHTBC
variable = T_solid
boundary = interface
h = ${h_s}
thermal_conductivity = ${k_solid}
incoming_flux = heat_flux_to_solid_interface
surface_temperature = interface_temperature_to_solid_interface
[]
[]
[Executioner]
type = SIMPLE
num_iterations = 2000
momentum_systems = 'u_system '
pressure_system = 'pressure_system'
rhie_chow_user_object = 'rc'
momentum_l_abs_tol = 1e-8
pressure_l_abs_tol = 1e-7
momentum_l_tol = 0
pressure_l_tol = 0
momentum_equation_relaxation = 0.7
pressure_variable_relaxation = 0.3
momentum_absolute_tolerance = 1e-5
pressure_absolute_tolerance = 1e-5
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
#active_scalar_systems = 'radiation_system'
pm_radiation_systems = 'radiation_system'
energy_system = 'energy_system'
solid_energy_system = 'solid_energy_system'
#active_scalar_l_abs_tol = 1e-14
pm_radiation_l_abs_tol = 1e-11
energy_l_abs_tol = 1e-11
solid_energy_l_abs_tol = 1e-11
#active_scalar_l_tol = 0
pm_radiation_l_tol = 0
energy_l_tol = 0
solid_energy_l_tol = 0
#active_scalar_equation_relaxation = 0.95
pm_radiation_equation_relaxation = 1.0
energy_equation_relaxation = 0.9
energy_absolute_tolerance = 1e-10
solid_energy_absolute_tolerance = 1e-10
#active_scalar_absolute_tolerance = 1e-14
#active_scalar_petsc_options_iname = '-pc_type -pc_hypre_type'
#active_scalar_petsc_options_value = 'hypre boomeramg'
pm_radiation_absolute_tolerance = 1e-10
pm_radiation_petsc_options_iname = '-pc_type -pc_hypre_type'
pm_radiation_petsc_options_value = 'hypre boomeramg'
energy_petsc_options_iname = '-pc_type -pc_hypre_type'
energy_petsc_options_value = 'hypre boomeramg'
solid_energy_petsc_options_iname = '-pc_type -pc_hypre_type'
solid_energy_petsc_options_value = 'hypre boomeramg'
cht_interfaces = 'interface'
cht_solid_flux_relaxation = 0.3
cht_fluid_flux_relaxation = 0.3
cht_solid_temperature_relaxation = 0.3
cht_fluid_temperature_relaxation = 0.3
cht_heat_flux_tolerance = 1e-4
max_cht_fpi = 10
print_fields = false
continue_on_max_its = true
[]
[Outputs]
csv = true
execute_on = timestep_end
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/turbulence/block-restricted/block-ke.i)
H = 1 #halfwidth of the channel
L = 100
Re = 13700
rho = 1
bulk_u = 1
mu = '${fparse rho * bulk_u * 2 * H / Re}'
advected_interp_method = 'upwind'
### k-epsilon Closure Parameters ###
sigma_k = 1.0
sigma_eps = 1.3
C1_eps = 1.44
C2_eps = 1.92
C_mu = 0.09
### Initial and Boundary Conditions ###
intensity = '${fparse 0.16*Re^(-1./8.)}'
k_init = '${fparse 1.5*(intensity * bulk_u)^2}'
eps_init = '${fparse C_mu^0.75 * k_init^1.5 / (2*H)}'
### Modeling parameters ###
bulk_wall_treatment = false
walls = 'walls'
wall_treatment = 'eq_newton' # Options: eq_newton, eq_incremental, eq_linearized, neq
[Mesh]
[block_left]
type = GeneratedMeshGenerator
dim = 2
xmin = '${fparse -2*H}'
xmax = '${fparse -H}'
ymin = 0
ymax = ${L}
nx = 3
ny = 4
[]
[block_1]
type = GeneratedMeshGenerator
dim = 2
xmin = '${fparse -H}'
xmax = 0
ymin = 0
ymax = ${L}
nx = 4
ny = 4
bias_x = '${fparse 1/0.7}'
[]
[block_2]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = ${H}
ymin = 0
ymax = ${L}
nx = 4
ny = 4
bias_x = 0.7
[]
[block_right]
type = GeneratedMeshGenerator
dim = 2
xmin = ${H}
xmax = '${fparse 2*H}'
ymin = 0
ymax = ${L}
nx = 3
ny = 4
[]
[smg]
type = StitchedMeshGenerator
inputs = 'block_left block_1 block_2 block_right'
stitch_boundaries_pairs = 'right left; right left; right left'
[]
[middle]
input = smg
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '${fparse -H} 0 0'
top_right = '${H} ${L} 50'
[]
[walls]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 0
new_boundary = walls
input = middle
[]
# Prevent test diffing on distributed parallel element numbering
allow_renumbering = false
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system TKE_system TKED_system'
previous_nl_solution_required = true
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
block = 1
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = 0.0
solver_sys = u_system
block = 1
[]
[vel_y]
type = MooseLinearVariableFVReal
initial_condition = ${bulk_u}
solver_sys = v_system
block = 1
[]
[pressure]
type = MooseLinearVariableFVReal
initial_condition = 1e-8
solver_sys = pressure_system
block = 1
[]
[TKE]
type = MooseLinearVariableFVReal
solver_sys = TKE_system
initial_condition = ${k_init}
block = 1
[]
[TKED]
type = MooseLinearVariableFVReal
solver_sys = TKED_system
initial_condition = ${eps_init}
block = 1
[]
[]
[FVInterpolationMethods]
[upwind]
type = FVAdvectedUpwind
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = ${advected_interp_method}
mu = 'mu_t'
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
use_deviatoric_terms = yes
[]
[u_diffusion]
type = LinearFVDiffusion
variable = vel_x
diffusion_coeff = ${mu}
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = ${advected_interp_method}
mu = 'mu_t'
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
use_deviatoric_terms = yes
[]
[v_diffusion]
type = LinearFVDiffusion
variable = vel_y
diffusion_coeff = ${mu}
use_nonorthogonal_correction = false
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[TKE_advection]
type = LinearFVTurbulentAdvection
variable = TKE
advected_interp_method_name = ${advected_interp_method}
[]
[TKE_diffusion]
type = LinearFVTurbulentDiffusion
variable = TKE
diffusion_coeff = ${mu}
use_nonorthogonal_correction = false
[]
[TKE_turb_diffusion]
type = LinearFVTurbulentDiffusion
variable = TKE
diffusion_coeff = 'mu_t'
scaling_coeff = ${sigma_k}
use_nonorthogonal_correction = false
[]
[TKE_source_sink]
type = LinearFVTKESourceSink
variable = TKE
u = vel_x
v = vel_y
epsilon = TKED
rho = ${rho}
mu = ${mu}
mu_t = 'mu_t'
walls = ${walls}
wall_treatment = ${wall_treatment}
C_pl = 1e10
[]
[TKED_advection]
type = LinearFVTurbulentAdvection
variable = TKED
advected_interp_method_name = ${advected_interp_method}
walls = ${walls}
[]
[TKED_diffusion]
type = LinearFVTurbulentDiffusion
variable = TKED
diffusion_coeff = ${mu}
use_nonorthogonal_correction = false
walls = ${walls}
[]
[TKED_turb_diffusion]
type = LinearFVTurbulentDiffusion
variable = TKED
diffusion_coeff = 'mu_t'
scaling_coeff = ${sigma_eps}
use_nonorthogonal_correction = false
walls = ${walls}
[]
[TKED_source_sink]
type = LinearFVTKEDSourceSink
variable = TKED
u = vel_x
v = vel_y
tke = TKE
rho = ${rho}
mu = ${mu}
mu_t = 'mu_t'
C1_eps = ${C1_eps}
C2_eps = ${C2_eps}
walls = ${walls}
wall_treatment = ${wall_treatment}
C_pl = 1e10
[]
[]
[LinearFVBCs]
[inlet-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'bottom'
variable = vel_x
functor = 0
[]
[inlet-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'bottom'
variable = vel_y
functor = '${bulk_u}'
[]
[walls-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'walls'
variable = vel_x
functor = 0.0
[]
[walls-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'walls'
variable = vel_y
functor = 0.0
[]
[outlet_u]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'top'
variable = vel_x
use_two_term_expansion = false
[]
[outlet_v]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'top'
variable = vel_y
use_two_term_expansion = false
[]
[outlet_p]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top'
variable = pressure
functor = 0.0
[]
[inlet_TKE]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'bottom'
variable = TKE
functor = '${k_init}'
[]
[outlet_TKE]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'top'
variable = TKE
use_two_term_expansion = false
[]
[inlet_TKED]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'bottom'
variable = TKED
functor = '${eps_init}'
[]
[outlet_TKED]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'top'
variable = TKED
use_two_term_expansion = false
[]
[walls_mu_t]
type = LinearFVTurbulentViscosityWallFunctionBC
boundary = 'walls'
variable = 'mu_t'
u = vel_x
v = vel_y
rho = ${rho}
mu = ${mu}
tke = TKE
wall_treatment = ${wall_treatment}
[]
[]
[AuxVariables]
[mu_t]
type = MooseLinearVariableFVReal
initial_condition = '${fparse rho * C_mu * ${k_init}^2 / eps_init}'
block = 1
[]
[yplus]
type = MooseLinearVariableFVReal
block = 1
[]
[mu_eff]
type = MooseLinearVariableFVReal
initial_condition = '${fparse rho * C_mu * ${k_init}^2 / eps_init}'
block = 1
[]
[]
[AuxKernels]
[compute_mu_t]
type = kEpsilonViscosityAux
variable = mu_t
C_mu = ${C_mu}
tke = TKE
epsilon = TKED
mu = ${mu}
rho = ${rho}
u = vel_x
v = vel_y
bulk_wall_treatment = ${bulk_wall_treatment}
walls = ${walls}
wall_treatment = ${wall_treatment}
execute_on = 'NONLINEAR'
mu_t_ratio_max = 1e20
[]
[compute_y_plus]
type = RANSYPlusAux
variable = yplus
tke = TKE
mu = ${mu}
rho = ${rho}
u = vel_x
v = vel_y
walls = ${walls}
wall_treatment = ${wall_treatment}
execute_on = 'NONLINEAR'
[]
[compute_mu_eff]
type = ParsedAux
variable = 'mu_eff'
coupled_variables = 'mu_t'
expression = 'mu_t + ${mu}'
execute_on = 'NONLINEAR'
[]
[]
[Executioner]
type = SIMPLE
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
turbulence_systems = 'TKE_system TKED_system'
momentum_l_abs_tol = 1e-14
pressure_l_abs_tol = 1e-14
turbulence_l_abs_tol = 1e-14
momentum_l_tol = 1e-14
pressure_l_tol = 1e-14
turbulence_l_tol = 1e-14
momentum_equation_relaxation = 0.7
pressure_variable_relaxation = 0.3
turbulence_equation_relaxation = '0.2 0.2'
turbulence_field_relaxation = '0.2 0.2'
num_iterations = 1000
pressure_absolute_tolerance = 1e-12
momentum_absolute_tolerance = 1e-12
turbulence_absolute_tolerance = '1e-12 1e-12'
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
turbulence_petsc_options_iname = '-pc_type -pc_hypre_type'
turbulence_petsc_options_value = 'hypre boomeramg'
print_fields = false
continue_on_max_its = true
[]
[Outputs]
exodus = true
execute_on = timestep_end
csv = true
[]
[VectorPostprocessors]
[line_wall]
type = LineValueSampler
start_point = '${fparse 0.99 * H} ${fparse 0.125 * L} 0'
end_point = '${fparse 0.99 * H} ${fparse 0.875 * L} 0'
num_points = ${Mesh/block_1/nx}
variable = 'vel_x vel_y pressure TKE TKED'
sort_by = 'x'
execute_on = 'timestep_end'
[]
[line_center_channel]
type = LineValueSampler
start_point = ' ${fparse 0.0001 * H} ${fparse 0.125 * L} 0'
end_point = '${fparse 0.0001 * H} ${fparse 0.875 * L} 0'
num_points = ${Mesh/block_1/nx}
variable = 'vel_x vel_y pressure TKE TKED'
sort_by = 'x'
execute_on = 'timestep_end'
[]
[line_quarter_radius_channel]
type = LineValueSampler
start_point = '${fparse 0.51 * H} ${fparse 0.125 * L} 0'
end_point = '${fparse 0.51 * H} ${fparse 0.875 * L} 0'
num_points = ${Mesh/block_1/nx}
variable = 'vel_x vel_y pressure TKE TKED'
sort_by = 'x'
execute_on = 'timestep_end'
[]
[]
(modules/navier_stokes/test/tests/finite_volume/ins/mms/linear-segregated/2d-vortex/2d-vortex.i)
mu = 1
rho = 1000
advected_interp_method = 'average'
pressure_gradient_method = 'green-gauss'
[Problem]
linear_sys_names = 'u_system v_system pressure_system'
previous_nl_solution_required = true
[]
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
[]
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
pressure_projection_method = CONSISTENT
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = 0.0
solver_sys = u_system
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
initial_condition = 0.0
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
initial_condition = 0
[]
[]
[FVGradientMethods]
[reconstructed]
type = FVReconstructedPressureGradient
base_gradient_method = green-gauss
gradient_relaxation = 0.2
[]
[]
[FVInterpolationMethods]
[average]
type = FVGeometricAverage
[]
[upwind]
type = FVAdvectedUpwind
[]
[min_mod]
type = FVAdvectedMinmodWeightBased
[]
[vanLeer]
type = FVAdvectedVanLeerWeightBased
[]
[venkatakrishnan]
type = FVAdvectedMUSCLDeferredCorrection
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
gradient_method = ${pressure_gradient_method}
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
gradient_method = ${pressure_gradient_method}
[]
[u_forcing]
type = LinearFVSource
variable = vel_x
source_density = forcing_u
[]
[v_forcing]
type = LinearFVSource
variable = vel_y
source_density = forcing_v
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
use_nonorthogonal_correction_on_boundary = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[]
[LinearFVBCs]
[no-slip-wall-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left right top bottom'
variable = vel_x
functor = '0'
[]
[no-slip-wall-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left right top bottom'
variable = vel_y
functor = '0'
[]
[pressure-extrapolation]
type = LinearFVExtrapolatedPressureBC
boundary = 'left right top bottom'
variable = pressure
use_two_term_expansion = true
[]
[]
[Functions]
[exact_u]
type = ParsedFunction
expression = 'x^2*(1-x)^2*(2*y-6*y^2+4*y^3)'
[]
[exact_v]
type = ParsedFunction
expression = '-y^2*(1-y)^2*(2*x-6*x^2+4*x^3)'
[]
[exact_p]
type = ParsedFunction
expression = 'x*(1-x)'
[]
[forcing_u]
type = ParsedFunction
expression = '-4*mu*(-1+2*y)*(y^2-6*x*y^2+6*x^2*y^2-y+6*x*y-6*x^2*y+3*x^2-6*x^3+3*x^4)+1-2*x+rho*4*x^3*y^2*(2*y^2-2*y+1)*(y-1)^2*(-1+2*x)*(x-1)^3'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[forcing_v]
type = ParsedFunction
expression = '4*mu*(-1+2*x)*(x^2-6*y*x^2+6*x^2*y^2-x+6*x*y-6*x*y^2+3*y^2-6*y^3+3*y^4)+rho*4*y^3*x^2*(2*x^2-2*x+1)*(x-1)^2*(-1+2*y)*(y-1)^3'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-8
pressure_l_abs_tol = 1e-8
momentum_l_tol = 0
pressure_l_tol = 0
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
momentum_equation_relaxation = 0.7
pressure_variable_relaxation = 1.0
num_iterations = 20000
pressure_absolute_tolerance = 1e-8
momentum_absolute_tolerance = 1e-8
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
print_fields = false
pin_pressure = true
pressure_pin_value = 0.25
pressure_pin_point = '0.5 0.5 0.0'
[]
[Outputs]
exodus = true
[csv]
type = CSV
execute_on = FINAL
[]
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'csv'
execute_on = FINAL
[]
[L2u]
type = ElementL2FunctorError
approximate = vel_x
exact = exact_u
outputs = 'csv'
execute_on = FINAL
[]
[L2v]
type = ElementL2FunctorError
approximate = vel_y
exact = exact_v
outputs = 'csv'
execute_on = FINAL
[]
[L2p]
approximate = pressure
exact = exact_p
type = ElementL2FunctorError
outputs = 'csv'
execute_on = FINAL
[]
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/SIMPLEC/3d/3d-velocity-pressure.i)
mu = 2.6
rho = 1.0
advected_interp_method = 'average'
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 3
dx = '1.0'
dy = '0.3'
dz = '0.3'
ix = '10'
iy = '3'
iz = '3'
[]
[]
[Problem]
linear_sys_names = 'u_system v_system w_system pressure_system'
previous_nl_solution_required = true
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
w = vel_z
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
pressure_projection_method = consistent
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = 0.5
solver_sys = u_system
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
initial_condition = 0.0
[]
[vel_z]
type = MooseLinearVariableFVReal
solver_sys = w_system
initial_condition = 0.0
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
initial_condition = 0.2
[]
[]
[FVInterpolationMethods]
[average]
type = FVGeometricAverage
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
w = vel_z
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
w = vel_z
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[w_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_z
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
w = vel_z
momentum_component = 'z'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[w_pressure]
type = LinearFVMomentumPressure
variable = vel_z
pressure = pressure
momentum_component = 'z'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[]
[LinearFVBCs]
[inlet-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_x
functor = '1.1'
[]
[inlet-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_y
functor = '0.0'
[]
[inlet-w]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_z
functor = '0.0'
[]
[walls-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom back front'
variable = vel_x
functor = 0.0
[]
[walls-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom back front'
variable = vel_y
functor = 0.0
[]
[walls-w]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom back front'
variable = vel_z
functor = 0.0
[]
[outlet_p]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'right'
variable = pressure
functor = 1.4
[]
[outlet_u]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_x
use_two_term_expansion = false
boundary = right
[]
[outlet_v]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_y
use_two_term_expansion = false
boundary = right
[]
[outlet_w]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_z
use_two_term_expansion = false
boundary = right
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-10
pressure_l_abs_tol = 1e-10
momentum_l_tol = 0
pressure_l_tol = 0
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system w_system'
pressure_system = 'pressure_system'
momentum_equation_relaxation = 0.8
pressure_variable_relaxation = 1.0
num_iterations = 100
pressure_absolute_tolerance = 1e-10
momentum_absolute_tolerance = 1e-10
momentum_petsc_options_iname = '-pc_type -pc_hypre_type -pc_hypre_boomeramg_agg_nl -pc_hypre_boomeramg_agg_num_paths -pc_hypre_boomeramg_truncfactor -pc_hypre_boomeramg_strong_threshold -pc_hypre_boomeramg_coarsen_type -pc_hypre_boomeramg_interp_type'
momentum_petsc_options_value = 'hypre boomeramg 4 1 0.1 0.6 HMIS ext+i'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type -pc_hypre_boomeramg_agg_nl -pc_hypre_boomeramg_agg_num_paths -pc_hypre_boomeramg_truncfactor -pc_hypre_boomeramg_strong_threshold -pc_hypre_boomeramg_coarsen_type -pc_hypre_boomeramg_interp_type'
pressure_petsc_options_value = 'hypre boomeramg 2 1 0.1 0.6 HMIS ext+i'
print_fields = false
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/turbulence/channel/linear-segregated/channel_scalars-physics.i)
!include header_and_mesh.i
qs = 5
[Problem]
linear_sys_names = 'u_system v_system pressure_system scalar_system TKE_system TKED_system'
previous_nl_solution_required = true
[]
[Physics]
[NavierStokes]
[FlowSegregated/flow]
velocity_variable = 'vel_x vel_y'
pressure_variable = 'pressure'
# Initial conditions
initial_velocity = '${bulk_u} 0 0'
initial_pressure = '1e-8'
# Material properties
density = ${rho}
dynamic_viscosity = ${mu}
# Boundary conditions
inlet_boundaries = 'left'
momentum_inlet_types = 'fixed-velocity'
momentum_inlet_functors = '${bulk_u} 0'
wall_boundaries = 'top bottom'
momentum_wall_types = 'noslip noslip'
outlet_boundaries = 'right'
momentum_outlet_types = 'fixed-pressure'
pressure_functors = '0'
# Numerical parameters
include_deviatoric_stress = true
orthogonality_correction = false
pressure_two_term_bc_expansion = false
momentum_two_term_bc_expansion = false
momentum_advection_interpolation = ${advected_interp_method}
system_names = 'u_system v_system pressure_system'
[]
[ScalarTransportSegregated/scalar]
# turbulence Physics coupling picked up automatically
passive_scalar_names = 'advected_scalar'
passive_scalar_inlet_types = 'fixed-value'
passive_scalar_inlet_functors = '0'
passive_scalar_source = '${qs}'
system_names = 'scalar_system'
[]
[TurbulenceSegregated/k-epsilon]
# Model
turbulence_handling = 'k-epsilon'
tke_name = TKE
tked_name = TKED
system_names = 'TKE_system TKED_system'
scalar_transport_physics = scalar
initial_tke = ${k_init}
initial_tked = ${eps_init}
# Model parameters
mu_t_ratio_max = 1e20
sigma_k = ${sigma_k}
sigma_eps = ${sigma_eps}
C_pl = 1e10
C1_eps = ${C1_eps}
C2_eps = ${C2_eps}
Sc_t = 0.9
turbulence_walls = ${walls}
wall_treatment_eps = ${wall_treatment}
bulk_wall_treatment = ${bulk_wall_treatment}
use_nonorthogonal_correction = false
[]
[]
[]
# Boundary conditions are not implemented for turbulent quantities at this time
[LinearFVBCs]
[inlet_TKE]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = TKE
functor = '${k_init}'
[]
[outlet_TKE]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'right'
variable = TKE
use_two_term_expansion = false
[]
[inlet_TKED]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = TKED
functor = '${eps_init}'
[]
[outlet_TKED]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'right'
variable = TKED
use_two_term_expansion = false
[]
[]
[Executioner]
type = SIMPLE
rhie_chow_user_object = 'ins_rhie_chow_interpolator'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
passive_scalar_systems = 'scalar_system'
turbulence_systems = 'TKE_system TKED_system'
momentum_l_abs_tol = 1e-14
pressure_l_abs_tol = 1e-14
turbulence_l_abs_tol = 1e-14
passive_scalar_l_abs_tol = 1e-14
momentum_l_tol = 1e-14
pressure_l_tol = 1e-14
passive_scalar_l_tol = 1e-14
turbulence_l_tol = 1e-14
momentum_equation_relaxation = 0.7
pressure_variable_relaxation = 0.3
passive_scalar_equation_relaxation = 0.8
turbulence_equation_relaxation = '0.2 0.2'
turbulence_field_relaxation = '0.2 0.2'
num_iterations = 1000
pressure_absolute_tolerance = 1e-12
momentum_absolute_tolerance = 1e-12
passive_scalar_absolute_tolerance = 1e-12
turbulence_absolute_tolerance = '1e-12 1e-12'
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
passive_scalar_petsc_options_iname = '-pc_type -pc_hypre_type'
passive_scalar_petsc_options_value = 'hypre boomeramg'
turbulence_petsc_options_iname = '-pc_type -pc_hypre_type'
turbulence_petsc_options_value = 'hypre boomeramg'
print_fields = false
continue_on_max_its = true
[]
variables_to_sample = 'vel_x vel_y pressure advected_scalar TKE TKED'
!include postprocessing.i
# More postprocessor for scalar conservation analysis
[Postprocessors]
[outlet_scalar]
type = SideAverageValue
boundary = right
variable = advected_scalar
[]
[S_out]
type = VolumetricFlowRate
boundary = 'right'
vel_x = 'vel_x'
vel_y = 'vel_y'
advected_quantity = 'advected_scalar'
rhie_chow_user_object = 'ins_rhie_chow_interpolator'
[]
[balance_percent]
type = ParsedPostprocessor
expression = '100 * (0 - S_out + 2 * ${L} * ${H} * ${qs}) / S_out'
pp_names = 'S_out'
[]
[]
(modules/navier_stokes/test/tests/finite_volume/ins/turbulence/channel/linear-segregated/executioner_regular_channel.i)
[Executioner]
type = SIMPLE
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
turbulence_systems = 'TKE_system TKED_system'
momentum_l_abs_tol = 1e-14
pressure_l_abs_tol = 1e-14
turbulence_l_abs_tol = 1e-14
momentum_l_tol = 1e-14
pressure_l_tol = 1e-14
turbulence_l_tol = 1e-14
momentum_equation_relaxation = 0.7
pressure_variable_relaxation = 0.3
turbulence_equation_relaxation = '0.2 0.2'
turbulence_field_relaxation = '0.2 0.2'
num_iterations = 1000
pressure_absolute_tolerance = 1e-12
momentum_absolute_tolerance = 1e-12
turbulence_absolute_tolerance = '1e-12 1e-12'
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
turbulence_petsc_options_iname = '-pc_type -pc_hypre_type'
turbulence_petsc_options_value = 'hypre boomeramg'
# added to test PC reuse feature
turbulence_pc_recompute_frequency = 5
print_fields = false
continue_on_max_its = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/segregated-comparison/segregated-linear-physics.i)
mu = 2.6
rho = 1.0
advected_interp_method = 'average'
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '0.3'
dy = '0.3'
ix = '3'
iy = '3'
[]
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system'
[]
[Physics]
[NavierStokes]
[FlowSegregated/flow]
velocity_variable = 'vel_x vel_y'
pressure_variable = 'pressure'
initial_velocity = '0.5 0 0'
initial_pressure = '0.2'
density = ${rho}
dynamic_viscosity = ${mu}
# we use an inlet to mimick the original input
# we could use a wall noslip boundary
inlet_boundaries = 'left'
momentum_inlet_types = 'fixed-velocity'
momentum_inlet_functors = '1.1 0'
wall_boundaries = 'top bottom'
momentum_wall_types = 'noslip noslip'
momentum_wall_functors = '0 0; 0 0'
outlet_boundaries = 'right'
momentum_outlet_types = 'fixed-pressure-zero-gradient'
pressure_functors = '1.4'
orthogonality_correction = false
momentum_two_term_bc_expansion = false
pressure_two_term_bc_expansion = false
momentum_advection_interpolation = ${advected_interp_method}
[]
[]
[]
# Note: this executioner should be moved into the Physics
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-10
pressure_l_abs_tol = 1e-10
momentum_l_tol = 0
pressure_l_tol = 0
rhie_chow_user_object = 'ins_rhie_chow_interpolator'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
momentum_equation_relaxation = 0.8
pressure_variable_relaxation = 0.3
num_iterations = 2
pressure_absolute_tolerance = 1e-10
momentum_absolute_tolerance = 1e-10
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
print_fields = false
[]
[Outputs]
exodus = true
execute_on = TIMESTEP_END
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/2d/rotated-channel.i)
mu = 1
rho = 1
advected_interp_method = 'average'
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 2
xmax = 5
nx = 20
ny = 4
[]
[transform]
type = TransformGenerator
transform = rotate
vector_value = '45 0 0'
input = mesh
[]
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system'
previous_nl_solution_required = true
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
solver_sys = u_system
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
[]
[]
[FVInterpolationMethods]
[average]
type = FVGeometricAverage
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[]
[LinearFVBCs]
[inlet-u]
type = LinearFVNormalVelocityFunctorDirichletBC
boundary = 'left'
variable = vel_x
normal_velocity = '-1'
component = 'x'
[]
[inlet-v]
type = LinearFVNormalVelocityFunctorDirichletBC
boundary = 'left'
variable = vel_y
normal_velocity = '-1'
component = 'y'
[]
[walls-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom'
variable = vel_x
functor = 0.0
[]
[walls-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom'
variable = vel_y
functor = 0.0
[]
[outlet_p]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'right'
variable = pressure
functor = 0
[]
[outlet_u]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_x
use_two_term_expansion = false
boundary = right
[]
[outlet_v]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_y
use_two_term_expansion = false
boundary = right
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-10
pressure_l_abs_tol = 1e-10
momentum_l_tol = 0
pressure_l_tol = 0
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
momentum_equation_relaxation = 0.8
pressure_variable_relaxation = 0.3
num_iterations = 100
pressure_absolute_tolerance = 1e-10
momentum_absolute_tolerance = 1e-10
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
print_fields = false
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/mms/linear-segregated/2d-symmetric-vortex/2d-symmetric-vortex.i)
mu = 1.2
rho = 1.5
advected_interp_method = 'average'
pressure_gradient_method = 'green-gauss'
[Problem]
linear_sys_names = 'u_system v_system pressure_system'
previous_nl_solution_required = true
[]
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
[]
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
[]
[]
[FVInterpolationMethods]
[average]
type = FVGeometricAverage
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = 0.0
solver_sys = u_system
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
initial_condition = 0.0
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
initial_condition = 0.0
[]
[]
[FVGradientMethods]
[reconstructed]
type = FVReconstructedPressureGradient
base_gradient_method = green-gauss
gradient_relaxation = 0.1
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
gradient_method = ${pressure_gradient_method}
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
gradient_method = ${pressure_gradient_method}
[]
[u_forcing]
type = LinearFVSource
variable = vel_x
source_density = forcing_u
[]
[v_forcing]
type = LinearFVSource
variable = vel_y
source_density = forcing_v
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = 'Ainv' # Functor created in the RhieChowMassFlux UO
use_nonorthogonal_correction = false
use_nonorthogonal_correction_on_boundary = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = 'HbyA' # Functor created in the RhieChowMassFlux UO
force_boundary_execution = true
[]
[]
[LinearFVBCs]
[no-slip-wall-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left right top'
variable = vel_x
functor = exact_u
[]
[no-slip-wall-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left right top'
variable = vel_y
functor = exact_v
[]
[symmetry-u]
type = LinearFVVelocitySymmetryBC
boundary = 'bottom'
variable = vel_x
u = vel_x
v = vel_y
momentum_component = x
[]
[symmetry-v]
type = LinearFVVelocitySymmetryBC
boundary = 'bottom'
variable = vel_y
u = vel_x
v = vel_y
momentum_component = y
[]
[pressure-extrapolation]
type = LinearFVPressureFluxBC
boundary = 'top left right'
variable = pressure
HbyA_flux = HbyA
Ainv = Ainv
rho = ${rho}
u = vel_x
v = vel_y
[]
[pressure-symmetry]
type = LinearFVPressureSymmetryBC
boundary = 'bottom'
variable = pressure
HbyA_flux = 'HbyA' # Functor created in the RhieChowMassFlux UO
[]
[]
[Functions]
[exact_u]
type = ParsedFunction
expression = 'x^2*(1-x)^2*(8*y^3 - 9*y^2 + 1)'
[]
[exact_v]
type = ParsedFunction
expression = '-(2*x - 6*x^2 + 4*x^3)*y*(1-y)^2*(2*y+1)'
[]
[exact_p]
type = ParsedFunction
expression = 'y^2'
[]
[forcing_u]
type = ParsedFunction
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
expression = 'rho*( (x^2*(1-x)^2)*(2*x - 6*x^2 + 4*x^3)*
( (8*y^3 - 9*y^2 + 1)^2
- (2*y^4 - 3*y^3 + y)*(24*y^2 - 18*y) ) )
- mu*( (2 - 12*x + 12*x^2)*(8*y^3 - 9*y^2 + 1)
+ (x^2*(1-x)^2)*(48*y - 18) )'
[]
[forcing_v]
type = ParsedFunction
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
expression = 'rho*( (8*y^3 - 9*y^2 + 1)*(2*y^4 - 3*y^3 + y)*
( (2*x - 6*x^2 + 4*x^3)^2
- (x^2*(1-x)^2)*(2 - 12*x + 12*x^2) ) )
+ mu*( (24*x - 12)*(2*y^4 - 3*y^3 + y)
+ (2*x - 6*x^2 + 4*x^3)*(24*y^2 - 18*y) )
+ 2*y'
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-8
pressure_l_abs_tol = 1e-8
momentum_l_tol = 0
pressure_l_tol = 0
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
momentum_equation_relaxation = 0.8
pressure_variable_relaxation = 0.3
num_iterations = 10000
pressure_absolute_tolerance = 1e-7
momentum_absolute_tolerance = '1e-7 1e-7'
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
print_fields = false
continue_on_max_its = true
pin_pressure = true
pressure_pin_value = 0.25
pressure_pin_point = '0.5 0.5 0.0'
[]
[Outputs]
exodus = true
[csv]
type = CSV
execute_on = TIMESTEP_END
[]
[]
[Postprocessors]
[h]
type = AverageElementSize
execute_on = TIMESTEP_END
[]
[L2u]
type = ElementL2FunctorError
approximate = vel_x
exact = exact_u
execute_on = TIMESTEP_END
[]
[L2v]
type = ElementL2FunctorError
approximate = vel_y
exact = exact_v
execute_on = TIMESTEP_END
[]
[L2p]
approximate = pressure
exact = exact_p
type = ElementL2FunctorError
execute_on = TIMESTEP_END
[]
[]
(modules/navier_stokes/test/tests/finite_volume/wcns/enthalpy_equation/enthalpy_equation-physics.i)
H = 0.015
L = 1
bulk_u = 0.01
p_ref = 101325.0
advected_interp_method = 'upwind'
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = ${L}
ymin = -${H}
ymax = ${H}
nx = 30
ny = 15
[]
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system energy_system'
[]
[Physics]
[NavierStokes]
[FlowSegregated]
[flow]
compressibility = 'weakly-compressible'
velocity_variable = 'vel_x vel_y'
density = 'rho'
dynamic_viscosity = 'mu'
initial_velocity = '${bulk_u} 0 0'
initial_pressure = '${p_ref}'
inlet_boundaries = 'left'
momentum_inlet_types = 'fixed-velocity'
momentum_inlet_functors = '${bulk_u} 0'
wall_boundaries = 'top bottom'
momentum_wall_types = 'noslip noslip'
outlet_boundaries = 'right'
momentum_outlet_types = 'fixed-pressure'
pressure_functors = '${p_ref}'
orthogonality_correction = false
momentum_advection_interpolation = ${advected_interp_method}
pressure_two_term_bc_expansion = false
momentum_two_term_bc_expansion = false
[]
[]
[FluidHeatTransferSegregated]
[energy]
coupled_flow_physics = flow
solve_for_enthalpy = true
fluid_temperature_variable = 'T'
fp = 'lead'
thermal_conductivity = 'k'
specific_heat = 'cp'
initial_temperature = '777'
initial_enthalpy = '44000'
energy_inlet_types = 'fixed-temperature'
energy_inlet_functors = '860'
energy_wall_types = 'fixed-temperature fixed-temperature'
energy_wall_functors = '950 950'
energy_advection_interpolation = ${advected_interp_method}
energy_two_term_bc_expansion = false
use_nonorthogonal_correction = false
[]
[]
[]
[]
[FluidProperties]
[lead]
type = LeadFluidProperties
[]
[]
[FunctorMaterials]
[fluid_props_to_mat_props]
type = NonADGeneralFunctorFluidProps
fp = lead
pressure = ${p_ref}
T_fluid = 'T'
speed = 1
porosity = 1
characteristic_length = 1
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-6
pressure_l_abs_tol = 1e-6
energy_l_abs_tol = 1e-8
momentum_l_tol = 0
pressure_l_tol = 0
energy_l_tol = 0
rhie_chow_user_object = 'ins_rhie_chow_interpolator'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
energy_system = 'energy_system'
momentum_equation_relaxation = 0.7
pressure_variable_relaxation = 0.3
energy_equation_relaxation = 0.9
num_iterations = 200
pressure_absolute_tolerance = 1e-6
momentum_absolute_tolerance = 1e-6
energy_absolute_tolerance = 1e-6
print_fields = false
momentum_l_max_its = 1000
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
energy_petsc_options_iname = '-pc_type -pc_hypre_type'
energy_petsc_options_value = 'hypre boomeramg'
continue_on_max_its = true
[]
[Outputs]
exodus = true
execute_on = 'TIMESTEP_BEGIN FINAL'
[out]
type = Checkpoint
execute_on = 'TIMESTEP_END'
[]
[]
# To match the gold file
[AuxVariables]
[rho_var]
type = MooseLinearVariableFVReal
[]
[cp_var]
type = MooseLinearVariableFVReal
[]
[mu_var]
type = MooseLinearVariableFVReal
[]
[k_var]
type = MooseLinearVariableFVReal
[]
[]
[AuxKernels]
[rho_out]
type = FunctorAux
functor = 'rho'
variable = 'rho_var'
execute_on = 'NONLINEAR'
[]
[cp_out]
type = FunctorAux
functor = 'cp'
variable = 'cp_var'
execute_on = 'NONLINEAR'
[]
[mu_out]
type = FunctorAux
functor = 'mu'
variable = 'mu_var'
execute_on = 'NONLINEAR'
[]
[k_out]
type = FunctorAux
functor = 'k'
variable = 'k_var'
execute_on = 'NONLINEAR'
[]
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/restart-freeze/pipe_flow_energy_scalars.i)
rho = 1.1
mu = 0.15
cp = 1.2
k = 0.1
scalar_diff = 0.01
advected_interp_method = 'upwind'
pressure_outlet = 42
inlet_velocity = 0.6
inlet_temperature = 320
inlet_scalar = 13
scalar_source = 1.0
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
xmin = 0
xmax = 1
nx = 10
[]
[]
[Problem]
linear_sys_names = 'u_system pressure_system energy_system scalar_system'
previous_nl_solution_required = true
[]
[Physics]
[NavierStokes]
[FlowSegregated/flow]
velocity_variable = 'vel_x'
pressure_variable = 'pressure'
density = ${rho}
dynamic_viscosity = ${mu}
inlet_boundaries = 'left'
momentum_inlet_types = 'fixed-velocity'
momentum_inlet_functors = ${inlet_velocity}
outlet_boundaries = 'right'
momentum_outlet_types = 'fixed-pressure'
pressure_functors = ${pressure_outlet}
orthogonality_correction = false
pressure_two_term_bc_expansion = false
momentum_two_term_bc_expansion = false
momentum_advection_interpolation = ${advected_interp_method}
[]
[FluidHeatTransferSegregated/energy]
thermal_conductivity = ${k}
specific_heat = ${cp}
energy_inlet_types = 'fixed-temperature'
energy_inlet_functors = ${inlet_temperature}
energy_advection_interpolation = ${advected_interp_method}
use_nonorthogonal_correction = false
energy_two_term_bc_expansion = false
[]
[ScalarTransportSegregated/scalar]
passive_scalar_names = 'scalar'
system_names = 'scalar_system'
passive_scalar_diffusivity = '${scalar_diff}'
passive_scalar_source = ${scalar_source}
passive_scalar_inlet_types = 'fixed-value'
passive_scalar_inlet_functors = ${inlet_scalar}
passive_scalar_advection_interpolation = ${advected_interp_method}
passive_scalar_two_term_bc_expansion = false
use_nonorthogonal_correction = false
[]
[]
[]
[Executioner]
type = SIMPLE
rhie_chow_user_object = 'ins_rhie_chow_interpolator'
momentum_systems = 'u_system'
pressure_system = 'pressure_system'
energy_system = 'energy_system'
passive_scalar_systems = 'scalar_system'
momentum_l_abs_tol = 1e-12
pressure_l_abs_tol = 1e-12
energy_l_abs_tol = 1e-12
passive_scalar_l_abs_tol = 1e-12
momentum_l_tol = 0
pressure_l_tol = 0
energy_l_tol = 0
passive_scalar_l_tol = 0
momentum_equation_relaxation = 0.7
energy_equation_relaxation = 1.0
passive_scalar_equation_relaxation = '1.0'
pressure_variable_relaxation = 0.3
num_iterations = 150
pressure_absolute_tolerance = 1e-11
momentum_absolute_tolerance = 1e-11
energy_absolute_tolerance = 1e-11
passive_scalar_absolute_tolerance = '1e-11'
# We are going with LU because it is a 1D problem with 10 cells
momentum_petsc_options_iname = '-pc_type'
momentum_petsc_options_value = 'lu'
pressure_petsc_options_iname = '-pc_type'
pressure_petsc_options_value = 'lu'
energy_petsc_options_iname = '-pc_type'
energy_petsc_options_value = 'lu'
passive_scalar_petsc_options_iname = '-pc_type'
passive_scalar_petsc_options_value = 'lu'
continue_on_max_its = true
[]
[VectorPostprocessors]
[line_sampler]
type = LineValueSampler
start_point = '0 0 0'
end_point = '1 0 0'
num_points = 10
sort_by = x
variable = 'vel_x pressure T_fluid scalar'
execute_on = FINAL
[]
[]
[Outputs]
csv = true
checkpoint=true
execute_on = final
[]
(modules/navier_stokes/test/tests/postprocessors/flow_rates/conservation_LinearFV.i)
mu = 2.6
rho = 1.1
advected_interp_method='average'
pressure_gradient_method = 'green-gauss'
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
[]
[]
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '0.3'
dy = '0.3'
ix = '3'
iy = '3'
[]
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system'
previous_nl_solution_required = true
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = 0.5
solver_sys = u_system
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
initial_condition = 0.0
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
initial_condition = 0.2
gradient_method = ${pressure_gradient_method}
[]
[]
[FVGradientMethods]
[reconstructed]
type = FVReconstructedPressureGradient
base_gradient_method = green-gauss
gradient_relaxation = 0.1
[]
[]
[FVInterpolationMethods]
[average]
type = FVGeometricAverage
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[]
[LinearFVBCs]
[inlet-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_x
functor = '1.1'
[]
[inlet-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_y
functor = '0.0'
[]
[walls-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom'
variable = vel_x
functor = 0.0
[]
[walls-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom'
variable = vel_y
functor = 0.0
[]
[outlet_p]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'right'
variable = pressure
functor = 1.4
[]
[outlet_u]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_x
use_two_term_expansion = false
boundary = right
[]
[outlet_v]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_y
use_two_term_expansion = false
boundary = right
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-10
pressure_l_abs_tol = 1e-10
momentum_l_tol = 0
pressure_l_tol = 0
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
momentum_equation_relaxation = 0.8
pressure_variable_relaxation = 0.3
num_iterations = 100
pressure_absolute_tolerance = 1e-10
momentum_absolute_tolerance = 1e-10
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
print_fields = false
[]
[Postprocessors]
[inlet_mass]
type = VolumetricFlowRate
boundary = left
rhie_chow_user_object = rc
advected_quantity = ${rho}
vel_x = vel_x
vel_y = vel_y
subtract_mesh_velocity = false
[]
[outlet_mass]
type = VolumetricFlowRate
boundary = right
rhie_chow_user_object = rc
advected_quantity = ${rho}
vel_x = vel_x
vel_y = vel_y
subtract_mesh_velocity = false
[]
[]
[Outputs]
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/wcns/enthalpy_equation/enthalpy_equation.i)
H = 0.015 #halfwidth of the channel, 10 cm of channel height
L = 1
bulk_u = 0.01
p_ref = 101325.0
advected_interp_method = 'upwind'
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = ${L}
ymin = -${H}
ymax = ${H}
nx = 30
ny = 15
[]
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system energy_system'
previous_nl_solution_required = true
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = 'rho'
p_diffusion_kernel = p_diffusion
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
solver_sys = u_system
initial_condition = ${bulk_u}
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
initial_condition = 0
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
initial_condition = ${p_ref}
[]
[h]
type = MooseLinearVariableFVReal
solver_sys = energy_system
initial_condition = 44000 # 1900 is an approx of cp(T)
[]
[]
[AuxVariables]
[rho_var]
type = MooseLinearVariableFVReal
[]
[cp_var]
type = MooseLinearVariableFVReal
[]
[mu_var]
type = MooseLinearVariableFVReal
[]
[k_var]
type = MooseLinearVariableFVReal
[]
[T]
type = MooseLinearVariableFVReal
initial_condition = 777.
[]
[]
[FVInterpolationMethods]
[upwind]
type = FVAdvectedUpwind
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
mu = 'mu'
momentum_component = 'x'
use_nonorthogonal_correction = false
advected_interp_method_name = ${advected_interp_method}
rhie_chow_user_object = 'rc'
u = vel_x
v = vel_y
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
mu = 'mu'
momentum_component = 'y'
use_nonorthogonal_correction = false
advected_interp_method_name = ${advected_interp_method}
rhie_chow_user_object = 'rc'
u = vel_x
v = vel_y
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[temp_conduction]
type = LinearFVDiffusion
diffusion_coeff = 'alpha'
variable = h
[]
[temp_advection]
type = LinearFVEnergyAdvection
variable = h
advected_interp_method = ${advected_interp_method}
rhie_chow_user_object = 'rc'
[]
[]
[LinearFVBCs]
[inlet_u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_x
functor = ${bulk_u} #${bulk_u} #'fully_developed_velocity'
[]
[inlet-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_y
functor = 0
[]
[inlet_h]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = h
boundary = 'left'
functor = h_from_p_T # ${fparse 1900.*860.}
[]
[inlet_T]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T
boundary = 'left'
functor = 860.
[]
[walls-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = vel_x
boundary = 'top bottom'
functor = 0.
[]
[walls-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = vel_y
boundary = 'top bottom'
functor = 0.
[]
[walls_h]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = h
boundary = 'top bottom'
functor = h_from_p_T # ${fparse 1900. * 950}
[]
[walls_T]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T
boundary = 'top bottom'
functor = 950.
[]
[walls_p]
type = LinearFVExtrapolatedPressureBC
boundary = 'top bottom'
variable = pressure
use_two_term_expansion = false
[]
[outlet_p]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'right'
variable = pressure
functor = ${p_ref}
[]
[outlet_h]
type = LinearFVAdvectionDiffusionOutflowBC
variable = h
use_two_term_expansion = false
boundary = 'right'
[]
[outlet_u]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_x
use_two_term_expansion = false
boundary = right
[]
[outlet_v]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_y
use_two_term_expansion = false
boundary = right
[]
[]
[FluidProperties]
[lead]
type = LeadFluidProperties
[]
[]
[FunctorMaterials]
[fluid_props_to_mat_props]
type = GeneralFunctorFluidProps
fp = lead
pressure = ${p_ref}
T_fluid = 'T'
speed = 1
porosity = 1
characteristic_length = 1
[]
[alpha]
type = ADParsedFunctorMaterial
property_name = 'alpha'
functor_names = 'k cp'
expression = 'k/cp'
[]
[enthalpy_material]
type = LinearFVEnthalpyFunctorMaterial
pressure = ${p_ref}
T_fluid = T
h = h
fp = lead
[]
[]
[AuxKernels]
[rho_out]
type = FunctorAux
functor = 'rho'
variable = 'rho_var'
execute_on = 'NONLINEAR'
[]
[cp_out]
type = FunctorAux
functor = 'cp'
variable = 'cp_var'
execute_on = 'NONLINEAR'
[]
[mu_out]
type = FunctorAux
functor = 'mu'
variable = 'mu_var'
execute_on = 'NONLINEAR'
[]
[k_out]
type = FunctorAux
functor = 'k'
variable = 'k_var'
execute_on = 'NONLINEAR'
[]
[T_from_h_functor]
type = FunctorAux
functor = 'T_from_p_h'
variable = 'T'
execute_on = 'NONLINEAR'
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-6
pressure_l_abs_tol = 1e-6
energy_l_abs_tol = 1e-8
momentum_l_tol = 0
pressure_l_tol = 0
energy_l_tol = 0
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
energy_system = 'energy_system'
momentum_equation_relaxation = 0.7
pressure_variable_relaxation = 0.3
energy_equation_relaxation = 0.9
num_iterations = 200
pressure_absolute_tolerance = 1e-6
momentum_absolute_tolerance = 1e-6
energy_absolute_tolerance = 1e-6
print_fields = false
momentum_l_max_its = 1000
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
energy_petsc_options_iname = '-pc_type -pc_hypre_type'
energy_petsc_options_value = 'hypre boomeramg'
continue_on_max_its = true
[]
[Outputs]
exodus = true
execute_on = 'TIMESTEP_BEGIN FINAL'
[out]
type = Checkpoint
execute_on = 'TIMESTEP_END'
[]
[]
(modules/navier_stokes/test/tests/finite_volume/ins/cht/bulk_heat_transfer/flow-around-square-linear-fluidonly-physics.i)
mu = 0.01
rho = 1.1
k = 0.0005
cp = 10
h_conv = 5
inlet_temp = 300
advected_interp_method = 'upwind'
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmin = 0
ymin = 0
ymax = 0.1
xmax = 0.1
[]
[subdomain1]
type = SubdomainBoundingBoxGenerator
input = generated_mesh
block_name = subdomain1
bottom_left = '0.04 0.04 0'
block_id = 1
top_right = '0.06 0.06 0'
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = 0
paired_block = 1
new_boundary = interface
[]
[delete]
type = BlockDeletionGenerator
input = interface
block = 1
[]
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system energy_system'
previous_nl_solution_required = true
[]
[Physics]
[NavierStokes]
[FlowSegregated]
[flow]
compressibility = 'weakly-compressible'
block = '0'
velocity_variable = 'vel_x vel_y'
density = ${rho}
dynamic_viscosity = ${mu}
initial_velocity = '0.1 0.01 0'
initial_pressure = '0.2'
inlet_boundaries = 'left'
momentum_inlet_types = 'fixed-velocity'
momentum_inlet_functors = '0.1 0'
wall_boundaries = 'top bottom interface'
momentum_wall_types = 'noslip noslip noslip'
outlet_boundaries = 'right'
momentum_outlet_types = 'fixed-pressure'
pressure_functors = '1.4'
momentum_advection_interpolation = ${advected_interp_method}
momentum_two_term_bc_expansion = false
pressure_two_term_bc_expansion = false
orthogonality_correction = false
[]
[]
[FluidHeatTransferSegregated]
[energy]
coupled_flow_physics = flow
block = '0'
thermal_conductivity = '${k}'
specific_heat = '${cp}'
initial_temperature = '${inlet_temp}'
energy_inlet_types = 'fixed-temperature'
energy_inlet_functors = '${inlet_temp}'
energy_wall_types = 'heatflux heatflux convection'
energy_wall_functors = '0 0 boundary_value:htc'
energy_advection_interpolation = ${advected_interp_method}
energy_two_term_bc_expansion = false
[]
[]
[]
[]
[FunctorMaterials]
[rhocpT]
property_name = 'rhocpT'
type = ParsedFunctorMaterial
functor_names = 'T_fluid'
expression = '${rho}*${cp}*T_fluid'
[]
[conv_data]
type = GenericFunctorMaterial
prop_names = 'htc boundary_value'
prop_values = '${h_conv} 350'
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-13
pressure_l_abs_tol = 1e-13
energy_l_abs_tol = 1e-13
momentum_l_tol = 0
pressure_l_tol = 0
energy_l_tol = 0
rhie_chow_user_object = 'ins_rhie_chow_interpolator'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
energy_system = 'energy_system'
momentum_equation_relaxation = 0.8
energy_equation_relaxation = 1.0
pressure_variable_relaxation = 0.3
num_iterations = 1000
pressure_absolute_tolerance = 1e-10
momentum_absolute_tolerance = 1e-10
energy_absolute_tolerance = 1e-10
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
energy_petsc_options_iname = '-pc_type -pc_hypre_type'
energy_petsc_options_value = 'hypre boomeramg'
# added to test PC reuse feature
energy_pc_recompute_frequency = 10
print_fields = false
continue_on_max_its = true
[]
[Outputs]
exodus = true
execute_on = timestep_end
[]
(modules/navier_stokes/test/tests/finite_volume/ins/radiation_s2s/diff_heated_cavity_slabs_cht.i)
# Differentially heated cavity with conducting slabs on the left and right.
#
# Domain layout:
#
# T = 880 K fluid cavity T = 870 K
# | left slab | 0 < x < 1 | right slab |
# | -d < x < 0 | | 1 < x < 1+d |
#
# The prescribed temperatures are applied only to the OUTER slab faces.
# The left/right cavity surfaces use linear-FV CHT, and the top/bottom cavity
# walls are externally adiabatic.
#
# As written, this input solves the case without radiation. The radiation case
# activates the inactive objects below and sets
# Executioner/surface_radiation_object_name = gray_lambert, which passes the
# surface-to-surface radiation into CHTHandler. The conductive heat flux on the
# top/bottom walls is then balanced by LinearFVGrayLambertBC.
################################################################################
# MATERIAL PROPERTIES AND GEOMETRY
################################################################################
rho = 3279.0
T_0 = 875.0
T_hot = 880.0
T_cold = 870.0
mu = 1.0
k_fluid = 38.0
k_solid = 38.0
cp = 640.0
alpha = 3.26e-5
eps = 1.0
slab_thickness = 0.10
# Coarsest mesh on which SIMPLE converges for this problem; a 10x10 fluid mesh
# stalls with momentum residuals near 0.5.
n_slab_x = 4
n_fluid_x = 20
n_y = 20
rad_left = 'left_0 left_1 left_2 left_3 left_4'
rad_right = 'right_0 right_1 right_2 right_3 right_4'
rad_top = 'top_0 top_1 top_2 top_3 top_4'
rad_bottom = 'bottom_0 bottom_1 bottom_2 bottom_3 bottom_4'
rad_cht = '${rad_left} ${rad_right}'
rad_noncht = '${rad_top} ${rad_bottom}'
rad_all = '${rad_left} ${rad_right} ${rad_top} ${rad_bottom}'
walls = ${rad_all}
[GlobalParams]
rhie_chow_user_object = ins_rhie_chow_interpolator
advected_interp_method = upwind
u = vel_x
v = vel_y
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system energy_system solid_energy_system'
previous_nl_solution_required = true
[]
################################################################################
# GEOMETRY
################################################################################
[Mesh]
type = MeshGeneratorMesh
parallel_type = replicated
# A single generator gives a conforming mesh across both CHT interfaces.
[base]
type = CartesianMeshGenerator
dim = 2
dx = '${slab_thickness} 1.0 ${slab_thickness}'
ix = '${n_slab_x} ${n_fluid_x} ${n_slab_x}'
dy = '1.0'
iy = '${n_y}'
subdomain_id = '1 0 2'
[]
# Keep the fluid cavity at 0 <= x <= 1.
[shift]
type = TransformGenerator
input = base
transform = TRANSLATE
vector_value = '${fparse -slab_thickness} 0 0'
[]
[rename_blocks]
type = RenameBlockGenerator
input = shift
old_block = '0 1 2'
new_block = 'fluid left_solid right_solid'
[]
# Reserve left/right/top/bottom for the four surfaces of the cavity.
[rename_exterior]
type = RenameBoundaryGenerator
input = rename_blocks
old_boundary = 'left right bottom top'
new_boundary = 'left_outer right_outer whole_bottom whole_top'
[]
# Put the internal sidesets on fluid elements so gray_lambert can sample
# T_fluid on every surface in its boundary list.
[left_interface]
type = SideSetsBetweenSubdomainsGenerator
input = rename_exterior
primary_block = fluid
paired_block = left_solid
new_boundary = left
[]
[right_interface]
type = SideSetsBetweenSubdomainsGenerator
input = left_interface
primary_block = fluid
paired_block = right_solid
new_boundary = right
[]
# Re-create separate exterior horizontal sidesets for each block.
[cavity_horizontal]
type = SideSetsFromNormalsGenerator
input = right_interface
normals = '0 -1 0
0 1 0'
fixed_normal = true
included_subdomains = fluid
new_boundary = 'bottom top'
[]
[left_slab_horizontal]
type = SideSetsFromNormalsGenerator
input = cavity_horizontal
normals = '0 -1 0
0 1 0'
fixed_normal = true
included_subdomains = left_solid
new_boundary = 'left_solid_bottom left_solid_top'
[]
[right_slab_horizontal]
type = SideSetsFromNormalsGenerator
input = left_slab_horizontal
normals = '0 -1 0
0 1 0'
fixed_normal = true
included_subdomains = right_solid
new_boundary = 'right_solid_bottom right_solid_top'
[]
# Patch every radiating surface. This allows the wall temperature and
# radiative heat flux to vary along each side of the cavity.
[patch_left]
type = PatchSidesetGenerator
input = right_slab_horizontal
boundary = left
n_patches = 5
partitioner = centroid
centroid_partitioner_direction = y
[]
[patch_right]
type = PatchSidesetGenerator
input = patch_left
boundary = right
n_patches = 5
partitioner = centroid
centroid_partitioner_direction = y
[]
[patch_top]
type = PatchSidesetGenerator
input = patch_right
boundary = top
n_patches = 5
partitioner = centroid
centroid_partitioner_direction = x
[]
[patch_bottom]
type = PatchSidesetGenerator
input = patch_top
boundary = bottom
n_patches = 5
partitioner = centroid
centroid_partitioner_direction = x
[]
# PatchSidesetGenerator retains its parent sideset. Remove the parents so
# each face has only its patch boundary for radiation and CHT bookkeeping.
[delete_unpatched_parents]
type = BoundaryDeletionGenerator
input = patch_bottom
boundary_names = 'left right top bottom whole_top whole_bottom'
[]
final_generator = delete_unpatched_parents
[]
################################################################################
# USER OBJECTS: RHIE-CHOW AND SURFACE-TO-SURFACE RADIATION
################################################################################
[UserObjects]
# Activated for the radiation case
inactive = 'view_factor gray_lambert'
[ins_rhie_chow_interpolator]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
block = fluid
[]
# The enclosure is convex and unobstructed. This deterministic view-factor
# object also avoids ray-orientation ambiguity on the internal CHT sidesets.
[view_factor]
type = UnobstructedPlanarViewFactor
boundary = ${rad_all}
normalize_view_factor = true
execute_on = INITIAL
[]
[gray_lambert]
type = ViewFactorObjectSurfaceRadiation
boundary = ${rad_all}
# There are no fixed-temperature or radiatively adiabatic surfaces here.
# All 20 surfaces obtain their current temperature from T_fluid.
emissivity = '${eps} ${eps} ${eps} ${eps} ${eps}
${eps} ${eps} ${eps} ${eps} ${eps}
${eps} ${eps} ${eps} ${eps} ${eps}
${eps} ${eps} ${eps} ${eps} ${eps}'
temperature = T_fluid
view_factor_object_name = view_factor
# Refreshes radiation during the SIMPLE/CHT Picard loop. The handler uses
# the most recently assembled radiation state (one fluid-energy solve lag).
execute_on = 'NONLINEAR TIMESTEP_END'
[]
[]
################################################################################
# VARIABLES
################################################################################
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
solver_sys = u_system
block = fluid
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
block = fluid
[]
[pressure]
type = MooseLinearVariableFVReal
initial_condition = 0
solver_sys = pressure_system
block = fluid
[]
[T_fluid]
type = MooseLinearVariableFVReal
solver_sys = energy_system
initial_condition = ${T_0}
block = fluid
[]
# A single solid system/variable is used on the two disconnected slabs,
# as required by the current linear-FV CHTHandler.
[T_solid]
type = MooseLinearVariableFVReal
solver_sys = solid_energy_system
initial_condition = ${T_0}
block = 'left_solid right_solid'
[]
[]
[FVInterpolationMethods]
[upwind]
type = FVAdvectedUpwind
[]
[]
################################################################################
# LINEAR-FV EQUATIONS
################################################################################
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = upwind
mu = ${mu}
momentum_component = x
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = x
[]
[u_buoyancy]
type = LinearFVMomentumBoussinesq
variable = vel_x
T_fluid = T_fluid
gravity = '0 -9.81 0'
rho = ${rho}
ref_temperature = ${T_0}
alpha_name = alpha_b
momentum_component = x
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = upwind
mu = ${mu}
momentum_component = y
use_nonorthogonal_correction = false
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = y
[]
[v_buoyancy]
type = LinearFVMomentumBoussinesq
variable = vel_y
T_fluid = T_fluid
gravity = '0 -9.81 0'
rho = ${rho}
ref_temperature = ${T_0}
alpha_name = alpha_b
momentum_component = y
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = false
[]
[fluid_heat_advection]
type = LinearFVEnergyAdvection
variable = T_fluid
advected_quantity = temperature
cp = ${cp}
[]
[fluid_conduction]
type = LinearFVDiffusion
variable = T_fluid
diffusion_coeff = ${k_fluid}
use_nonorthogonal_correction = false
[]
# CHTHandler expects exactly one solid conduction kernel in the solid
# energy system, so this one kernel covers both slabs.
[solid_conduction]
type = LinearFVDiffusion
variable = T_solid
diffusion_coeff = ${k_solid}
use_nonorthogonal_correction = false
[]
[]
################################################################################
# LINEAR-FV BOUNDARY CONDITIONS
################################################################################
[LinearFVBCs]
# Activated for the radiation case
inactive = 'radiation_top_bottom'
[no_slip_u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = vel_x
boundary = ${walls}
functor = 0
[]
[no_slip_v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = vel_y
boundary = ${walls}
functor = 0
[]
[pressure_walls]
type = LinearFVPressureFluxBC
boundary = ${walls}
variable = pressure
HbyA_flux = HbyA
Ainv = Ainv
u = vel_x
v = vel_y
rho = ${rho}
[]
# Prescribe temperature only on the exterior faces of the slabs.
[left_outer_temperature]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T_solid
boundary = left_outer
functor = ${T_hot}
[]
[right_outer_temperature]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T_solid
boundary = right_outer
functor = ${T_cold}
[]
[insulated_slab_horizontal_faces]
type = LinearFVAdvectionDiffusionFunctorNeumannBC
variable = T_solid
boundary = 'left_solid_bottom left_solid_top right_solid_bottom right_solid_top'
functor = 0
[]
# Without radiation, the top/bottom cavity walls are adiabatic. The radiation
# case replaces this BC with radiation_top_bottom.
[adiabatic_top_bottom]
type = LinearFVAdvectionDiffusionFunctorNeumannBC
variable = T_fluid
boundary = ${rad_noncht}
functor = 0
[]
# Radiation is imposed directly only on the non-CHT top/bottom walls.
# Do not add these boundaries to adiabatic_boundary in gray_lambert:
# this BC makes their conductive flux balance their radiative flux.
[radiation_top_bottom]
type = LinearFVGrayLambertBC
variable = T_fluid
temperature_radiation = T_fluid
coeff_diffusion = ${k_fluid}
surface_radiation_object_name = gray_lambert
boundary = ${rad_noncht}
[]
# Neumann-Dirichlet CHT. Each patch needs its own pair because CHTHandler
# creates boundary-specific temperature and heat-flux functors.
# ---- left slab / fluid interface -----------------------------------------
[fluid_left_0]
type = LinearFVDirichletCHTBC
variable = T_fluid
boundary = left_0
functor = interface_temperature_to_fluid_left_0
[]
[solid_left_0]
type = LinearFVRobinCHTBC
variable = T_solid
boundary = left_0
h = 0
thermal_conductivity = ${k_solid}
incoming_flux = heat_flux_to_solid_left_0
surface_temperature = interface_temperature_to_solid_left_0
[]
[fluid_left_1]
type = LinearFVDirichletCHTBC
variable = T_fluid
boundary = left_1
functor = interface_temperature_to_fluid_left_1
[]
[solid_left_1]
type = LinearFVRobinCHTBC
variable = T_solid
boundary = left_1
h = 0
thermal_conductivity = ${k_solid}
incoming_flux = heat_flux_to_solid_left_1
surface_temperature = interface_temperature_to_solid_left_1
[]
[fluid_left_2]
type = LinearFVDirichletCHTBC
variable = T_fluid
boundary = left_2
functor = interface_temperature_to_fluid_left_2
[]
[solid_left_2]
type = LinearFVRobinCHTBC
variable = T_solid
boundary = left_2
h = 0
thermal_conductivity = ${k_solid}
incoming_flux = heat_flux_to_solid_left_2
surface_temperature = interface_temperature_to_solid_left_2
[]
[fluid_left_3]
type = LinearFVDirichletCHTBC
variable = T_fluid
boundary = left_3
functor = interface_temperature_to_fluid_left_3
[]
[solid_left_3]
type = LinearFVRobinCHTBC
variable = T_solid
boundary = left_3
h = 0
thermal_conductivity = ${k_solid}
incoming_flux = heat_flux_to_solid_left_3
surface_temperature = interface_temperature_to_solid_left_3
[]
[fluid_left_4]
type = LinearFVDirichletCHTBC
variable = T_fluid
boundary = left_4
functor = interface_temperature_to_fluid_left_4
[]
[solid_left_4]
type = LinearFVRobinCHTBC
variable = T_solid
boundary = left_4
h = 0
thermal_conductivity = ${k_solid}
incoming_flux = heat_flux_to_solid_left_4
surface_temperature = interface_temperature_to_solid_left_4
[]
# ---- right slab / fluid interface ----------------------------------------
[fluid_right_0]
type = LinearFVDirichletCHTBC
variable = T_fluid
boundary = right_0
functor = interface_temperature_to_fluid_right_0
[]
[solid_right_0]
type = LinearFVRobinCHTBC
variable = T_solid
boundary = right_0
h = 0
thermal_conductivity = ${k_solid}
incoming_flux = heat_flux_to_solid_right_0
surface_temperature = interface_temperature_to_solid_right_0
[]
[fluid_right_1]
type = LinearFVDirichletCHTBC
variable = T_fluid
boundary = right_1
functor = interface_temperature_to_fluid_right_1
[]
[solid_right_1]
type = LinearFVRobinCHTBC
variable = T_solid
boundary = right_1
h = 0
thermal_conductivity = ${k_solid}
incoming_flux = heat_flux_to_solid_right_1
surface_temperature = interface_temperature_to_solid_right_1
[]
[fluid_right_2]
type = LinearFVDirichletCHTBC
variable = T_fluid
boundary = right_2
functor = interface_temperature_to_fluid_right_2
[]
[solid_right_2]
type = LinearFVRobinCHTBC
variable = T_solid
boundary = right_2
h = 0
thermal_conductivity = ${k_solid}
incoming_flux = heat_flux_to_solid_right_2
surface_temperature = interface_temperature_to_solid_right_2
[]
[fluid_right_3]
type = LinearFVDirichletCHTBC
variable = T_fluid
boundary = right_3
functor = interface_temperature_to_fluid_right_3
[]
[solid_right_3]
type = LinearFVRobinCHTBC
variable = T_solid
boundary = right_3
h = 0
thermal_conductivity = ${k_solid}
incoming_flux = heat_flux_to_solid_right_3
surface_temperature = interface_temperature_to_solid_right_3
[]
[fluid_right_4]
type = LinearFVDirichletCHTBC
variable = T_fluid
boundary = right_4
functor = interface_temperature_to_fluid_right_4
[]
[solid_right_4]
type = LinearFVRobinCHTBC
variable = T_solid
boundary = right_4
h = 0
thermal_conductivity = ${k_solid}
incoming_flux = heat_flux_to_solid_right_4
surface_temperature = interface_temperature_to_solid_right_4
[]
[]
[FunctorMaterials]
[constant_fluid_functors]
type = GenericFunctorMaterial
# block = fluid
prop_names = 'cp alpha_b'
prop_values = '${cp} ${alpha}'
[]
[]
################################################################################
# DIAGNOSTICS
################################################################################
[VectorPostprocessors]
# Activated for the radiation case
inactive = 'surface_radiation'
[surface_radiation]
type = SurfaceRadiationVectorPostprocessor
surface_radiation_object_name = gray_lambert
information = 'temperature emissivity radiosity heat_flux_density'
execute_on = TIMESTEP_END
[]
[]
################################################################################
# EXECUTION / SOLVE
################################################################################
# CHTHandler requires one value per entry in rad_cht (10 entries here).
cht_relaxation = '0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3'
[Executioner]
type = SIMPLE
rhie_chow_user_object = ins_rhie_chow_interpolator
momentum_systems = 'u_system v_system'
pressure_system = pressure_system
energy_system = energy_system
solid_energy_system = solid_energy_system
momentum_l_abs_tol = 1e-14
pressure_l_abs_tol = 1e-14
energy_l_abs_tol = 1e-14
solid_energy_l_abs_tol = 1e-14
momentum_l_tol = 0
pressure_l_tol = 0
energy_l_tol = 0
solid_energy_l_tol = 0
momentum_equation_relaxation = 0.7
pressure_variable_relaxation = 0.3
energy_equation_relaxation = 0.9
num_iterations = 5000
# Tight enough that the gold files do not depend on the number of MPI ranks.
pressure_absolute_tolerance = 1e-11
momentum_absolute_tolerance = 1e-11
energy_absolute_tolerance = 1e-11
solid_energy_absolute_tolerance = 1e-11
# Activate CHT on every patched slab/cavity interface.
cht_interfaces = ${rad_cht}
cht_solid_flux_relaxation = ${cht_relaxation}
cht_fluid_flux_relaxation = ${cht_relaxation}
cht_solid_temperature_relaxation = ${cht_relaxation}
cht_fluid_temperature_relaxation = ${cht_relaxation}
cht_heat_flux_tolerance = 1e-4
max_cht_fpi = 10
print_fields = false
momentum_l_max_its = 300
pin_pressure = true
pressure_pin_value = 0.0
pressure_pin_point = '0.5 0.5 0.0'
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
energy_petsc_options_iname = '-pc_type -pc_hypre_type'
energy_petsc_options_value = 'hypre boomeramg'
solid_energy_petsc_options_iname = '-pc_type -pc_hypre_type'
solid_energy_petsc_options_value = 'hypre boomeramg'
continue_on_max_its = true
# Improves the numerical integration used by UnobstructedPlanarViewFactor.
[Quadrature]
order = SECOND
[]
[]
################################################################################
# OUTPUTS
################################################################################
[Outputs]
exodus = true
csv = true
execute_on = TIMESTEP_END
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/3d/3d-velocity-pressure.i)
mu = 2.6
rho = 1.0
advected_interp_method = 'average'
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 3
dx = '0.3'
dy = '0.3'
dz = '0.3'
ix = '3'
iy = '3'
iz = '3'
[]
[]
[Problem]
linear_sys_names = 'u_system v_system w_system pressure_system'
previous_nl_solution_required = true
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
w = vel_z
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = 0.5
solver_sys = u_system
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
initial_condition = 0.0
[]
[vel_z]
type = MooseLinearVariableFVReal
solver_sys = w_system
initial_condition = 0.0
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
initial_condition = 0.2
[]
[]
[FVInterpolationMethods]
[average]
type = FVGeometricAverage
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
w = vel_z
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
w = vel_z
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[w_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_z
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
w = vel_z
momentum_component = 'z'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[w_pressure]
type = LinearFVMomentumPressure
variable = vel_z
pressure = pressure
momentum_component = 'z'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[]
[LinearFVBCs]
[inlet-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_x
functor = '1.1'
[]
[inlet-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_y
functor = '0.0'
[]
[inlet-w]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_z
functor = '0.0'
[]
[walls-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom back front'
variable = vel_x
functor = 0.0
[]
[walls-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom back front'
variable = vel_y
functor = 0.0
[]
[walls-w]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom back front'
variable = vel_z
functor = 0.0
[]
[outlet_p]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'right'
variable = pressure
functor = 1.4
[]
[outlet_u]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_x
use_two_term_expansion = false
boundary = right
[]
[outlet_v]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_y
use_two_term_expansion = false
boundary = right
[]
[outlet_w]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_z
use_two_term_expansion = false
boundary = right
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-10
pressure_l_abs_tol = 1e-10
momentum_l_tol = 0
pressure_l_tol = 0
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system w_system'
pressure_system = 'pressure_system'
momentum_equation_relaxation = 0.8
pressure_variable_relaxation = 0.3
num_iterations = 100
pressure_absolute_tolerance = 1e-10
momentum_absolute_tolerance = 1e-10
momentum_petsc_options_iname = '-pc_type -pc_hypre_type -pc_hypre_boomeramg_agg_nl -pc_hypre_boomeramg_agg_num_paths -pc_hypre_boomeramg_truncfactor -pc_hypre_boomeramg_strong_threshold -pc_hypre_boomeramg_coarsen_type -pc_hypre_boomeramg_interp_type'
momentum_petsc_options_value = 'hypre boomeramg 4 1 0.1 0.6 HMIS ext+i'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type -pc_hypre_boomeramg_agg_nl -pc_hypre_boomeramg_agg_num_paths -pc_hypre_boomeramg_truncfactor -pc_hypre_boomeramg_strong_threshold -pc_hypre_boomeramg_coarsen_type -pc_hypre_boomeramg_interp_type'
pressure_petsc_options_value = 'hypre boomeramg 2 1 0.1 0.6 HMIS ext+i'
print_fields = false
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/cht/bulk_heat_transfer/flow-around-square-linear-fluidonly.i)
mu = 0.01
rho = 1.1
k = 0.0005
cp = 10
h_conv = 5
advected_interp_method = 'upwind'
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmin = 0
ymin = 0
ymax = 0.1
xmax = 0.1
[]
[subdomain1]
type = SubdomainBoundingBoxGenerator
input = generated_mesh
block_name = subdomain1
bottom_left = '0.04 0.04 0'
block_id = 1
top_right = '0.06 0.06 0'
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = 0
paired_block = 1
new_boundary = interface
[]
[delete]
type = BlockDeletionGenerator
input = interface
block = 1
[]
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system energy_system'
previous_nl_solution_required = true
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
block = 0
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = 0.1
solver_sys = u_system
block = 0
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
initial_condition = 0.01
block = 0
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
initial_condition = 0.2
block = 0
[]
[T_fluid]
type = MooseLinearVariableFVReal
solver_sys = energy_system
initial_condition = 300
block = 0
[]
[]
[FVInterpolationMethods]
[upwind]
type = FVAdvectedUpwind
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = true
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = true
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = true
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[h_advection]
type = LinearFVEnergyAdvection
variable = T_fluid
advected_quantity = temperature
cp = ${cp}
advected_interp_method = ${advected_interp_method}
rhie_chow_user_object = 'rc'
[]
[conduction]
type = LinearFVDiffusion
variable = T_fluid
diffusion_coeff = ${k}
use_nonorthogonal_correction = true
[]
[]
[LinearFVBCs]
[inlet-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_x
functor = '0.1'
[]
[inlet-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_y
functor = '0.0'
[]
[walls-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom interface'
variable = vel_x
functor = 0.0
[]
[walls-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom interface'
variable = vel_y
functor = 0.0
[]
[outlet_p]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'right'
variable = pressure
functor = 1.4
[]
[outlet_u]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_x
use_two_term_expansion = false
boundary = right
[]
[outlet_v]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_y
use_two_term_expansion = false
boundary = right
[]
[inlet_T]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T_fluid
functor = 300
boundary = 'left'
[]
[walls_T]
type = LinearFVAdvectionDiffusionFunctorNeumannBC
variable = T_fluid
functor = 0.0
boundary = 'top bottom'
[]
[outlet_T]
type = LinearFVAdvectionDiffusionOutflowBC
variable = T_fluid
use_two_term_expansion = false
boundary = right
[]
[fluid_solid]
type = LinearFVConvectiveHeatTransferBC
variable = T_fluid
T_solid = boundary_value
T_fluid = T_fluid
boundary = interface
h = ${h_conv}
[]
[]
[FunctorMaterials]
[rhocpT]
property_name = 'rhocpT'
type = ParsedFunctorMaterial
functor_names = 'T_fluid'
expression = '${rho}*${cp}*T_fluid'
[]
[]
[Functions]
[boundary_value]
type = ConstantFunction
value = 350
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-13
pressure_l_abs_tol = 1e-13
energy_l_abs_tol = 1e-13
momentum_l_tol = 0
pressure_l_tol = 0
energy_l_tol = 0
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
energy_system = 'energy_system'
momentum_equation_relaxation = 0.8
energy_equation_relaxation = 1.0
pressure_variable_relaxation = 0.3
num_iterations = 1000
pressure_absolute_tolerance = 1e-10
momentum_absolute_tolerance = 1e-10
energy_absolute_tolerance = 1e-10
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
energy_petsc_options_iname = '-pc_type -pc_hypre_type'
energy_petsc_options_value = 'hypre boomeramg'
print_fields = false
continue_on_max_its = true
[]
[Outputs]
exodus = true
execute_on = timestep_end
[]
(modules/navier_stokes/test/tests/finite_volume/ins/turbulence/lid-driven/linear-segregated/lid-driven-turb-non-eq-wall.i)
### Thermophysical Properties ###
mu = 1e-3
rho = 1.0
### Operation Conditions ###
lid_velocity = 1.0
side_length = 0.1
### Initial Conditions ###
intensity = 0.01
k_init = '${fparse 1.5*(intensity * lid_velocity)^2}'
eps_init = '${fparse C_mu^0.75 * k_init^1.5 / side_length}'
### k-epsilon Closure Parameters ###
sigma_k = 1.0
sigma_eps = 1.3
C1_eps = 1.44
C2_eps = 1.92
C_mu = 0.09
### Modeling parameters ###
bulk_wall_treatment = false
walls = 'left top right bottom'
wall_treatment = 'neq' # Options: eq_newton, eq_incremental, eq_linearized, neq
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = ${side_length}
ymin = 0
ymax = ${side_length}
nx = 12
ny = 12
[]
# Prevent test diffing on distributed parallel element numbering
allow_renumbering = false
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system TKE_system TKED_system'
previous_nl_solution_required = true
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = ${lid_velocity}
solver_sys = u_system
[]
[vel_y]
type = MooseLinearVariableFVReal
initial_condition = 0
solver_sys = v_system
[]
[pressure]
type = MooseLinearVariableFVReal
initial_condition = 1e-8
solver_sys = pressure_system
[]
[TKE]
type = MooseLinearVariableFVReal
solver_sys = TKE_system
initial_condition = ${k_init}
[]
[TKED]
type = MooseLinearVariableFVReal
solver_sys = TKED_system
initial_condition = ${eps_init}
[]
[]
[FVInterpolationMethods]
[upwind]
type = FVAdvectedUpwind
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = upwind
mu = 'mu_t'
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
use_deviatoric_terms = yes
[]
[u_diffusion]
type = LinearFVDiffusion
variable = vel_x
diffusion_coeff = ${mu}
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = upwind
mu = 'mu_t'
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
use_deviatoric_terms = yes
[]
[v_diffusion]
type = LinearFVDiffusion
variable = vel_y
diffusion_coeff = ${mu}
use_nonorthogonal_correction = false
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[TKE_advection]
type = LinearFVTurbulentAdvection
variable = TKE
advected_interp_method_name = 'upwind'
[]
[TKE_diffusion]
type = LinearFVTurbulentDiffusion
variable = TKE
diffusion_coeff = ${mu}
use_nonorthogonal_correction = false
[]
[TKE_turb_diffusion]
type = LinearFVTurbulentDiffusion
variable = TKE
diffusion_coeff = 'mu_t'
scaling_coeff = ${sigma_k}
use_nonorthogonal_correction = false
[]
[TKE_source_sink]
type = LinearFVTKESourceSink
variable = TKE
u = vel_x
v = vel_y
epsilon = TKED
rho = ${rho}
mu = ${mu}
mu_t = 'mu_t'
walls = ${walls}
wall_treatment = ${wall_treatment}
C_pl = 1e10
[]
[TKED_advection]
type = LinearFVTurbulentAdvection
variable = TKED
advected_interp_method_name = 'upwind'
walls = ${walls}
[]
[TKED_diffusion]
type = LinearFVTurbulentDiffusion
variable = TKED
diffusion_coeff = ${mu}
use_nonorthogonal_correction = false
walls = ${walls}
[]
[TKED_turb_diffusion]
type = LinearFVTurbulentDiffusion
variable = TKED
diffusion_coeff = 'mu_t'
scaling_coeff = ${sigma_eps}
use_nonorthogonal_correction = false
walls = ${walls}
[]
[TKED_source_sink]
type = LinearFVTKEDSourceSink
variable = TKED
u = vel_x
v = vel_y
tke = TKE
rho = ${rho}
mu = ${mu}
mu_t = 'mu_t'
C1_eps = ${C1_eps}
C2_eps = ${C2_eps}
walls = ${walls}
wall_treatment = ${wall_treatment}
C_pl = 1e10
[]
[]
[LinearFVBCs]
[top_x]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = vel_x
boundary = 'top'
functor = 1
[]
[no_slip_x]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = vel_x
boundary = 'left right bottom'
functor = 0
[]
[no_slip_y]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = vel_y
boundary = 'left right top bottom'
functor = 0
[]
[pressure-extrapolation]
type = LinearFVExtrapolatedPressureBC
boundary = 'left right top bottom'
variable = pressure
use_two_term_expansion = true
[]
[walls_mu_t]
type = LinearFVTurbulentViscosityWallFunctionBC
boundary = 'bottom top'
variable = 'mu_t'
u = vel_x
v = vel_y
rho = ${rho}
mu = ${mu}
tke = TKE
wall_treatment = ${wall_treatment}
[]
[]
[AuxVariables]
[mu_t]
type = MooseLinearVariableFVReal
initial_condition = '${fparse rho * C_mu * ${k_init}^2 / eps_init}'
[]
[yplus]
type = MooseLinearVariableFVReal
[]
[mu_eff]
type = MooseLinearVariableFVReal
initial_condition = '${fparse rho * C_mu * ${k_init}^2 / eps_init}'
[]
[]
[AuxKernels]
[compute_mu_t]
type = kEpsilonViscosityAux
variable = mu_t
C_mu = ${C_mu}
tke = TKE
epsilon = TKED
mu = ${mu}
rho = ${rho}
u = vel_x
v = vel_y
bulk_wall_treatment = ${bulk_wall_treatment}
walls = ${walls}
wall_treatment = ${wall_treatment}
execute_on = 'NONLINEAR'
mu_t_ratio_max = 1e20
[]
[compute_y_plus]
type = RANSYPlusAux
variable = yplus
tke = TKE
mu = ${mu}
rho = ${rho}
u = vel_x
v = vel_y
walls = ${walls}
wall_treatment = ${wall_treatment}
execute_on = 'NONLINEAR'
[]
[compute_mu_eff]
type = ParsedAux
variable = 'mu_eff'
coupled_variables = 'mu_t'
expression = 'mu_t + ${mu}'
execute_on = 'NONLINEAR'
[]
[]
[Executioner]
type = SIMPLE
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
turbulence_systems = 'TKE_system TKED_system'
momentum_l_abs_tol = 1e-14
pressure_l_abs_tol = 1e-14
turbulence_l_abs_tol = 1e-14
momentum_l_tol = 1e-14
pressure_l_tol = 1e-14
turbulence_l_tol = 1e-14
momentum_equation_relaxation = 0.7
pressure_variable_relaxation = 0.3
turbulence_equation_relaxation = '0.5 0.5'
num_iterations = 1000
pressure_absolute_tolerance = 1e-12
momentum_absolute_tolerance = 1e-12
turbulence_absolute_tolerance = '1e-12 1e-12'
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
turbulence_petsc_options_iname = '-pc_type -pc_hypre_type'
turbulence_petsc_options_value = 'hypre boomeramg'
print_fields = false
continue_on_max_its = true
pin_pressure = true
pressure_pin_value = 0.0
pressure_pin_point = '0.01 0.099 0.0'
[]
[Outputs]
csv = true
perf_graph = false
print_nonlinear_residuals = false
print_linear_residuals = true
[]
[VectorPostprocessors]
[side_bottom]
type = SideValueSampler
boundary = 'bottom'
variable = 'vel_x vel_y pressure TKE TKED'
sort_by = 'x'
execute_on = 'timestep_end'
[]
[side_top]
type = SideValueSampler
boundary = 'top'
variable = 'vel_x vel_y pressure TKE TKED'
sort_by = 'x'
execute_on = 'timestep_end'
[]
[side_left]
type = SideValueSampler
boundary = 'left'
variable = 'vel_x vel_y pressure TKE TKED'
sort_by = 'y'
execute_on = 'timestep_end'
[]
[side_right]
type = SideValueSampler
boundary = 'right'
variable = 'vel_x vel_y pressure TKE TKED'
sort_by = 'y'
execute_on = 'timestep_end'
[]
[horizontal_center]
type = LineValueSampler
start_point = '${fparse 0.01 * side_length} ${fparse 0.499 * side_length} 0'
end_point = '${fparse 0.99 * side_length} ${fparse 0.499 * side_length} 0'
num_points = ${Mesh/gen/nx}
variable = 'vel_x vel_y pressure TKE TKED'
sort_by = 'x'
execute_on = 'timestep_end'
[]
[vertical_center]
type = LineValueSampler
start_point = '${fparse 0.499 * side_length} ${fparse 0.01 * side_length} 0'
end_point = '${fparse 0.499 * side_length} ${fparse 0.99 * side_length} 0'
num_points = ${Mesh/gen/ny}
variable = 'vel_x vel_y pressure TKE TKED'
sort_by = 'y'
execute_on = 'timestep_end'
[]
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/2d-symmetric/channel-physics.i)
mu = 2.6
rho = 1.2
advected_interp_method = 'upwind'
u_inlet = 1.1
half_width = 0.2
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '1.0'
dy = '${half_width}'
ix = '30'
iy = '15'
subdomain_id = '0'
[]
allow_renumbering = false
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system'
previous_nl_solution_required = true
[]
[Physics]
[NavierStokes]
[FlowSegregated/flow]
velocity_variable = 'vel_x vel_y'
pressure_variable = 'pressure'
initial_velocity = '0.5 0 0'
initial_pressure = '0.2'
density = ${rho}
dynamic_viscosity = ${mu}
inlet_boundaries = 'left'
momentum_inlet_types = 'fixed-velocity'
momentum_inlet_functors = '${u_inlet} 0'
wall_boundaries = 'top bottom'
momentum_wall_types = 'noslip symmetry'
outlet_boundaries = 'right'
momentum_outlet_types = 'fixed-pressure'
pressure_functors = '1.4'
orthogonality_correction = false
pressure_two_term_bc_expansion = true
momentum_two_term_bc_expansion = true
momentum_advection_interpolation = ${advected_interp_method}
[]
[]
[]
[Functions]
[u_parabolic_profile]
type = ParsedFunction
expression = '3/2*${u_inlet}*(1 - pow(y/${half_width}, 2))' # Poiseuille profile
[]
[u_parabolic_profile_rz]
type = ParsedFunction
expression = '2*${u_inlet}*(1 - pow(y/${half_width}, 2))' # Cylindrical profile
[]
[]
[AuxVariables]
[vel_exact]
type = MooseLinearVariableFVReal
[]
[]
[AuxKernels]
[assign_vel_exact]
type = FunctionAux
variable = vel_exact
function = u_parabolic_profile
execute_on = TIMESTEP_END
[]
[]
[VectorPostprocessors]
[outlet_velocity_profile]
type = SideValueSampler
variable = 'vel_x vel_exact'
boundary = 'right'
sort_by = 'y'
execute_on = TIMESTEP_END
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-12
pressure_l_abs_tol = 1e-12
momentum_l_tol = 0
pressure_l_tol = 0
rhie_chow_user_object = 'ins_rhie_chow_interpolator'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
momentum_equation_relaxation = 0.5
pressure_variable_relaxation = 0.3
num_iterations = 1000
pressure_absolute_tolerance = 1e-10
momentum_absolute_tolerance = 1e-10
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
print_fields = false
continue_on_max_its = true
[]
[Outputs]
csv = true
execute_on = timestep_end
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/2d-scalar/channel.i)
mu = 2.6
rho = 1.0
advected_interp_method = 'upwind'
scalar_advected_interp_method = ${advected_interp_method}
k1 = 0.1
k2 = 0.2
[Mesh]
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '0.25 0.25'
dy = '0.2'
ix = '5 5'
iy = '5'
subdomain_id = '0 1'
[]
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system s1_system s2_system'
previous_nl_solution_required = true
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = 0.5
solver_sys = u_system
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
initial_condition = 0.0
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
initial_condition = 0.2
[]
[scalar1]
type = MooseLinearVariableFVReal
solver_sys = s1_system
initial_condition = 1.1
[]
[scalar2]
type = MooseLinearVariableFVReal
solver_sys = s2_system
initial_condition = 3
[]
[]
[FVInterpolationMethods]
[upwind]
type = FVAdvectedUpwind
[]
[vanLeer]
type = FVAdvectedVanLeerWeightBased
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[s1_advection]
type = LinearFVScalarAdvection
variable = scalar1
advected_interp_method_name = ${scalar_advected_interp_method}
rhie_chow_user_object = 'rc'
[]
[s1_diffusion]
type = LinearFVDiffusion
variable = scalar1
diffusion_coeff = ${k1}
use_nonorthogonal_correction = false
[]
[s2_diffusion]
type = LinearFVScalarAdvection
variable = scalar2
advected_interp_method_name = ${scalar_advected_interp_method}
rhie_chow_user_object = 'rc'
[]
[s2_conduction]
type = LinearFVDiffusion
variable = scalar2
diffusion_coeff = ${k2}
use_nonorthogonal_correction = false
[]
[]
[LinearFVBCs]
[inlet-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_x
functor = '1.1'
[]
[inlet-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_y
functor = '0.0'
[]
[walls-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom'
variable = vel_x
functor = 0.0
[]
[walls-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom'
variable = vel_y
functor = 0.0
[]
[outlet_p]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'right'
variable = pressure
functor = 1.4
[]
[outlet_u]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_x
use_two_term_expansion = false
boundary = right
[]
[outlet_v]
type = LinearFVAdvectionDiffusionOutflowBC
variable = vel_y
use_two_term_expansion = false
boundary = right
[]
[inlet_wall_scalar1]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = scalar1
functor = 1
boundary = 'left'
[]
[outlet_scalar1]
type = LinearFVAdvectionDiffusionOutflowBC
variable = scalar1
use_two_term_expansion = false
boundary = right
[]
[inlet_wall_scalar2]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = scalar2
functor = 2
boundary = 'left'
[]
[outlet_scalar2]
type = LinearFVAdvectionDiffusionOutflowBC
variable = scalar2
use_two_term_expansion = false
boundary = right
[]
[]
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-13
pressure_l_abs_tol = 1e-13
passive_scalar_l_abs_tol = 1e-13
momentum_l_tol = 0
pressure_l_tol = 0
passive_scalar_l_tol = 0
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
passive_scalar_systems = 's1_system s2_system'
momentum_equation_relaxation = 0.8
passive_scalar_equation_relaxation = '0.9 0.9'
pressure_variable_relaxation = 0.3
# We need to converge the problem to show conservation
num_iterations = 200
pressure_absolute_tolerance = 1e-10
momentum_absolute_tolerance = 1e-10
# The solution being flat, the normalization factor based on fluxes goes to
# 0. The convergence criteria being multiplied by said factor, we won't do any
# better than this. For a non-flat solution, use tighter tolerances
passive_scalar_absolute_tolerance = '1e-2 1e-2'
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
passive_scalar_petsc_options_iname = '-pc_type -pc_hypre_type'
passive_scalar_petsc_options_value = 'hypre boomeramg'
print_fields = false
continue_on_max_its = true
[]
[Outputs]
exodus = true
execute_on = timestep_end
hide = 'pressure vel_x vel_y'
[]
(modules/navier_stokes/test/tests/finite_volume/ins/natural_convection/linear_segregated/2d/diff_heated_cavity_linear_buoyancy.i)
################################################################################
# MATERIAL PROPERTIES
################################################################################
rho_0 = 3279.
mu = 1.0
k_cond = 38.0
cp = ${fparse 640}
alpha_b = 3.26e-5
T_0 = 875.0
walls = 'right left top bottom'
[GlobalParams]
rhie_chow_user_object = 'ins_rhie_chow_interpolator'
advected_interp_method = 'upwind'
u = vel_x
v = vel_y
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system energy_system'
previous_nl_solution_required = true
[]
################################################################################
# GEOMETRY
################################################################################
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 1
xmax = 2.0
ymin = 1.0
ymax = 2.0
nx = 15
ny = 15
[]
[]
################################################################################
# EQUATIONS: VARIABLES, KERNELS & BCS
################################################################################
[UserObjects]
[ins_rhie_chow_interpolator]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = 'rho'
p_diffusion_kernel = p_diffusion
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
solver_sys = u_system
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
[]
[pressure]
type = MooseLinearVariableFVReal
initial_condition = 0
solver_sys = pressure_system
[]
[T_fluid]
type = MooseLinearVariableFVReal
solver_sys = energy_system
initial_condition = 875
[]
[]
[FVInterpolationMethods]
[upwind]
type = FVAdvectedUpwind
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = upwind
mu = ${mu}
momentum_component = 'x'
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[u_buoyancy]
type = LinearFVMomentumBuoyancy
variable = vel_x
rho = 'rho'
reference_rho = ${rho_0}
gravity = '0 -9.81 0'
momentum_component = 'x'
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = upwind
mu = ${mu}
momentum_component = 'y'
use_nonorthogonal_correction = false
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[v_buoyancy]
type = LinearFVMomentumBuoyancy
variable = vel_y
rho = 'rho'
reference_rho = ${rho_0}
gravity = '0 -9.81 0'
momentum_component = 'y'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = false
[]
####### FUEL ENERGY EQUATION #######
[heat_advection]
type = LinearFVEnergyAdvection
variable = T_fluid
advected_quantity = temperature
cp = ${cp}
[]
[conduction]
type = LinearFVDiffusion
variable = T_fluid
diffusion_coeff = ${k_cond}
[]
[]
[LinearFVBCs]
[no-slip-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = vel_x
boundary = ${walls}
functor = 0
[]
[no-slip-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = vel_y
boundary = ${walls}
functor = 0
[]
[T_cold]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T_fluid
boundary = 'right'
functor = 870.0
[]
[T_hot]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T_fluid
boundary = 'left'
functor = 880.0
[]
[T_all]
type = LinearFVAdvectionDiffusionFunctorNeumannBC
variable = T_fluid
boundary = 'top bottom'
functor = 0.0
[]
[pressure]
type = LinearFVPressureFluxBC
boundary = 'top bottom left right'
variable = pressure
HbyA_flux = HbyA
Ainv = Ainv
u = vel_x
v = vel_y
rho = 'rho'
[]
[]
[FunctorMaterials]
[rho_function]
type = ParsedFunctorMaterial
property_name = 'rho'
functor_names = 'T_fluid'
expression = '${rho_0}*(1-${alpha_b}*(T_fluid-${T_0})) '
[]
[]
################################################################################
# EXECUTION / SOLVE
################################################################################
[Executioner]
type = SIMPLE
momentum_l_abs_tol = 1e-11
pressure_l_abs_tol = 1e-11
energy_l_abs_tol = 1e-11
momentum_l_tol = 0
pressure_l_tol = 0
energy_l_tol = 0
rhie_chow_user_object = 'ins_rhie_chow_interpolator'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
energy_system = 'energy_system'
momentum_equation_relaxation = 0.7
pressure_variable_relaxation = 0.3
energy_equation_relaxation = 0.9
num_iterations = 1500
pressure_absolute_tolerance = 1e-8
momentum_absolute_tolerance = 1e-8
energy_absolute_tolerance = 1e-8
print_fields = false
momentum_l_max_its = 300
pin_pressure = true
pressure_pin_value = 0.0
pressure_pin_point = '1.5 1.5 0.0'
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
energy_petsc_options_iname = '-pc_type -pc_hypre_type'
energy_petsc_options_value = 'hypre boomeramg'
continue_on_max_its = true
[]
################################################################################
# SIMULATION OUTPUTS
################################################################################
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/cht/conjugate_heat_transfer/cht_rob-rob.i)
### benchmark sources:
### https://doi.org/10.1016/j.compfluid.2018.06.016
### https://doi.org/10.1016/0017-9310(74)90087-8
b = 0.01 # plate thickness
l = 0.2 # plate length
nxi = 24 # nx in the inlet/entrance region
nyf = 18 # ny in fluid
nxf = 24 # nx in the main fluid region
nys = 8 # ny in the solid domain
fx1_bias = 1.00 # bdry layer bias - fluid
fx2_bias = '${fparse 1.0/1.00}' # bdry layer bias - solid
fy_bias = 1.20 # bdry layer bias - fluid
sy_bias = '${fparse 1.0/1.05}' # bdry layer bias - solid
k_s = 0.2876
rho = 0.3525
mu = 3.95e-5
k = 0.06808
cp = 1142.6
vin = 12.0
Tin = 1000.0
T_s_bottom = 600.0
P_out = 1.03e5
h_s = 1.0
h_f = 1.0
advected_interp_method = 'upwind'
[Mesh]
[fluid_channel]
type = GeneratedMeshGenerator
dim = 2
nx = ${nxf}
ny = ${nyf}
xmin = 0
xmax = ${l}
ymin = 0
ymax = '${fparse 10.0*b}'
subdomain_ids = '1'
subdomain_name = 'fluid'
bias_x = '${fx1_bias}'
bias_y = '${fparse fy_bias}'
boundary_name_prefix = 'fluid'
[]
[solid_base]
type = GeneratedMeshGenerator
dim = 2
nx = ${nxf}
ny = ${nys}
xmin = 0
xmax = ${l}
ymin = '${fparse -b}'
ymax = 0
subdomain_ids = '2'
subdomain_name = 'solid'
bias_x = ${fx1_bias}
bias_y = '${fparse sy_bias}'
boundary_id_offset = 10
boundary_name_prefix = 'solid'
[]
[entrance]
type = GeneratedMeshGenerator
dim = 2
nx = '${fparse 2.0*nxi}'
ny = ${nyf}
xmin = '${fparse -2.0*l}'
xmax = 0
ymin = 0
ymax = '${fparse 10.0*b}'
subdomain_ids = '0'
subdomain_name = 'entrance'
bias_x = ${fx2_bias}
bias_y = '${fparse fy_bias}'
boundary_id_offset = 20
boundary_name_prefix = 'ent'
[]
[smg]
type = StitchedMeshGenerator
inputs = 'entrance fluid_channel solid_base'
stitch_boundaries_pairs = 'ent_right fluid_left;
fluid_bottom solid_top'
prevent_boundary_ids_overlap = false
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = 'smg'
primary_block = 'fluid'
paired_block = 'solid'
new_boundary = interface
[]
[symmetry_transform]
type = SymmetryTransformGenerator
input = interface
mirror_point = '0 0 0'
mirror_normal_vector = '0 1 0'
[]
inactive = 'symmetry_transform'
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system energy_system solid_energy_system'
previous_nl_solution_required = true
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
block = '0 1'
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = ${vin}
solver_sys = u_system
block = '0 1'
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
initial_condition = 0.0
block = '0 1'
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
initial_condition = ${P_out}
block = '0 1'
[]
[T_fluid]
type = MooseLinearVariableFVReal
solver_sys = energy_system
initial_condition = ${Tin}
block = '0 1'
[]
[T_solid]
type = MooseLinearVariableFVReal
solver_sys = solid_energy_system
initial_condition = ${T_s_bottom}
block = 2
[]
[]
[FVInterpolationMethods]
[upwind]
type = FVAdvectedUpwind
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[h_advection]
type = LinearFVEnergyAdvection
variable = T_fluid
advected_quantity = temperature
cp = ${cp}
advected_interp_method = ${advected_interp_method}
rhie_chow_user_object = 'rc'
[]
[conduction]
type = LinearFVDiffusion
variable = T_fluid
diffusion_coeff = ${k}
use_nonorthogonal_correction = false
[]
[solid-conduction]
type = LinearFVDiffusion
variable = T_solid
diffusion_coeff = ${k_s}
use_nonorthogonal_correction = false
[]
[]
[LinearFVBCs]
# velocity BCs
[inlet-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'ent_left'
variable = vel_x
functor = ${vin}
[]
[inlet-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'ent_left'
variable = vel_y
functor = '0.000'
[]
[walls-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'ent_bottom interface'
variable = vel_x
functor = 0.0
[]
[walls-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'ent_bottom interface'
variable = vel_y
functor = 0.0
[]
[outlet_p]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'fluid_right'
variable = pressure
functor = ${P_out}
[]
[outlet_u]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'fluid_right'
variable = vel_x
use_two_term_expansion = false
[]
[outlet_v]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'fluid_right'
variable = vel_y
use_two_term_expansion = false
[]
# freestream BCs for top of fluid domain
[freestream_u]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'fluid_top ent_top'
variable = vel_x
use_two_term_expansion = false
[]
[freestream_v]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'fluid_top ent_top'
variable = vel_y
use_two_term_expansion = false
[]
[freestream_p]
type = LinearFVAdvectionDiffusionFunctorNeumannBC
boundary = 'fluid_top ent_top'
variable = pressure
functor = 0
[]
# temperature BCs
[inlet_T]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T_fluid
functor = ${Tin}
boundary = 'ent_left'
[]
[heated_wall_solid]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T_solid
functor = ${T_s_bottom}
boundary = 'solid_bottom'
[]
[insulated_fluid]
type = LinearFVAdvectionDiffusionFunctorNeumannBC
variable = T_fluid
functor = 0
boundary = 'ent_top ent_bottom fluid_top'
[]
[insulated_solid]
type = LinearFVAdvectionDiffusionFunctorNeumannBC
variable = T_solid
functor = 0
boundary = 'solid_left solid_right'
[]
[outlet_T]
type = LinearFVAdvectionDiffusionOutflowBC
variable = T_fluid
use_two_term_expansion = false
boundary = 'fluid_right'
[]
[fluid_solid]
type = LinearFVRobinCHTBC
variable = T_fluid
boundary = interface
h = ${h_f}
incoming_flux = heat_flux_to_fluid_interface
surface_temperature = interface_temperature_to_fluid_interface
thermal_conductivity = ${k}
[]
[solid_fluid]
type = LinearFVRobinCHTBC
variable = T_solid
boundary = interface
h = ${h_s}
incoming_flux = heat_flux_to_solid_interface
surface_temperature = interface_temperature_to_solid_interface
thermal_conductivity = ${k_s}
[]
[]
[FunctorMaterials]
[rhocpT]
property_name = 'rhocpT'
type = ParsedFunctorMaterial
functor_names = 'T_fluid'
expression = '${rho}*${cp}*T_fluid'
[]
[]
[Postprocessors]
[h_in]
type = VolumetricFlowRate
boundary = 'ent_left'
vel_x = vel_x
vel_y = vel_y
rhie_chow_user_object = rc
advected_quantity = 'rhocpT'
subtract_mesh_velocity = false
[]
[h_out]
type = VolumetricFlowRate
boundary = 'fluid_right fluid_top ent_top interface'
vel_x = vel_x
vel_y = vel_y
rhie_chow_user_object = rc
advected_quantity = 'rhocpT'
advected_interp_method = upwind
subtract_mesh_velocity = false
[]
[]
[VectorPostprocessors]
[y_vs_ts]
type = LineValueSampler
variable = 'T_solid'
start_point = '0.05 -1e-9 0' # making sure we are always in the domain
end_point = '0.05 ${fparse -b+1e-9} 0'
num_points = 8
sort_by = id
warn_discontinuous_face_values = false
[]
[y_vs_tf]
type = LineValueSampler
variable = 'T_fluid'
start_point = '0.05 1e-9 0' # making sure we are always in the domain
end_point = '0.05 ${fparse b-1e-9} 0'
num_points = 12
sort_by = id
warn_discontinuous_face_values = false
[]
[]
[Executioner]
type = SIMPLE
num_iterations = 1000
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
rhie_chow_user_object = 'rc'
momentum_l_abs_tol = 1e-10
pressure_l_abs_tol = 1e-10
momentum_l_tol = 0
pressure_l_tol = 0
momentum_equation_relaxation = 0.9
pressure_variable_relaxation = 0.3
momentum_absolute_tolerance = 1e-7
pressure_absolute_tolerance = 1e-7
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
energy_system = 'energy_system'
solid_energy_system = 'solid_energy_system'
energy_l_abs_tol = 1e-10
solid_energy_l_abs_tol = 1e-10
energy_l_tol = 0
solid_energy_l_tol = 0
energy_equation_relaxation = 1.0
energy_absolute_tolerance = 1e-7
solid_energy_absolute_tolerance = 1e-7
energy_petsc_options_iname = '-pc_type -pc_hypre_type'
energy_petsc_options_value = 'hypre boomeramg'
solid_energy_petsc_options_iname = '-pc_type -pc_hypre_type'
solid_energy_petsc_options_value = 'hypre boomeramg'
cht_interfaces = 'interface'
cht_solid_flux_relaxation = 1.0
cht_fluid_flux_relaxation = 1.0
cht_solid_temperature_relaxation = 1.0
cht_fluid_temperature_relaxation = 1.0
max_cht_fpi = 2
print_fields = false
[]
[Outputs]
exodus = true
csv = true
execute_on = timestep_end
[]
(modules/navier_stokes/test/tests/finite_volume/two_phase/mixture_model/segregated/channel-drift-flux-physics.i)
mu = 1.0
rho = 10.0
mu_d = 0.1
rho_d = 1.0
l = 2
U = 1
dp = 0.01
inlet_phase_2 = 0.1
# 'average' leads to slight oscillations, upwind may be preferred
advected_interp_method = 'average'
# TODO remove need for those
cp = 1
k = 1
cp_d = 1
k_d = 1
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = '${fparse l * 5}'
ymin = '${fparse -l / 2}'
ymax = '${fparse l / 2}'
nx = 10
ny = 4
[]
uniform_refine = 0
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system phi_system'
[]
[Physics]
[NavierStokes]
[FlowSegregated]
[flow]
compressibility = 'incompressible'
density = 'rho_mixture'
dynamic_viscosity = 'mu_mixture'
# Initial conditions
initial_velocity = '${U} 0 0'
initial_pressure = 0
# Boundary conditions
inlet_boundaries = 'left'
momentum_inlet_types = 'fixed-velocity'
momentum_inlet_functors = '${U} 0'
wall_boundaries = 'top bottom'
momentum_wall_types = 'noslip noslip'
outlet_boundaries = 'right'
momentum_outlet_types = 'fixed-pressure'
pressure_functors = '0'
# Friction is done in drift flux term
friction_types = "Darcy"
friction_coeffs = "Darcy_coefficient_vec"
standard_friction_formulation = true
momentum_advection_interpolation = '${advected_interp_method}'
orthogonality_correction = false
# To match reference better
pressure_two_term_bc_expansion = true
momentum_two_term_bc_expansion = true
[]
[]
[TwoPhaseMixtureSegregated]
[mixture]
system_names = 'phi_system'
phase_1_fraction_name = 'phase_1'
phase_2_fraction_name = 'phase_2'
# Phase transport equation
add_phase_transport_equation = true
alpha_exchange = 0.1
phase_advection_interpolation = 'upwind'
# see flow for inlet boundaries
phase_fraction_inlet_type = 'fixed-value'
phase_fraction_inlet_functors = '${inlet_phase_2}'
# Drift flux parameters
add_drift_flux_momentum_terms = true
density_interp_method = 'average'
# This has to be consistent with the friction model
slip_linear_friction_name = 'Darcy_coefficient'
# Base phase material properties
phase_1_density_name = ${rho}
phase_1_viscosity_name = ${mu}
phase_1_specific_heat_name = ${cp}
phase_1_thermal_conductivity_name = ${k}
# Other phase material properties
phase_2_density_name = ${rho_d}
phase_2_viscosity_name = ${mu_d}
phase_2_specific_heat_name = ${cp_d}
phase_2_thermal_conductivity_name = ${k_d}
output_all_properties = true
# Friction model
use_dispersed_phase_drag_model = true
particle_diameter = ${dp}
add_advection_slip_term = false
[]
[]
[]
[]
[Executioner]
type = SIMPLE
rhie_chow_user_object = 'ins_rhie_chow_interpolator'
# Systems
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
active_scalar_systems = 'phi_system'
momentum_equation_relaxation = 0.8
active_scalar_equation_relaxation = '0.7'
pressure_variable_relaxation = 0.3
# We need to converge the problem to show conservation
num_iterations = 200
pressure_absolute_tolerance = 1e-10
momentum_absolute_tolerance = 1e-10
active_scalar_absolute_tolerance = '1e-10'
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
active_scalar_petsc_options_iname = '-pc_type -pc_hypre_type'
active_scalar_petsc_options_value = 'hypre boomeramg'
momentum_l_abs_tol = 1e-13
pressure_l_abs_tol = 1e-13
active_scalar_l_abs_tol = 1e-13
momentum_l_tol = 0
pressure_l_tol = 0
active_scalar_l_tol = 0
# print_fields = true
continue_on_max_its = true
[]
[Outputs]
print_linear_residuals = true
print_nonlinear_residuals = true
csv = true
[out]
type = Exodus
hide = 'Re dp'
[]
execute_on = 'INITIAL TIMESTEP_END'
[]
[Postprocessors]
[Re]
type = ParsedPostprocessor
expression = '${rho} * ${l} * ${U}'
[]
[dp]
type = PressureDrop
pressure = 'pressure'
upstream_boundary = 'left'
downstream_boundary = 'right'
boundary = 'left right'
[]
[average_phase2]
type = ElementAverageValue
variable = 'phase_2'
[]
[max_phase2]
type = ElementExtremeValue
variable = 'phase_2'
[]
[]