- variableThe name of the variable whose linear system this object contributes to
C++ Type:LinearVariableName
Unit:(no unit assumed)
Controllable:No
Description:The name of the variable whose linear system this object contributes to
LinearFVDiffusion
Description
This kernel contributes to the system matrix and the right hand side of a system which is solved for a linear finite volume variable MooseVariableLinearFVReal. The contributions can be derived using the integral of the diffusion term in the following form:
where we used the divergence theorem to transform a volumetric integral over cell of a vector field to a sum of surface integrals over the faces of the cell. Furthermore, denotes a space dependent diffusion coefficient. With this, we can use the finite volume approximation for the face integrals in the following way:
where denotes the surface area. Vectors and are determined to respect , where is always parallel to the line connecting the current and neighbor cell centroids. We use the over-relaxed approach for the split of the normal vector, described in Moukalled et al. (2016) and Jasak (1996) in detail. As shown above, using these two vectors, the approximate form of the normal-gradient is typically split into two terms:
which describes a contribution that comes from a finite difference approximation of the gradient on orthogonal grids. Hence, it is referred to as an orthogonal contribution. For orthogonal meshes, is just where is the distance between the current and neighbor cell centroids. This term contributes a () to the diagonal and off-diagonal entries of the system matrix with different signs.
On non-orthogonal meshes, besides , the following correction term is needed: , where denotes the interpolated gradient at the face center computed using the cell gradients on the current and neighbor cells. This term is treated in an explicit manner meaning that it is added to the right hand side vector of the system.
For more information on the numerical representation of the diffusion term and the different techniques used for applying boundary conditions through this kernel, see Moukalled et al. (2016) and Jasak (1996).
The diffusion coefficient parameter ("diffusion_coeff") accepts anything that supports functor-based evaluations. For more information on functors in MOOSE, see Functor system.
Example input syntax
The input file below shows a pure diffusion problem on a two-dimensional domain.
[LinearFVKernels<<<{"href": "../../syntax/LinearFVKernels/index.html"}>>>]
[diffusion]
type = LinearFVDiffusion<<<{"description": "Represents the matrix and right hand side contributions of a diffusion term in a partial differential equation.", "href": "LinearFVDiffusion.html"}>>>
variable<<<{"description": "The name of the variable whose linear system this object contributes to"}>>> = u
diffusion_coeff<<<{"description": "The diffusion coefficient. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number."}>>> = coeff_func
use_nonorthogonal_correction<<<{"description": "If the nonorthogonal correction should be used when computing the normal gradient."}>>> = false
[]
[source]
type = LinearFVSource<<<{"description": "Represents the matrix and right hand side contributions of a solution-independent source term in a partial differential equation.", "href": "LinearFVSource.html"}>>>
variable<<<{"description": "The name of the variable whose linear system this object contributes to"}>>> = u
source_density<<<{"description": "The source density. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number."}>>> = source_func
[]
[]
(test/tests/linearfvkernels/diffusion/diffusion-2d.i)Input Parameters
- blockThe list of blocks (ids or names) that this object will be applied
C++ Type:std::vector<SubdomainName>
Controllable:No
Description:The list of blocks (ids or names) that this object will be applied
- diffusion_coeff1The diffusion coefficient. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.
Default:1
C++ Type:MooseFunctorName
Unit:(no unit assumed)
Controllable:No
Description:The diffusion coefficient. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.
- force_boundary_executionFalseWhether to force execution of this object on all external boundaries.
Default:False
C++ Type:bool
Controllable:No
Description:Whether to force execution of this object on all external boundaries.
- matrix_onlyFalseWhether this object is only doing assembly to matrices (no vectors)
Default:False
C++ Type:bool
Controllable:No
Description:Whether this object is only doing assembly to matrices (no vectors)
- use_nonorthogonal_correctionTrueIf the nonorthogonal correction should be used when computing the normal gradient.
Default:True
C++ Type:bool
Controllable:No
Description:If the nonorthogonal correction should be used when computing the normal gradient.
Optional Parameters
- absolute_value_vector_tagsThe tags for the vectors this residual object should fill with the absolute value of the residual contribution
C++ Type:std::vector<TagName>
Controllable:No
Description:The tags for the vectors this residual object should fill with the absolute value of the residual contribution
- extra_matrix_tagsThe extra tags for the matrices this Kernel should fill
C++ Type:std::vector<TagName>
Controllable:No
Description:The extra tags for the matrices this Kernel should fill
- extra_vector_tagsThe extra tags for the vectors this Kernel should fill
C++ Type:std::vector<TagName>
Controllable:No
Description:The extra tags for the vectors this Kernel should fill
- matrix_tagssystemThe tag for the matrices this Kernel should fill
Default:system
C++ Type:MultiMooseEnum
Options:nontime, system
Controllable:No
Description:The tag for the matrices this Kernel should fill
- vector_tagsrhsThe tag for the vectors this Kernel should fill
Default:rhs
C++ Type:MultiMooseEnum
Options:rhs, time
Controllable:No
Description:The tag for the vectors this Kernel should fill
Contribution To Tagged Field Data 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.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:Yes
Description:Set the enabled status of the MooseObject.
- implicitTrueDetermines whether this object is calculated using an implicit or explicit form
Default:True
C++ Type:bool
Controllable:No
Description:Determines whether this object is calculated using an implicit or explicit form
- seed0The seed for the master random number generator
Default:0
C++ Type:unsigned int
Controllable:No
Description:The seed for the master random number generator
- use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Advanced Parameters
- ghost_layers1The number of layers of elements to ghost.
Default:1
C++ Type:unsigned short
Controllable:No
Description:The number of layers of elements to ghost.
- use_point_neighborsFalseWhether to use point neighbors, which introduces additional ghosting to that used for simple face neighbors.
Default:False
C++ Type:bool
Controllable:No
Description:Whether to use point neighbors, which introduces additional ghosting to that used for simple face neighbors.
Parallel Ghosting Parameters
Input Files
- (test/tests/variables/linearfv/diffusion-1d-aux.i)
- (test/tests/linearfvkernels/diffusion-reaction-advection/advection-diffusion-reaction-1d.i)
- (test/tests/linearfvkernels/diffusion/diffusion-1d_neumann.i)
- (test/tests/linearfvkernels/block-restriction/block-restricted-diffusion.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/2d/2d-boussinesq-transient.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/cht/flow-around-square-linear.i)
- (test/tests/multiapps/linearfv_nonlinearfv/linearfv.i)
- (modules/navier_stokes/test/tests/finite_volume/wcns/enthalpy_equation/enthalpy_equation.i)
- (test/tests/time_integrators/implicit-euler/ie-linearfv.i)
- (test/tests/variables/linearfv/diffusion-1d-pp.i)
- (test/tests/postprocessors/side_diffusive_flux_integral/side_diffusive_flux_integral_linear_fv.i)
- (test/tests/linearfvkernels/diffusion/diffusion-1d.i)
- (test/tests/linearfvkernels/diffusion-reaction-advection/advection-diffusion-reaction-2d.i)
- (test/tests/transfers/multiapp_copy_transfer/linear_sys_to_aux/linear_sub.i)
- (test/tests/linearfvkernels/block-restriction/block-restricted-diffusion-react.i)
- (test/tests/linearfvkernels/diffusion/diffusion-2d_neumann.i)
- (test/tests/time_steppers/iteration_adaptive/adapt_linear_systems.i)
- (test/tests/linearfvkernels/diffusion/diffusion-2d.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/steady-transient-compare/common-blocks.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/natural_convection/linear_segregated/2d/diff_heated_cavity_linear_segregated.i)
- (test/tests/linearfvkernels/block-restriction/block-restricted-adr.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/cht/flow-around-square-linear-fluidonly.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/2d-heated/fluid.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/2d-scalar/channel.i)
- (test/tests/linearfvkernels/diffusion/diffusion-2d-rz.i)
- (test/tests/outputs/debug/show_execution_linear_fv_flux.i)
- (test/tests/multisystem/picard/linearfv_nonlinearfv/same_input.i)
- (test/tests/tag/tag-linearfv.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.[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)" }
- Fadl Moukalled, L Mangani, Marwan Darwish, and others.
The finite volume method in computational fluid dynamics.
Volume 6.
Springer, 2016.[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" }
diffusion_coeff
Default:1
C++ Type:MooseFunctorName
Unit:(no unit assumed)
Controllable:No
Description:The diffusion coefficient. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.
(test/tests/linearfvkernels/diffusion/diffusion-2d.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 1
ymax = 0.5
[]
[]
[Problem]
linear_sys_names = 'u_sys'
[]
[Variables]
[u]
type = MooseLinearVariableFVReal
solver_sys = 'u_sys'
initial_condition = 1.0
[]
[]
[LinearFVKernels]
[diffusion]
type = LinearFVDiffusion
variable = u
diffusion_coeff = coeff_func
use_nonorthogonal_correction = false
[]
[source]
type = LinearFVSource
variable = u
source_density = source_func
[]
[]
[LinearFVBCs]
[dir]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = u
boundary = "left right top bottom"
functor = analytic_solution
[]
[]
[Functions]
[coeff_func]
type = ParsedFunction
expression = '1+0.5*x*y'
[]
[source_func]
type = ParsedFunction
expression = '2*(1.5-y*y)+2*x*y*(1.5-y*y)+2*(1.5-x*x)+2*x*y*(1.5-x*x)'
[]
[analytic_solution]
type = ParsedFunction
expression = '(1.5-x*x)*(1.5-y*y)'
[]
[]
[Postprocessors]
[h]
type = AverageElementSize
execute_on = FINAL
[]
[error]
type = ElementL2FunctorError
approximate = u
exact = analytic_solution
execute_on = FINAL
[]
[]
[Convergence]
[linear]
type = IterationCountConvergence
max_iterations = 1
converge_at_max_iterations = true
[]
[]
[Executioner]
type = Steady
system_names = u_sys
l_tol = 1e-10
multi_system_fixed_point=true
multi_system_fixed_point_convergence=linear
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
[csv]
type = CSV
execute_on = FINAL
[]
[]
(test/tests/variables/linearfv/diffusion-1d-aux.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
nx = 10
[]
[]
[Problem]
linear_sys_names = 'u_sys'
[]
[Variables]
[u]
type = MooseLinearVariableFVReal
solver_sys = 'u_sys'
initial_condition = 1.0
[]
[]
[AuxVariables]
[v_volume]
type = MooseLinearVariableFVReal
initial_condition = 50
[]
[v_functor]
type = MooseLinearVariableFVReal
initial_condition = 25
[]
[v_parsed]
type = MooseLinearVariableFVReal
initial_condition = 12.5
[]
[]
[AuxKernels]
[volume]
type = VolumeAux
variable = v_volume
[]
[functor]
type = FunctorAux
variable = v_functor
functor = u
[]
[parsed]
type = ParsedAux
variable = v_parsed
coupled_variables = 'v_volume v_functor'
expression = '0.5*v_volume+0.5*v_functor'
[]
[]
[LinearFVKernels]
[diffusion]
type = LinearFVDiffusion
variable = u
diffusion_coeff = coeff_func
[]
[source]
type = LinearFVSource
variable = u
source_density = source_func
[]
[]
[LinearFVBCs]
[dir]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = u
boundary = "left right"
functor = analytic_solution
[]
[]
[Functions]
[coeff_func]
type = ParsedFunction
expression = '0.5*x'
[]
[source_func]
type = ParsedFunction
expression = '2*x'
[]
[analytic_solution]
type = ParsedFunction
expression = '1-x*x'
[]
[]
[Executioner]
type = Steady
system_names = u_sys
l_tol = 1e-10
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
execute_on = TIMESTEP_END
[]
(test/tests/linearfvkernels/diffusion-reaction-advection/advection-diffusion-reaction-1d.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
nx = 2
[]
[]
[Problem]
linear_sys_names = 'u_sys'
[]
[Variables]
[u]
type = MooseLinearVariableFVReal
solver_sys = 'u_sys'
initial_condition = 1.0
[]
[]
[LinearFVKernels]
[diffusion]
type = LinearFVDiffusion
variable = u
diffusion_coeff = diff_coeff_func
use_nonorthogonal_correction = false
[]
[advection]
type = LinearFVAdvection
variable = u
velocity = "0.5 0 0"
advected_interp_method = average
[]
[reaction]
type = LinearFVReaction
variable = u
coeff = coeff_func
[]
[source]
type = LinearFVSource
variable = u
source_density = source_func
[]
[]
[LinearFVBCs]
inactive = "outflow neumann"
[dir]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = u
boundary = "left right"
functor = analytic_solution
[]
[outflow]
type = LinearFVAdvectionDiffusionOutflowBC
variable = u
boundary = "right"
use_two_term_expansion = true
[]
[neumann]
type = LinearFVAdvectionDiffusionFunctorNeumannBC
variable = u
boundary = "left"
functor = analytic_solution_neumann_left
diffusion_coeff = diff_coeff_func
[]
[]
[Functions]
[diff_coeff_func]
type = ParsedFunction
expression = '1+0.5*x'
[]
[coeff_func]
type = ParsedFunction
expression = '1+1/(1+x)'
[]
[source_func]
type = ParsedFunction
expression = '(1+1/(x+1))*(sin(pi/2*x)+1.5)+0.25*pi*pi*(0.5*x+1)*sin(pi/2*x)'
[]
[analytic_solution]
type = ParsedFunction
expression = 'sin(pi/2*x)+1.5'
[]
[analytic_solution_neumann_left]
type = ParsedFunction
expression = '-(1+0.5*x)*cos(pi/2*x)*pi/2'
[]
[]
[Postprocessors]
[h]
type = AverageElementSize
execute_on = FINAL
[]
[error]
type = ElementL2FunctorError
approximate = u
exact = analytic_solution
execute_on = FINAL
[]
[]
[Convergence]
[linear]
type = IterationCountConvergence
max_iterations = 1
converge_at_max_iterations = true
[]
[]
[Executioner]
type = Steady
system_names = u_sys
multi_system_fixed_point=true
multi_system_fixed_point_convergence=linear
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_rtol'
petsc_options_value = 'hypre boomeramg 1e-10'
[]
[Outputs]
[csv]
type = CSV
execute_on = FINAL
[]
[]
(test/tests/linearfvkernels/diffusion/diffusion-1d_neumann.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
nx = 2
[]
[]
[Problem]
linear_sys_names = 'u_sys'
[]
[Variables]
[u]
type = MooseLinearVariableFVReal
solver_sys = 'u_sys'
initial_condition = 1.0
[]
[]
[LinearFVKernels]
[diffusion]
type = LinearFVDiffusion
variable = u
diffusion_coeff = coeff_func
[]
[source]
type = LinearFVSource
variable = u
source_density = source_func
[]
[]
[LinearFVBCs]
[dir]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = u
boundary = "right"
functor = analytic_solution
[]
[neu]
type = LinearFVAdvectionDiffusionFunctorNeumannBC
variable = u
boundary = "left"
functor = analytic_solution_neumann
[]
[]
[Functions]
[coeff_func]
type = ParsedFunction
expression = '0.5*x'
[]
[source_func]
type = ParsedFunction
expression = '2*x'
[]
[analytic_solution]
type = ParsedFunction
expression = '1-x*x'
[]
[analytic_solution_neumann]
type = ParsedFunction
expression = '-(0.5*x)*(-2*x)'
[]
[]
[Postprocessors]
[h]
type = AverageElementSize
execute_on = FINAL
[]
[error]
type = ElementL2FunctorError
approximate = u
exact = analytic_solution
execute_on = FINAL
[]
[]
[Executioner]
type = Steady
system_names = u_sys
l_tol = 1e-10
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
[csv]
type = CSV
execute_on = FINAL
[]
[]
(test/tests/linearfvkernels/block-restriction/block-restricted-diffusion.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '0.1 1 0.1'
dy = '0.1 0.5 0.1'
ix = '1 2 1'
iy = '1 1 1'
subdomain_id = '1 1 1 1 2 3 1 1 1'
[]
[transform]
type = TransformGenerator
input = cmg
transform = TRANSLATE
vector_value = '-0.1 -0.1 0.0'
[]
[create_sides]
type = SideSetsBetweenSubdomainsGenerator
input = transform
new_boundary = sides
primary_block = 2
paired_block = 1
[]
[create_outlet]
type = SideSetsBetweenSubdomainsGenerator
input = create_sides
new_boundary = outlet
primary_block = 2
paired_block = 3
[]
[]
[Problem]
linear_sys_names = 'u_sys'
[]
[Variables]
[u]
type = MooseLinearVariableFVReal
solver_sys = 'u_sys'
initial_condition = 1.0
block = 2
[]
[]
[LinearFVKernels]
[diffusion]
type = LinearFVDiffusion
variable = u
diffusion_coeff = diff_coeff_func
use_nonorthogonal_correction = false
[]
[source]
type = LinearFVSource
variable = u
source_density = source_func
[]
[]
[LinearFVBCs]
[dir]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = u
boundary = "sides outlet"
functor = analytic_solution
[]
[]
[Functions]
[diff_coeff_func]
type = ParsedFunction
expression = '1.0+0.5*x*y'
[]
[source_func]
type = ParsedFunction
expression = '-1.0*x*pi*sin(x*pi)*cos(2*y*pi) - 0.5*y*pi*sin(2*y*pi)*cos(x*pi) + 5*pi^2*(0.5*x*y + 1.0)*sin(x*pi)*sin(2*y*pi)'
[]
[analytic_solution]
type = ParsedFunction
expression = 'sin(x*pi)*sin(2*y*pi) + 1.5'
[]
[]
[Postprocessors]
[h]
type = AverageElementSize
execute_on = FINAL
block = 2
[]
[error]
type = ElementL2FunctorError
approximate = u
exact = analytic_solution
execute_on = FINAL
block = 2
[]
[]
[Convergence]
[linear]
type = IterationCountConvergence
max_iterations = 1
converge_at_max_iterations = true
[]
[]
[Executioner]
type = Steady
system_names = u_sys
l_tol = 1e-10
multi_system_fixed_point=true
multi_system_fixed_point_convergence=linear
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
[csv]
type = CSV
execute_on = FINAL
[]
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/2d/2d-boussinesq-transient.i)
mu = 2.6
rho = 1.0
advected_interp_method = 'average'
cp = 300
k = 10
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
[]
[]
[LinearFVKernels]
[u_time]
type = LinearFVTimeDerivative
variable = vel_x
factor = ${rho}
[]
[v_time]
type = LinearFVTimeDerivative
variable = vel_y
factor = ${rho}
[]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method = ${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 = ${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 = LinearFVAnisotropicDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[h_time]
type = LinearFVTimeDerivative
variable = T
factor = ${fparse rho*cp}
[]
[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 = 300.0
boundary = 'left top'
[]
[bottom_T]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T
functor = wall-temperature
boundary = bottom
[]
[outlet_T]
type = LinearFVAdvectionDiffusionOutflowBC
variable = T
use_two_term_expansion = false
boundary = right
[]
[]
[Functions]
[wall-temperature]
type = ParsedFunction
expression = '350 + 50 * sin(6.28*t)'
[]
[]
[Executioner]
type = PIMPLE
momentum_l_abs_tol = 1e-12
pressure_l_abs_tol = 1e-12
energy_l_abs_tol = 1e-12
momentum_l_tol = 1e-12
pressure_l_tol = 1e-12
energy_l_tol = 1e-12
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
energy_system = 'energy_system'
momentum_equation_relaxation = 0.8
pressure_variable_relaxation = 0.3
energy_equation_relaxation = 0.9
num_iterations = 100
pressure_absolute_tolerance = 1e-11
momentum_absolute_tolerance = 1e-11
energy_absolute_tolerance = 1e-11
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
dt = 0.01
num_steps = 6
num_piso_iterations = 0
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/cht/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
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method = ${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 = ${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 = LinearFVAnisotropicDiffusion
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
[]
(test/tests/multiapps/linearfv_nonlinearfv/linearfv.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
nx = 6
[]
[]
[Problem]
linear_sys_names = 'u_sys'
[]
[Variables]
[u]
type = MooseLinearVariableFVReal
solver_sys = 'u_sys'
initial_condition = 1.0
[]
[]
[AuxVariables]
[diff_var]
type = MooseVariableFVReal
initial_condition = 2.0
[]
[]
[LinearFVKernels]
[diffusion]
type = LinearFVDiffusion
variable = u
diffusion_coeff = diff_var
[]
[source]
type = LinearFVSource
variable = u
source_density = 1
[]
[]
[LinearFVBCs]
[dir]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = u
boundary = "left right"
functor = 1
[]
[]
[MultiApps]
inactive = 'nonlinear'
[nonlinear]
type = FullSolveMultiApp
input_files = nonlinearfv.i
execute_on = timestep_begin
no_restore = true
[]
[]
[Transfers]
inactive = 'from_nonlinear to_nonlinear'
[from_nonlinear]
type = MultiAppCopyTransfer
from_multi_app = nonlinear
source_variable = 'v'
variable = 'diff_var'
execute_on = timestep_begin
[]
[to_nonlinear]
type = MultiAppCopyTransfer
to_multi_app = nonlinear
source_variable = 'u'
variable = 'diff_var'
execute_on = timestep_begin
[]
[]
[Executioner]
type = Steady
system_names = u_sys
l_tol = 1e-10
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu mumps'
fixed_point_rel_tol = 1e-10
[]
[Outputs]
exodus = true
execute_on = timestep_end
[]
(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.
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
mu = 'mu'
momentum_component = 'x'
use_nonorthogonal_correction = false
advected_interp_method = ${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 = ${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 = LinearFVAnisotropicDiffusion
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'
[]
(test/tests/time_integrators/implicit-euler/ie-linearfv.i)
###########################################################
# This is a simple test with a time-dependent problem
# demonstrating the use of the TimeIntegrator system.
#
# Testing a solution that is second order in space
# and first order in time
#
# @Requirement F1.30
###########################################################
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
[]
[Problem]
linear_sys_names = 'u_sys'
[]
[Variables]
[u]
type = MooseLinearVariableFVReal
solver_sys = 'u_sys'
initial_condition = 0.0
[]
[]
[Functions]
[forcing_fn]
type = ParsedFunction
expression = ((x*x)+(y*y))-(4*t)
[]
[exact_fn]
type = ParsedFunction
expression = t*((x*x)+(y*y))
[]
[]
[LinearFVKernels]
[ie]
type = LinearFVTimeDerivative
variable = u
[]
[diff]
type = LinearFVDiffusion
variable = u
[]
[source]
type = LinearFVSource
variable = u
source_density = forcing_fn
[]
[]
[LinearFVBCs]
[all]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = u
boundary = '0 1 2 3'
functor = exact_fn
[]
[]
[Postprocessors]
[l2_err]
type = ElementL2Error
variable = u
function = exact_fn
[]
[]
[Executioner]
type = Transient
system_names = u_sys
l_tol = 1e-10
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
# Test of the TimeIntegrator System
scheme = 'implicit-euler'
start_time = 0.0
num_steps = 5
dt = 0.25
[]
[Outputs]
exodus = true
[]
(test/tests/variables/linearfv/diffusion-1d-pp.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
nx = 50
[]
[]
[Problem]
linear_sys_names = 'u_sys'
[]
[Variables]
[u]
type = MooseLinearVariableFVReal
solver_sys = 'u_sys'
initial_condition = 1.0
[]
[]
[LinearFVKernels]
[diffusion]
type = LinearFVDiffusion
variable = u
diffusion_coeff = coeff_func
[]
[source]
type = LinearFVSource
variable = u
source_density = source_func
[]
[]
[LinearFVBCs]
[dir]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = u
boundary = "left right"
functor = analytic_solution
[]
[]
[Functions]
[coeff_func]
type = ParsedFunction
expression = '0.5*x'
[]
[source_func]
type = ParsedFunction
expression = '2*x'
[]
[analytic_solution]
type = ParsedFunction
expression = '1-x*x'
[]
[]
[Postprocessors]
[average]
type = ElementAverageValue
variable = u
execute_on = TIMESTEP_END
outputs = csv
[]
[min]
type = ElementExtremeValue
variable = u
value_type = min
execute_on = TIMESTEP_END
outputs = csv
[]
[max]
type = ElementExtremeValue
variable = u
value_type = max
execute_on = TIMESTEP_END
outputs = csv
[]
[num_dofs]
type = NumDOFs
execute_on = TIMESTEP_END
outputs = csv
[]
[elem_value]
type = ElementalVariableValue
variable = u
elementid = 10
execute_on = TIMESTEP_END
outputs = csv
[]
[point_value]
type = PointValue
variable = u
point = '0.33333 0 0'
execute_on = TIMESTEP_END
outputs = csv
[]
[]
[VectorPostprocessors]
[line-sample]
type = LineValueSampler
variable = u
start_point = '0.13333 0 0'
end_point = '0.766666 0 0'
num_points = 9
sort_by = x
execute_on = TIMESTEP_END
outputs = vpp_csv
[]
[]
[Executioner]
type = Steady
system_names = u_sys
l_tol = 1e-10
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
[csv]
type = CSV
execute_on = TIMESTEP_END
[]
[vpp_csv]
type = CSV
execute_on = TIMESTEP_END
[]
[]
(test/tests/postprocessors/side_diffusive_flux_integral/side_diffusive_flux_integral_linear_fv.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Problem]
linear_sys_names = 'u_sys'
[]
[Variables]
[u]
solver_sys = 'u_sys'
type = MooseLinearVariableFVReal
[]
[]
[LinearFVKernels]
[diff]
type = LinearFVDiffusion
variable = u
diffusion_coeff = diffusivity
[]
[]
[LinearFVBCs]
[left]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = u
boundary = left
functor = 0
[]
[right]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = u
boundary = right
functor = 1
[]
[]
[FunctorMaterials]
[mat_props]
type = GenericFunctorMaterial
prop_names = diffusivity
prop_values = 1
[]
[]
[AuxVariables]
[grad]
family = MONOMIAL_VEC
order = CONSTANT
[]
[]
[AuxKernels]
[grad]
variable = grad
functor = u
type = FunctorElementalGradientAux
[]
[]
[Postprocessors]
[avg_left]
type = SideAverageValue
variable = u
boundary = left
[]
[avg_right]
type = SideAverageValue
variable = u
boundary = right
[]
[avg_flux_left]
type = SideDiffusiveFluxAverage
variable = u
boundary = left
functor_diffusivity = diffusivity
[]
[avg_flux_right]
type = SideDiffusiveFluxAverage
variable = u
boundary = right
functor_diffusivity = diffusivity
[]
[]
[Executioner]
type = Steady
system_names = u_sys
l_tol = 1e-10
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/linearfvkernels/diffusion/diffusion-1d.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
nx = 2
[]
[]
[Problem]
linear_sys_names = 'u_sys'
[]
[Variables]
[u]
type = MooseLinearVariableFVReal
solver_sys = 'u_sys'
initial_condition = 1.0
[]
[]
[LinearFVKernels]
[diffusion]
type = LinearFVDiffusion
variable = u
diffusion_coeff = coeff_func
[]
[source]
type = LinearFVSource
variable = u
source_density = source_func
[]
[]
[LinearFVBCs]
[dir]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = u
boundary = "left right"
functor = analytic_solution
[]
[]
[Functions]
[coeff_func]
type = ParsedFunction
expression = '0.5*x'
[]
[source_func]
type = ParsedFunction
expression = '2*x'
[]
[analytic_solution]
type = ParsedFunction
expression = '1-x*x'
[]
[]
[Postprocessors]
[h]
type = AverageElementSize
execute_on = FINAL
[]
[error]
type = ElementL2FunctorError
approximate = u
exact = analytic_solution
execute_on = FINAL
[]
[]
[Executioner]
type = Steady
system_names = u_sys
l_tol = 1e-10
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
[csv]
type = CSV
execute_on = FINAL
[]
[]
(test/tests/linearfvkernels/diffusion-reaction-advection/advection-diffusion-reaction-2d.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 1
ymax = 0.5
[]
[]
[Problem]
linear_sys_names = 'u_sys'
[]
[Variables]
[u]
type = MooseLinearVariableFVReal
solver_sys = 'u_sys'
initial_condition = 1.0
[]
[]
[LinearFVKernels]
[diffusion]
type = LinearFVDiffusion
variable = u
diffusion_coeff = diff_coeff_func
use_nonorthogonal_correction = false
[]
[advection]
type = LinearFVAdvection
variable = u
velocity = "0.5 0 0"
advected_interp_method = average
[]
[reaction]
type = LinearFVReaction
variable = u
coeff = coeff_func
[]
[source]
type = LinearFVSource
variable = u
source_density = source_func
[]
[]
[LinearFVBCs]
inactive = "outflow neumann"
[dir]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = u
boundary = "left right top bottom"
functor = analytic_solution
[]
[outflow]
type = LinearFVAdvectionDiffusionOutflowBC
variable = u
boundary = "right"
use_two_term_expansion = true
[]
[neumann]
type = LinearFVAdvectionDiffusionFunctorNeumannBC
variable = u
boundary = "top"
functor = analytic_solution_neumann_top
diffusion_coeff = diff_coeff_func
[]
[]
[Functions]
[diff_coeff_func]
type = ParsedFunction
expression = '1.0+0.5*x*y'
[]
[coeff_func]
type = ParsedFunction
expression = '1.0+1.0/(1+x*y)'
[]
[source_func]
type = ParsedFunction
expression = '-1.0*x*pi*sin((1/2)*x*pi)*cos(2*y*pi) - 0.25*y*pi*sin(2*y*pi)*cos((1/2)*x*pi) + (1.0 + 1.0/(x*y + 1))*(sin((1/2)*x*pi)*sin(2*y*pi) + 1.5) + (17/4)*pi^2*(0.5*x*y + 1.0)*sin((1/2)*x*pi)*sin(2*y*pi) + 0.25*pi*sin(2*y*pi)*cos((1/2)*x*pi)'
[]
[analytic_solution]
type = ParsedFunction
expression = 'sin((1/2)*x*pi)*sin(2*y*pi) + 1.5'
[]
[analytic_solution_neumann_top]
type = ParsedFunction
expression = '(1.0+0.5*x*y)*sin((1/2)*x*pi)*cos(2*y*pi)*2*pi'
[]
[]
[Postprocessors]
[h]
type = AverageElementSize
execute_on = FINAL
[]
[error]
type = ElementL2FunctorError
approximate = u
exact = analytic_solution
execute_on = FINAL
[]
[]
[Convergence]
[linear]
type = IterationCountConvergence
max_iterations = 1
converge_at_max_iterations = true
[]
[]
[Executioner]
type = Steady
system_names = u_sys
l_tol = 1e-10
multi_system_fixed_point=true
multi_system_fixed_point_convergence=linear
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
[csv]
type = CSV
execute_on = FINAL
[]
[]
(test/tests/transfers/multiapp_copy_transfer/linear_sys_to_aux/linear_sub.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
nx = 10
[]
[]
[Problem]
linear_sys_names = 'u_sys'
[]
[Variables]
[u]
type = MooseLinearVariableFVReal
solver_sys = 'u_sys'
initial_condition = 1.0
[]
[]
[LinearFVKernels]
[diffusion]
type = LinearFVDiffusion
variable = u
diffusion_coeff = coeff_func
[]
[source]
type = LinearFVSource
variable = u
source_density = source_func
[]
[]
[LinearFVBCs]
[dir]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = u
boundary = "left right"
functor = analytic_solution
[]
[]
[Functions]
[coeff_func]
type = ParsedFunction
expression = '0.5*x'
[]
[source_func]
type = ParsedFunction
expression = '2*x'
[]
[analytic_solution]
type = ParsedFunction
expression = '1-x*x'
[]
[]
[Executioner]
type = Steady
system_names = u_sys
l_tol = 1e-10
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
execute_on = TIMESTEP_END
[]
(test/tests/linearfvkernels/block-restriction/block-restricted-diffusion-react.i)
source=1
diff_coeff=2
reac_coeff=3
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 1
dx = '0.5 0.5'
ix = '20 20'
subdomain_id = '1 2'
[]
[]
[Problem]
linear_sys_names = 'u_sys'
[]
[Variables]
[u]
type = MooseLinearVariableFVReal
solver_sys = 'u_sys'
initial_condition = 1.0
[]
[]
[LinearFVKernels]
[diffusion]
type = LinearFVDiffusion
variable = u
diffusion_coeff = ${diff_coeff}
use_nonorthogonal_correction = false
block = 1
[]
[reaction]
type = LinearFVReaction
variable = u
coeff = ${reac_coeff}
block = 2
[]
[source]
type = LinearFVSource
variable = u
source_density = ${source}
[]
[]
[LinearFVBCs]
[dir]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = u
boundary = "left"
functor = 0
[]
[]
[Functions]
[analytic_solution]
type = ParsedFunction
expression = 'if(x<0.5, -x*x*S/2/D+(S/C+0.5*0.5/2/D*S)/0.5*x, S/C)'
symbol_names = 'S D C'
symbol_values = '${source} ${diff_coeff} ${reac_coeff}'
[]
[]
[Postprocessors]
[h]
type = AverageElementSize
execute_on = TIMESTEP_END
block = 2
[]
[error]
type = ElementL2FunctorError
approximate = u
exact = analytic_solution
execute_on = TIMESTEP_END
block = 2
[]
[]
[Convergence]
[linear]
type = IterationCountConvergence
max_iterations = 1
converge_at_max_iterations = true
[]
[]
[Executioner]
type = Steady
system_names = u_sys
multi_system_fixed_point=true
multi_system_fixed_point_convergence=linear
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_rtol'
petsc_options_value = 'hypre boomeramg 1e-10'
[]
[Outputs]
[csv]
type = CSV
execute_on = TIMESTEP_END
[]
[]
(test/tests/linearfvkernels/diffusion/diffusion-2d_neumann.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 1
ymax = 0.5
[]
[]
[Problem]
linear_sys_names = 'u_sys'
[]
[Variables]
[u]
type = MooseLinearVariableFVReal
solver_sys = 'u_sys'
initial_condition = 1.0
[]
[]
[LinearFVKernels]
[diffusion]
type = LinearFVDiffusion
variable = u
diffusion_coeff = coeff_func
use_nonorthogonal_correction = false
[]
[source]
type = LinearFVSource
variable = u
source_density = source_func
[]
[]
[LinearFVBCs]
[dir]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = u
boundary = "left right"
functor = analytic_solution
[]
[neu_bottom]
type = LinearFVAdvectionDiffusionFunctorNeumannBC
variable = u
boundary = "bottom"
functor = analytic_solution_neumann_bottom
diffusion_coeff = coeff_func
[]
[neu_top]
type = LinearFVAdvectionDiffusionFunctorNeumannBC
variable = u
boundary = "top"
functor = analytic_solution_neumann_top
diffusion_coeff = coeff_func
[]
[]
[Functions]
[coeff_func]
type = ParsedFunction
expression = '1+0.5*x*y'
[]
[source_func]
type = ParsedFunction
expression = '2*(1.5-y*y)+2*x*y*(1.5-y*y)+2*(1.5-x*x)+2*x*y*(1.5-x*x)'
[]
[analytic_solution]
type = ParsedFunction
expression = '(1.5-x*x)*(1.5-y*y)'
[]
[analytic_solution_neumann_bottom]
type = ParsedFunction
expression = '-(1+0.5*x*y)*(1.5-x*x)*(-2*y)'
[]
[analytic_solution_neumann_top]
type = ParsedFunction
expression = '(1+0.5*x*y)*(1.5-x*x)*(-2*y)'
[]
[]
[Postprocessors]
[h]
type = AverageElementSize
execute_on = FINAL
[]
[error]
type = ElementL2FunctorError
approximate = u
exact = analytic_solution
execute_on = FINAL
[]
[]
[Convergence]
[linear]
type = IterationCountConvergence
max_iterations = 1
converge_at_max_iterations = true
[]
[]
[Executioner]
type = Steady
system_names = u_sys
l_tol = 1e-10
multi_system_fixed_point=true
multi_system_fixed_point_convergence=linear
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
[csv]
type = CSV
execute_on = FINAL
[]
[]
(test/tests/time_steppers/iteration_adaptive/adapt_linear_systems.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 50
ny = 2
xmax = 5
[]
[Problem]
linear_sys_names = 'u_sys'
[]
[Variables]
[u]
type = MooseLinearVariableFVReal
solver_sys = 'u_sys'
initial_condition = 1.0
[]
[]
[LinearFVKernels]
[time]
type = LinearFVTimeDerivative
variable = 'u'
[]
[diffusion]
type = LinearFVDiffusion
variable = u
diffusion_coeff = 5
[]
[source]
type = LinearFVSource
variable = u
source_density = 2
[]
[]
[LinearFVBCs]
[dir]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = u
boundary = "left right"
functor = 12
[]
[]
[Executioner]
type = Transient
system_names = u_sys
start_time = 0.0
end_time = 19
n_startup_steps = 2
dtmax = 6.0
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 8
dt = 1.0
[]
verbose = true
linear_convergence = much_logic
[]
[Convergence]
[force_grow]
type = IterationCountConvergence
min_iterations = 0
max_iterations = 4
converge_at_max_iterations = true
[]
[force_shrink]
type = IterationCountConvergence
min_iterations = 12
max_iterations = 13
converge_at_max_iterations = true
[]
[much_logic]
type = ParsedConvergence
convergence_expression = 'if(time < 5, force_grow, force_shrink)'
symbol_names = 'time force_grow force_shrink'
symbol_values = 'time force_grow force_shrink'
[]
[]
[Postprocessors]
[_dt]
type = TimestepSize
[]
[time]
type = TimePostprocessor
[]
[]
[Outputs]
csv = true
[]
(test/tests/linearfvkernels/diffusion/diffusion-2d.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 1
ymax = 0.5
[]
[]
[Problem]
linear_sys_names = 'u_sys'
[]
[Variables]
[u]
type = MooseLinearVariableFVReal
solver_sys = 'u_sys'
initial_condition = 1.0
[]
[]
[LinearFVKernels]
[diffusion]
type = LinearFVDiffusion
variable = u
diffusion_coeff = coeff_func
use_nonorthogonal_correction = false
[]
[source]
type = LinearFVSource
variable = u
source_density = source_func
[]
[]
[LinearFVBCs]
[dir]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = u
boundary = "left right top bottom"
functor = analytic_solution
[]
[]
[Functions]
[coeff_func]
type = ParsedFunction
expression = '1+0.5*x*y'
[]
[source_func]
type = ParsedFunction
expression = '2*(1.5-y*y)+2*x*y*(1.5-y*y)+2*(1.5-x*x)+2*x*y*(1.5-x*x)'
[]
[analytic_solution]
type = ParsedFunction
expression = '(1.5-x*x)*(1.5-y*y)'
[]
[]
[Postprocessors]
[h]
type = AverageElementSize
execute_on = FINAL
[]
[error]
type = ElementL2FunctorError
approximate = u
exact = analytic_solution
execute_on = FINAL
[]
[]
[Convergence]
[linear]
type = IterationCountConvergence
max_iterations = 1
converge_at_max_iterations = true
[]
[]
[Executioner]
type = Steady
system_names = u_sys
l_tol = 1e-10
multi_system_fixed_point=true
multi_system_fixed_point_convergence=linear
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
[csv]
type = CSV
execute_on = FINAL
[]
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/steady-transient-compare/common-blocks.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
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method = ${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 = ${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 = LinearFVAnisotropicDiffusion
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
[]
[]
[Outputs]
exodus = true
execute_on = FINAL
[]
(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-4
walls = 'right left top bottom'
[GlobalParams]
rhie_chow_user_object = 'ins_rhie_chow_interpolator'
advected_interp_method = 'upwind'
u = superficial_vel_x
v = superficial_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 = 30
ny = 30
[]
[]
################################################################################
# EQUATIONS: VARIABLES, KERNELS & BCS
################################################################################
[UserObjects]
[ins_rhie_chow_interpolator]
type = RhieChowMassFlux
u = superficial_vel_x
v = superficial_vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
[]
[]
[Variables]
[superficial_vel_x]
type = MooseLinearVariableFVReal
solver_sys = u_system
[]
[superficial_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
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = superficial_vel_x
mu = ${mu}
momentum_component = 'x'
use_nonorthogonal_correction = true
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = superficial_vel_x
pressure = pressure
momentum_component = 'x'
[]
[u_buoyancy]
type = LinearFVMomentumBoussinesq
variable = superficial_vel_x
T_fluid = T_fluid
gravity = '0 -9.81 0'
rho = ${rho}
ref_temperature = ${T_0}
alpha_name = ${alpha}
momentum_component = 'x'
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = superficial_vel_y
mu = ${mu}
momentum_component = 'y'
use_nonorthogonal_correction = true
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = superficial_vel_y
pressure = pressure
momentum_component = 'y'
[]
[v_buoyancy]
type = LinearFVMomentumBoussinesq
variable = superficial_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 = LinearFVAnisotropicDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = true
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
####### 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 = superficial_vel_x
boundary = ${walls}
functor = 0
[]
[no-slip-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = superficial_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-extrapolation]
type = LinearFVExtrapolatedPressureBC
boundary = ${walls}
variable = pressure
use_two_term_expansion = false
[]
[]
[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.3
pressure_variable_relaxation = 0.7
energy_equation_relaxation = 0.95
num_iterations = 3000
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'
[]
################################################################################
# SIMULATION OUTPUTS
################################################################################
[Outputs]
exodus = true
[]
(test/tests/linearfvkernels/block-restriction/block-restricted-adr.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '0.1 1 0.1'
dy = '0.1 0.5 0.1'
ix = '1 2 1'
iy = '1 1 1'
subdomain_id = '1 1 1 1 2 3 1 1 1'
[]
[transform]
type = TransformGenerator
input = cmg
transform = TRANSLATE
vector_value = '-0.1 -0.1 0.0'
[]
[create_sides]
type = SideSetsBetweenSubdomainsGenerator
input = transform
new_boundary = sides
primary_block = 2
paired_block = 1
[]
[create_outlet]
type = SideSetsBetweenSubdomainsGenerator
input = create_sides
new_boundary = outlet
primary_block = 2
paired_block = 3
[]
[]
[Problem]
linear_sys_names = 'u_sys'
[]
[Variables]
[u]
type = MooseLinearVariableFVReal
solver_sys = 'u_sys'
initial_condition = 1.0
block = 2
[]
[]
[LinearFVKernels]
[diffusion]
type = LinearFVDiffusion
variable = u
diffusion_coeff = diff_coeff_func
use_nonorthogonal_correction = false
[]
[advection]
type = LinearFVAdvection
variable = u
velocity = "0.5 0 0"
advected_interp_method = average
[]
[reaction]
type = LinearFVReaction
variable = u
coeff = coeff_func
[]
[source]
type = LinearFVSource
variable = u
source_density = source_func
[]
[]
[LinearFVBCs]
inactive = "outflow"
[dir]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = u
boundary = "sides outlet"
functor = analytic_solution
[]
[outflow]
type = LinearFVAdvectionDiffusionOutflowBC
variable = u
boundary = "right"
use_two_term_expansion = true
[]
[]
[Functions]
[diff_coeff_func]
type = ParsedFunction
expression = '1.0+0.5*x*y'
[]
[coeff_func]
type = ParsedFunction
expression = '1.0+1.0/(1+x*y)'
[]
[source_func]
type = ParsedFunction
expression = '-1.0*x*pi*sin((1/2)*x*pi)*cos(2*y*pi) - 0.25*y*pi*sin(2*y*pi)*cos((1/2)*x*pi) + (1.0 + 1.0/(x*y + 1))*(sin((1/2)*x*pi)*sin(2*y*pi) + 1.5) + (17/4)*pi^2*(0.5*x*y + 1.0)*sin((1/2)*x*pi)*sin(2*y*pi) + 0.25*pi*sin(2*y*pi)*cos((1/2)*x*pi)'
[]
[analytic_solution]
type = ParsedFunction
expression = 'sin((1/2)*x*pi)*sin(2*y*pi) + 1.5'
[]
[]
[Postprocessors]
[h]
type = AverageElementSize
execute_on = FINAL
block = 2
[]
[error]
type = ElementL2FunctorError
approximate = u
exact = analytic_solution
execute_on = FINAL
block = 2
[]
[]
[Convergence]
[linear]
type = IterationCountConvergence
max_iterations = 1
converge_at_max_iterations = true
[]
[]
[Executioner]
type = Steady
system_names = u_sys
l_tol = 1e-10
multi_system_fixed_point=true
multi_system_fixed_point_convergence=linear
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
[csv]
type = CSV
execute_on = FINAL
[]
[]
(modules/navier_stokes/test/tests/finite_volume/ins/cht/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
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method = ${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 = ${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 = LinearFVAnisotropicDiffusion
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/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
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method = ${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 = ${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 = LinearFVAnisotropicDiffusion
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/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
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method = ${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 = ${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 = LinearFVAnisotropicDiffusion
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/channel-flow/linear-segregated/2d-scalar/channel.i)
mu = 2.6
rho = 1.0
advected_interp_method = 'upwind'
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
[]
[]
[LinearFVKernels]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method = ${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 = ${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 = LinearFVAnisotropicDiffusion
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 = ${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 = ${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'
[]
(test/tests/linearfvkernels/diffusion/diffusion-2d-rz.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 1
ymax = 0.5
[]
coord_type = RZ
rz_coord_axis = Y
[]
[Problem]
linear_sys_names = 'u_sys'
[]
[Variables]
[u]
type = MooseLinearVariableFVReal
solver_sys = 'u_sys'
initial_condition = 1.0
[]
[]
[LinearFVKernels]
[diffusion]
type = LinearFVDiffusion
variable = u
diffusion_coeff = coeff_func
use_nonorthogonal_correction = true
[]
[source]
type = LinearFVSource
variable = u
source_density = source_func
[]
[]
[LinearFVBCs]
[dir]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = u
boundary = "left right top bottom"
functor = analytic_solution
[]
[]
[Functions]
[coeff_func]
type = ParsedFunction
expression = '1+0.5*x*y'
[]
[source_func]
type = ParsedFunction
expression = '-(-1.0*x^2*y*(1.5 - x^2) + x*(1.5 - x^2)*(-1.0*x*y - 2))/x - (-1.0*x^2*y*(1.5 - y^2) - 4*x*(1.5 - y^2)*(0.5*x*y + 1))/x'
[]
[analytic_solution]
type = ParsedFunction
expression = '(1.5-x*x)*(1.5-y*y)'
[]
[]
[Postprocessors]
[h]
type = AverageElementSize
execute_on = FINAL
[]
[error]
type = ElementL2FunctorError
approximate = u
exact = analytic_solution
execute_on = FINAL
[]
[]
[Convergence]
[linear]
type = IterationCountConvergence
max_iterations = 1
converge_at_max_iterations = true
[]
[]
[Executioner]
type = Steady
system_names = u_sys
l_tol = 1e-10
multi_system_fixed_point=true
multi_system_fixed_point_convergence=linear
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
[csv]
type = CSV
execute_on = FINAL
[]
[exo]
type = Exodus
execute_on = FINAL
[]
[]
(test/tests/outputs/debug/show_execution_linear_fv_flux.i)
[Mesh]
[gen_mesh]
type = GeneratedMeshGenerator
dim = 1
xmin = 0
xmax = 10
nx = 50
[]
[left]
type = ParsedSubdomainMeshGenerator
input = 'gen_mesh'
combinatorial_geometry = 'x < 0.5'
block_id = '1'
[]
[]
[Problem]
linear_sys_names = 'u_sys'
[]
[Variables]
[u]
type = MooseLinearVariableFVReal
solver_sys = 'u_sys'
[]
[]
[LinearFVKernels]
[diffusion_1]
type = LinearFVDiffusion
variable = u
diffusion_coeff = 1.5
block = 0
[]
[diffusion_2]
type = LinearFVDiffusion
variable = u
diffusion_coeff = 2.5
block = 1
[]
[source_1]
type = LinearFVSource
variable = u
source_density = 3.5
block = 0
[]
[source_2]
type = LinearFVSource
variable = u
source_density = 4.5
block = 1
[]
[]
[LinearFVBCs]
[left_bc]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = u
boundary = 'left right'
functor = 0
[]
[]
[Executioner]
type = Steady
system_names = u_sys
l_tol = 1e-10
[]
[Debug]
show_execution_order = 'NONLINEAR'
[]
(test/tests/multisystem/picard/linearfv_nonlinearfv/same_input.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
nx = 6
[]
[]
[Problem]
nl_sys_names = 'v_sys'
linear_sys_names = 'u_sys'
[]
[Variables]
[v]
type = MooseVariableFVReal
initial_condition = 2.0
solver_sys = v_sys
[]
[u]
type = MooseLinearVariableFVReal
solver_sys = 'u_sys'
initial_condition = 1.0
[]
[]
[FVKernels]
[diffusion]
type = FVDiffusion
variable = v
coeff = u
[]
[source]
type = FVBodyForce
variable = v
function = 3
[]
[]
[LinearFVKernels]
[diffusion]
type = LinearFVDiffusion
variable = u
diffusion_coeff = v
[]
[source]
type = LinearFVSource
variable = u
source_density = 1
[]
[]
[FVBCs]
[dir]
type = FVFunctorDirichletBC
variable = v
boundary = "left right"
functor = 2
[]
[]
[LinearFVBCs]
[dir]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = u
boundary = "left right"
functor = 1
[]
[]
[Convergence]
[linear]
type = IterationCountConvergence
max_iterations = 6
converge_at_max_iterations = true
[]
[]
[Executioner]
type = Steady
system_names = 'v_sys u_sys'
l_abs_tol = 1e-12
l_tol = 1e-10
nl_abs_tol = 1e-10
multi_system_fixed_point=true
multi_system_fixed_point_convergence=linear
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
execute_on = timestep_end
[]
(test/tests/tag/tag-linearfv.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
nx = 3
[]
[]
[Problem]
linear_sys_names = 'u_sys v_sys'
extra_tag_matrices = 'mat_tag_u; mat_tag_v'
extra_tag_vectors = 'vec_tag_u; vec_tag_v'
[]
[Variables]
[u]
type = MooseLinearVariableFVReal
initial_condition = 1.0
solver_sys = u_sys
[]
[v]
type = MooseLinearVariableFVReal
initial_condition = 0.5
solver_sys = v_sys
[]
[]
[LinearFVKernels]
[diffusion]
type = LinearFVDiffusion
variable = u
diffusion_coeff = 2.0
[]
[reaction]
type = LinearFVReaction
variable = u
coeff = 3.0
matrix_tags = 'system mat_tag_u'
[]
[source]
type = LinearFVSource
variable = u
source_density = 60.0
vector_tags = 'rhs vec_tag_u'
[]
[diffusion_v]
type = LinearFVDiffusion
variable = v
diffusion_coeff = 1.0
[]
[reaction_v]
type = LinearFVReaction
variable = v
coeff = 1.5
matrix_tags = 'system mat_tag_v'
[]
[source_v]
type = LinearFVSource
variable = v
source_density = 20.0
vector_tags = 'rhs vec_tag_v'
[]
[]
[LinearFVBCs]
[left_u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = u
boundary = left
functor = 1.0
[]
[right_u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = u
boundary = right
functor = 3.0
[]
[left_v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = v
boundary = left
functor = 1.0
[]
[right_v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = v
boundary = right
functor = 3.0
[]
[]
[AuxVariables]
[soln_u_dof]
type = MooseLinearVariableFVReal
[]
[soln_u]
type = MooseLinearVariableFVReal
[]
[rhs_u_dof]
type = MooseLinearVariableFVReal
[]
[rhs_u]
type = MooseLinearVariableFVReal
[]
[vector_tag_u]
type = MooseLinearVariableFVReal
[]
[matrix_u_diag]
type = MooseLinearVariableFVReal
[]
[soln_v_dof]
type = MooseLinearVariableFVReal
[]
[soln_v]
type = MooseLinearVariableFVReal
[]
[rhs_v_dof]
type = MooseLinearVariableFVReal
[]
[rhs_v]
type = MooseLinearVariableFVReal
[]
[vector_tag_v]
type = MooseLinearVariableFVReal
[]
[matrix_v_diag]
type = MooseLinearVariableFVReal
[]
[]
[AuxKernels]
[soln_u_dof]
type = TagVectorDofValueAux
variable = soln_u_dof
v = u
vector_tag = 'solution'
[]
[soln_u]
type = TagVectorAux
variable = soln_u
v = u
vector_tag = 'solution'
[]
[rhs_u_dof]
type = TagVectorDofValueAux
variable = rhs_u_dof
v = u
vector_tag = 'rhs'
[]
[rhs_u]
type = TagVectorAux
variable = rhs_u
v = u
vector_tag = 'rhs'
[]
[extra_vector_u_dof]
type = TagVectorDofValueAux
variable = vector_tag_u
v = u
vector_tag = 'vec_tag_u'
[]
[extra_vector_u]
type = TagVectorAux
variable = vector_tag_u
v = u
vector_tag = 'vec_tag_u'
[]
[extra_matrix_u]
type = TagMatrixAux
variable = matrix_u_diag
v = u
matrix_tag = 'mat_tag_u'
[]
[soln_v_dof]
type = TagVectorDofValueAux
variable = soln_v_dof
v = v
vector_tag = 'solution'
[]
[soln_v]
type = TagVectorAux
variable = soln_v
v = v
vector_tag = 'solution'
[]
[rhs_v_dof]
type = TagVectorDofValueAux
variable = rhs_v_dof
v = v
vector_tag = 'rhs'
[]
[rhs_v]
type = TagVectorAux
variable = rhs_v
v = v
vector_tag = 'rhs'
[]
[extra_vector_v_dof]
type = TagVectorDofValueAux
variable = vector_tag_v
v = v
vector_tag = 'vec_tag_v'
[]
[extra_vector_v]
type = TagVectorAux
variable = vector_tag_v
v = v
vector_tag = 'vec_tag_v'
[]
[extra_matrix_v]
type = TagMatrixAux
variable = matrix_v_diag
v = v
matrix_tag = 'mat_tag_v'
[]
[]
[Executioner]
type = Steady
solve_type = 'LINEAR'
system_names = 'u_sys v_sys'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
execute_on = timestep_end
[]