- 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
LinearFVTimeDerivative
Description
This kernel represents a time derivative term in a partial differential equation discretized using the finite volume method:
where and are the time derivative of the field value at the cell center and the cell volume, respectively. Note that we added a multiplier, which often represents a material property. A good example for the multiplier can be the density in the momentum equation in the Navier Stokes equation. This can be defined through parameter "factor" that accepts anything that supports functor-based evaluations. For more information on functors in MOOSE, see Functor system. This kernel adds to the matrix diagonal and right hand side of a linear system and the contributions depend on the method chosen for time integration. For more information on available methods, see the TimeIntegrators page. For example, with an implicit Euler scheme the contribution to the right hand side becomes:
where and are the time step size and multiplier at the cell center, respectively. With these, the contribution to the right hand side becomes:
where represents the solution at the previous time step.
Example Syntax
The case below demonstrates the use of LinearFVTimeDerivative used in a simple linear time-dependent diffusion problem:
[LinearFVKernels<<<{"href": "../../syntax/LinearFVKernels/index.html"}>>>]
[ie]
type = LinearFVTimeDerivative<<<{"description": "Represents the matrix and right hand side contributions of a time derivative term in a partial differential equation.", "href": "LinearFVTimeDerivative.html"}>>>
variable<<<{"description": "The name of the variable whose linear system this object contributes to"}>>> = u
[]
[diff]
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
[]
[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."}>>> = forcing_fn
[]
[](test/tests/time_integrators/implicit-euler/ie-linearfv.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
- factor1A multiplier on the variable within the time derivative. 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:A multiplier on the variable within the time derivative. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.
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_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)
- 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
- (modules/heat_transfer/test/tests/linearfvbcs/linear_fv_functor_radiative_bc/linear_fv_functor_radiative_bc.i)
- (modules/heat_transfer/test/tests/linearfvbcs/linear_fv_functor_radiative_bc/linear_fv_functor_radiative_bc_mms_2d.i)
- (test/tests/time_integrators/implicit-euler/ie-linearfv.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/solidification/1d-stefan_linearfv.i)
- (test/tests/time_integrators/bdf2/linearfv.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/turbulence/channel/linear-segregated-transient/channel_ERCOFTAC.i)
- (modules/navier_stokes/examples/solidification/gallium_melting_linear.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/turbulence/bfs/linear-segregated-transient/BFS_ERCOFTAC.i)
- (modules/navier_stokes/examples/solidification/1d_stefan_T.i)
- (test/tests/time_steppers/iteration_adaptive/adapt_linear_systems.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/linear-segregated/2d/2d-boussinesq-transient.i)
- (modules/heat_transfer/test/tests/linearfvbcs/linear_fv_functor_radiative_bc/linear_fv_functor_radiative_bc_mms.i)
factor
Default:1
C++ Type:MooseFunctorName
Unit:(no unit assumed)
Controllable:No
Description:A multiplier on the variable within the time derivative. A functor is any of the following: a variable, a functor material property, a function, a postprocessor or a number.
(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
[]
(modules/heat_transfer/test/tests/linearfvbcs/linear_fv_functor_radiative_bc/linear_fv_functor_radiative_bc.i)
# 1D steady-state heat conduction with a radiative BC on the right boundary.
# The domain is [0,1] with:
# Left: Dirichlet temperature T_L (fixed)
# Right: LinearFVFunctorRadiativeBC, q = sigma * eps * (T^4 - Tinf^4)
# A pseudo-transient approach (large dt steps) iteratively updates the
# lagged linearization coefficients until convergence to the nonlinear solution.
T_L = 1000.0 # Left boundary temperature [K]
T_inf = 300.0 # Far-field radiation temperature [K]
eps = 1.0 # Emissivity
k = 1.0 # Thermal conductivity [W/(m-K)]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 50
xmin = 0
xmax = 1
[]
[]
[Problem]
linear_sys_names = 'heat_system'
[]
[Variables]
[T]
type = MooseLinearVariableFVReal
solver_sys = 'heat_system'
initial_condition = ${T_L}
[]
[]
[LinearFVKernels]
[time]
type = LinearFVTimeDerivative
variable = T
[]
[diffusion]
type = LinearFVDiffusion
variable = T
diffusion_coeff = ${k}
[]
[]
[LinearFVBCs]
[left]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T
boundary = 'left'
functor = ${T_L}
[]
[right]
type = LinearFVFunctorRadiativeBC
variable = T
boundary = 'right'
emissivity = ${eps}
Tinfinity = ${T_inf}
diffusion_coeff = ${k}
[]
[]
[Postprocessors]
[T_avg]
type = ElementAverageValue
variable = T
[]
[T_max]
type = ElementExtremeValue
variable = T
value_type = max
[]
[T_min]
type = ElementExtremeValue
variable = T
value_type = min
[]
[]
[Executioner]
type = Transient
system_names = heat_system
scheme = 'implicit-euler'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
dt = 1e6
num_steps = 50
l_tol = 1e-10
[]
[Outputs]
file_base = 'linear_fv_functor_radiative_bc_hot_body_out'
[csv]
type = CSV
execute_on = final
[]
[]
(modules/heat_transfer/test/tests/linearfvbcs/linear_fv_functor_radiative_bc/linear_fv_functor_radiative_bc_mms_2d.i)
# 2D MMS convergence test for LinearFVFunctorRadiativeBC.
#
# Exact solution: T(x,y) = T_L + B_x*(exp(x) - 1) + B_y*x*sin(pi*y)
# where B_x = (T_R_mms - T_L) / (e - 1).
#
# The solution combines a 1D exponential profile with a sinusoidal 2D
# perturbation B_y*x*sin(pi*y). The sinusoidal y-dependence is
# non-polynomial, ensuring the FV scheme has genuine O(h^2) truncation
# error in the y-direction.
#
# At the radiative boundary (x=1):
# T(1,y) = T_R_mms + B_y*sin(pi*y)
# dT/dx(1,y) = B_x*e + B_y*sin(pi*y)
#
# A spatially varying T_inf(y) is computed analytically so the radiative
# BC is satisfied exactly at every boundary face:
# T_inf(y)^4 = T(1,y)^4 + k*dT/dx(1,y)/(sigma*eps)
# At y=0,1 this recovers the 1D far-field temperature T_inf ~ 300 K.
#
# Boundary conditions:
# Left (x=0): Dirichlet T = T_L (constant, since x=0)
# Right (x=1): Radiative Robin with T_inf(y) (spatially varying)
# Bottom (y=0): Dirichlet T = T_L + B_x*(exp(x) - 1) (sin(0)=0)
# Top (y=1): Dirichlet T = T_L + B_x*(exp(x) - 1) (sin(pi)=0)
#
# Source: f(x,y) = -k*(B_x*exp(x) - B_y*pi^2*x*sin(pi*y))
#
# T_R_mms must be supplied via CLI args, as the root of:
# k*(T_L - T_R)*e/(e-1) = sigma*eps*(T_R^4 - T_inf^4)
# (computed in the Python convergence script).
T_L = 1000.0
k = 1.0
eps = 1.0
sigma = 5.670374419e-8
B_y = 200.0
T_R_mms = 0 # set via CLI: T_R_mms=<value>
B_x = '${fparse (T_R_mms - T_L) / (exp(1.0) - 1.0)}'
B_x_e = '${fparse B_x * exp(1.0)}'
flux_scale = '${fparse k / (sigma * eps)}'
pi_val = '${fparse pi}'
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10 # overridden by CLI
ny = 10 # overridden by CLI
xmin = 0
xmax = 1
ymin = 0
ymax = 1
[]
[]
[Problem]
linear_sys_names = 'heat_system'
[]
[Variables]
[T]
type = MooseLinearVariableFVReal
solver_sys = 'heat_system'
initial_condition = ${T_L}
[]
[]
[Functions]
[exact_T]
type = ParsedFunction
expression = 'T_L + Bx * (exp(x) - 1.0) + By * x * sin(pv * y)'
symbol_names = 'T_L Bx By pv'
symbol_values = '${T_L} ${B_x} ${B_y} ${pi_val}'
[]
[source_fn]
type = ParsedFunction
expression = '-k * Bx * exp(x) + k * By * pv * pv * x * sin(pv * y)'
symbol_names = 'k Bx By pv'
symbol_values = '${k} ${B_x} ${B_y} ${pi_val}'
[]
[T_inf_fn]
type = ParsedFunction
expression = 'pow(pow(TR + By * sin(pv * y), 4) + fs * (Bxe + By * sin(pv * y)), 0.25)'
symbol_names = 'TR By fs Bxe pv'
symbol_values = '${T_R_mms} ${B_y} ${flux_scale} ${B_x_e} ${pi_val}'
[]
[bottom_top_T]
type = ParsedFunction
expression = 'T_L + Bx * (exp(x) - 1.0)'
symbol_names = 'T_L Bx'
symbol_values = '${T_L} ${B_x}'
[]
[]
[LinearFVKernels]
[time]
type = LinearFVTimeDerivative
variable = T
[]
[diffusion]
type = LinearFVDiffusion
variable = T
diffusion_coeff = ${k}
[]
[source]
type = LinearFVSource
variable = T
source_density = source_fn
[]
[]
[LinearFVBCs]
[left]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T
boundary = 'left'
functor = ${T_L}
[]
[right]
type = LinearFVFunctorRadiativeBC
variable = T
boundary = 'right'
emissivity = ${eps}
Tinfinity = T_inf_fn
diffusion_coeff = ${k}
[]
[bottom]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T
boundary = 'bottom'
functor = bottom_top_T
[]
[top]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = 'T'
boundary = 'top'
functor = bottom_top_T
[]
[]
[Postprocessors]
[l2_error]
type = ElementL2FunctorError
approximate = T
exact = exact_T
execute_on = TIMESTEP_END
[]
[]
[Executioner]
type = Transient
system_names = heat_system
scheme = 'implicit-euler'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
dt = 1e6
num_steps = 100
l_tol = 1e-12
[]
[Outputs]
[out]
type = CSV
execute_on = 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
[]
(modules/navier_stokes/test/tests/finite_volume/ins/solidification/1d-stefan_linearfv.i)
# Regression test for LinearFVPhaseChangeSource based on the 1D two-phase
# Stefan problem: melting driven by a hot wall at x = 0.
#
# Nondimensional properties rho = cp = k = L = 1 (Stefan number = 1). The
# sharp-interface analytical solution places the front at
#
# s(tau) = 2 * lambda * sqrt(alpha * tau),
#
# where lambda ~ 0.62 and tau = t + t0. The initial condition is the
# analytical temperature profile at tau = t0, for which the front is at
# s0 = 0.1.
#
# Compared with examples/solidification/1d_stefan_T.i, this input is
# coarsened for speed and uses a wider mushy interval so that the phase-change
# source remains resolved on the coarse mesh. This is a regression test, not
# a validation case.
rho = 1
cp = 1
k = 1
L = 1
T_solidus = 0
T_liquidus = 0.1
T_hot_bc = 1
# Time offset corresponding to an initial front position s0 = 0.1.
t0 = 0.0065023282
Lx = 0.5
nx = 100
[Problem]
linear_sys_names = 'energy_system'
# LinearFVPhaseChangeSource evaluates its temperature-dependent
# coefficient using the previous nonlinear-iteration solution.
previous_nl_solution_required = true
[]
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
nx = ${nx}
xmin = 0.0
xmax = ${Lx}
[]
[]
[Functions]
# Analytical sharp-interface temperature profile at tau = t0.
[T_exact_initial]
type = ParsedFunction
expression = 'if(x < 0.1, 1.0 - erf(x / (2.0 * sqrt(${t0}))) / 0.6194595791, 0.0)'
[]
[]
[Variables]
[T]
type = MooseLinearVariableFVReal
solver_sys = energy_system
[]
[]
[AuxVariables]
[fl]
type = MooseVariableFVReal
initial_condition = 0.0
[]
[]
[AuxKernels]
[compute_fl]
type = NSLiquidFractionAux
variable = fl
temperature = T
T_liquidus = ${T_liquidus}
T_solidus = ${T_solidus}
execute_on = TIMESTEP_END
[]
[]
[ICs]
[T_ic]
type = FunctionIC
variable = T
function = T_exact_initial
[]
[]
[LinearFVKernels]
[energy_time]
type = LinearFVTimeDerivative
variable = T
factor = ${fparse rho * cp}
[]
[energy_conduction]
type = LinearFVDiffusion
variable = T
diffusion_coeff = ${k}
use_nonorthogonal_correction = false
[]
[energy_source]
type = LinearFVPhaseChangeSource
variable = T
L = ${L}
rho = ${rho}
T_solidus = ${T_solidus}
T_liquidus = ${T_liquidus}
smoothing = smooth
[]
[]
[LinearFVBCs]
# Hot wall at x = 0.
[hot_left]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T
boundary = left
functor = ${T_hot_bc}
[]
# Far-field solid at the melting temperature.
[cold_right]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T
boundary = right
functor = 0.0
[]
[]
[Postprocessors]
# Integral of the liquid fraction. In this 1D problem, it approximates
# the position of the melting front.
[front_position]
type = ElementIntegralVariablePostprocessor
variable = fl
[]
[T_avg]
type = ElementAverageValue
variable = T
[]
[]
[Executioner]
type = Transient
dt = 1e-3
end_time = 1e-2
system_names = 'energy_system'
l_abs_tol = 1e-13
l_tol = 1e-13
l_max_its = 1000
petsc_options_iname = '-energy_system_pc_type -energy_system_pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
# Repeat the temperature solve so that the lagged apparent heat-capacity
# coefficient is updated within each time step.
multi_system_fixed_point = true
multi_system_fixed_point_convergence = phase_change_fixed_point
[]
[Convergence]
# Keep the number of coefficient-update iterations deterministic for the
# regression gold files.
[phase_change_fixed_point]
type = IterationCountConvergence
max_iterations = 25
converge_at_max_iterations = true
[]
[]
[Outputs]
exodus = true
csv = true
[]
(test/tests/time_integrators/bdf2/linearfv.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
[]
[Problem]
linear_sys_names = 'u_sys'
[]
[Variables]
[u]
type = MooseLinearVariableFVReal
solver_sys = 'u_sys'
[]
[]
[LinearFVKernels]
[timeu]
type = LinearFVTimeDerivative
variable = u
[]
[diffu]
type = LinearFVDiffusion
variable = u
[]
[forceu]
type = LinearFVSource
variable = u
source_density = force
[]
[]
[Functions]
[exact]
type = ParsedFunction
expression = 't^3*x*y'
[]
[force]
type = ParsedFunction
expression = '3*x*y*t^2'
[]
[]
[LinearFVBCs]
[allu]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
functor = exact
variable = u
boundary = 'left right top bottom'
[]
[]
[Executioner]
type = Transient
system_names = u_sys
l_tol = 1e-10
petsc_options_iname = '-pc_type'
petsc_options_value = 'hypre'
dt = 1
end_time = 3
scheme = 'bdf2'
[]
[Postprocessors]
[L2u]
type = ElementL2Error
function = exact
variable = u
[]
[]
[Outputs]
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/turbulence/channel/linear-segregated-transient/channel_ERCOFTAC.i)
H = 1 #halfwidth of the channel
L = 100
Re = 13700
rho = 1
bulk_u = 1
mu = '${fparse rho * bulk_u * 2 * H / Re}'
advected_interp_method = 'upwind'
### k-epsilon Closure Parameters ###
sigma_k =1.0
sigma_eps = 1.3
C1_eps = 1.44
C2_eps = 1.92
C_mu = 0.09
### Initial and Boundary Conditions ###
intensity = 0.01
k_init = '${fparse 1.5*(intensity * bulk_u)^2}'
eps_init = '${fparse C_mu^0.75 * k_init^1.5 / (2*H)}'
### Modeling parameters ###
bulk_wall_treatment = false
walls = 'top bottom'
wall_treatment = 'eq_newton' # Options: eq_newton, eq_incremental, eq_linearized, neq
[Mesh]
[block_1]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = ${L}
ymin = 0
ymax = ${H}
nx = 4
ny = 3
bias_y = 0.7
[]
[block_2]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = ${L}
ymin = ${fparse -H}
ymax = 0
nx = 4
ny = 3
bias_y = ${fparse 1/0.7}
[]
[smg]
type = StitchedMeshGenerator
inputs = 'block_1 block_2'
clear_stitched_boundary_ids = true
stitch_boundaries_pairs = 'bottom top'
merge_boundaries_with_same_name = true
[]
# Prevent test diffing on distributed parallel element numbering
allow_renumbering = false
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system TKE_system TKED_system'
previous_nl_solution_required = true
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = ${bulk_u}
solver_sys = u_system
[]
[vel_y]
type = MooseLinearVariableFVReal
initial_condition = 0
solver_sys = v_system
[]
[pressure]
type = MooseLinearVariableFVReal
initial_condition = 1e-8
solver_sys = pressure_system
[]
[TKE]
type = MooseLinearVariableFVReal
solver_sys = TKE_system
initial_condition = ${k_init}
[]
[TKED]
type = MooseLinearVariableFVReal
solver_sys = TKED_system
initial_condition = ${eps_init}
[]
[]
[FVInterpolationMethods]
[upwind]
type = FVAdvectedUpwind
[]
[]
[LinearFVKernels]
[u_time]
type = LinearFVTimeDerivative
variable = vel_x
factor = ${rho}
[]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = ${advected_interp_method}
mu = 'mu_t'
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
use_deviatoric_terms = yes
[]
[u_diffusion]
type = LinearFVDiffusion
variable = vel_x
diffusion_coeff = ${mu}
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[v_time]
type = LinearFVTimeDerivative
variable = vel_y
factor = ${rho}
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = ${advected_interp_method}
mu = 'mu_t'
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
use_deviatoric_terms = yes
[]
[v_diffusion]
type = LinearFVDiffusion
variable = vel_y
diffusion_coeff = ${mu}
use_nonorthogonal_correction = false
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[TKE_time]
type = LinearFVTimeDerivative
variable = TKE
factor = ${rho}
[]
[TKE_advection]
type = LinearFVTurbulentAdvection
variable = TKE
advected_interp_method_name = ${advected_interp_method}
[]
[TKE_diffusion]
type = LinearFVTurbulentDiffusion
variable = TKE
diffusion_coeff = ${mu}
use_nonorthogonal_correction = false
[]
[TKE_turb_diffusion]
type = LinearFVTurbulentDiffusion
variable = TKE
diffusion_coeff = 'mu_t'
scaling_coeff = ${sigma_k}
use_nonorthogonal_correction = false
[]
[TKE_source_sink]
type = LinearFVTKESourceSink
variable = TKE
u = vel_x
v = vel_y
epsilon = TKED
rho = ${rho}
mu = ${mu}
mu_t = 'mu_t'
walls = ${walls}
wall_treatment = ${wall_treatment}
C_pl = 1e10
[]
[TKED_time]
type = LinearFVTimeDerivative
variable = TKED
factor = ${rho}
[]
[TKED_advection]
type = LinearFVTurbulentAdvection
variable = TKED
advected_interp_method_name = ${advected_interp_method}
walls = ${walls}
[]
[TKED_diffusion]
type = LinearFVTurbulentDiffusion
variable = TKED
diffusion_coeff = ${mu}
use_nonorthogonal_correction = false
walls = ${walls}
[]
[TKED_turb_diffusion]
type = LinearFVTurbulentDiffusion
variable = TKED
diffusion_coeff = 'mu_t'
scaling_coeff = ${sigma_eps}
use_nonorthogonal_correction = false
walls = ${walls}
[]
[TKED_source_sink]
type = LinearFVTKEDSourceSink
variable = TKED
u = vel_x
v = vel_y
tke = TKE
rho = ${rho}
mu = ${mu}
mu_t = 'mu_t'
C1_eps = ${C1_eps}
C2_eps = ${C2_eps}
walls = ${walls}
wall_treatment = ${wall_treatment}
C_pl = 1e10
[]
[]
[LinearFVBCs]
[inlet-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_x
functor = '${bulk_u}'
[]
[inlet-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_y
functor = '0.0'
[]
[walls-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom'
variable = vel_x
functor = 0.0
[]
[walls-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'top bottom'
variable = vel_y
functor = 0.0
[]
[outlet_u]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'right'
variable = vel_x
use_two_term_expansion = false
[]
[outlet_v]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'right'
variable = vel_y
use_two_term_expansion = false
[]
[outlet_p]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'right'
variable = pressure
functor = 0.0
[]
[inlet_TKE]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = TKE
functor = '${k_init}'
[]
[outlet_TKE]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'right'
variable = TKE
use_two_term_expansion = false
[]
[inlet_TKED]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = TKED
functor = '${eps_init}'
[]
[outlet_TKED]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'right'
variable = TKED
use_two_term_expansion = false
[]
[walls_mu_t]
type = LinearFVTurbulentViscosityWallFunctionBC
boundary = 'bottom top'
variable = 'mu_t'
u = vel_x
v = vel_y
rho = ${rho}
mu = ${mu}
tke = TKE
wall_treatment = ${wall_treatment}
[]
[]
[AuxVariables]
[mu_t]
type = MooseLinearVariableFVReal
initial_condition = '${fparse rho * C_mu * ${k_init}^2 / eps_init}'
[]
[yplus]
type = MooseLinearVariableFVReal
[]
[mu_eff]
type = MooseLinearVariableFVReal
initial_condition = '${fparse rho * C_mu * ${k_init}^2 / eps_init}'
[]
[]
[AuxKernels]
[compute_mu_t]
type = kEpsilonViscosityAux
variable = mu_t
C_mu = ${C_mu}
tke = TKE
epsilon = TKED
mu = ${mu}
rho = ${rho}
u = vel_x
v = vel_y
bulk_wall_treatment = ${bulk_wall_treatment}
walls = ${walls}
wall_treatment = ${wall_treatment}
execute_on = 'NONLINEAR'
mu_t_ratio_max = 1e20
[]
[compute_y_plus]
type = RANSYPlusAux
variable = yplus
tke = TKE
mu = ${mu}
rho = ${rho}
u = vel_x
v = vel_y
walls = ${walls}
wall_treatment = ${wall_treatment}
execute_on = 'NONLINEAR'
[]
[compute_mu_eff]
type = ParsedAux
variable = 'mu_eff'
coupled_variables = 'mu_t'
expression = 'mu_t + ${mu}'
execute_on = 'NONLINEAR'
[]
[]
[Executioner]
type = PIMPLE
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
turbulence_systems = 'TKE_system TKED_system'
momentum_l_abs_tol = 1e-14
pressure_l_abs_tol = 1e-14
turbulence_l_abs_tol = 1e-14
momentum_l_tol = 1e-14
pressure_l_tol = 1e-14
turbulence_l_tol = 1e-14
momentum_equation_relaxation = 0.7
pressure_variable_relaxation = 0.3
turbulence_equation_relaxation = '0.25 0.25'
num_iterations = 1000
pressure_absolute_tolerance = 1e-12
momentum_absolute_tolerance = 1e-12
turbulence_absolute_tolerance = '1e-12 1e-12'
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
turbulence_petsc_options_iname = '-pc_type -pc_hypre_type'
turbulence_petsc_options_value = 'hypre boomeramg'
print_fields = false
continue_on_max_its = true
dt = 1.0
num_steps = 2
[]
[Outputs]
csv = true
[]
[VectorPostprocessors]
[side_bottom]
type = SideValueSampler
boundary = 'bottom'
variable = 'vel_x vel_y pressure TKE TKED'
sort_by = 'x'
execute_on = 'timestep_end'
[]
[side_top]
type = SideValueSampler
boundary = 'top'
variable = 'vel_x vel_y pressure TKE TKED'
sort_by = 'x'
execute_on = 'timestep_end'
[]
[line_center_channel]
type = LineValueSampler
start_point = '${fparse 0.125 * L} ${fparse 0.0001} 0'
end_point = '${fparse 0.875 * L} ${fparse 0.0001} 0'
num_points = ${Mesh/block_1/nx}
variable = 'vel_x vel_y pressure TKE TKED'
sort_by = 'x'
execute_on = 'timestep_end'
[]
[line_quarter_radius_channel]
type = LineValueSampler
start_point = '${fparse 0.125 * L} ${fparse 0.5 * H} 0'
end_point = '${fparse 0.875 * L} ${fparse 0.5 * H} 0'
num_points = ${Mesh/block_1/nx}
variable = 'vel_x vel_y pressure TKE TKED'
sort_by = 'x'
execute_on = 'timestep_end'
[]
[]
(modules/navier_stokes/examples/solidification/gallium_melting_linear.i)
##########################################################
# Simulation of Gallium Melting Experiment
# Ref: Gau, C., & Viskanta, R. (1986). Melting and solidification of a pure metal on a vertical wall.
# Key physics: melting/solidification, convective heat transfer, natural convection
##########################################################
mu = 1.81e-3
rho_solid = 6093
rho_liquid = 6093
k_solid = 32
k_liquid = 32
cp_solid = 381.5
cp_liquid = 381.5
L = 80160
alpha_b = 1.2e-4
T_solidus = 302.93
T_liquidus = '${fparse T_solidus + 0.1}'
T_cold = 301.15
T_hot = 311.15
Nx = 200
Ny = 120
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 88.9e-3
ymin = 0
ymax = 63.5e-3
nx = ${Nx}
ny = ${Ny}
bias_x = 1.005
[]
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho_liquid}
p_diffusion_kernel = p_diffusion
[]
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system energy_system'
previous_nl_solution_required = true
[]
[AuxVariables]
[U]
type = MooseVariableFVReal
[]
[fl]
type = MooseVariableFVReal
initial_condition = 0.0
[]
[density]
type = MooseVariableFVReal
[]
[th_cond]
type = MooseVariableFVReal
[]
[cp_var]
type = MooseVariableFVReal
[]
[darcy_coef]
type = MooseVariableFVReal
[]
[fch_coef]
type = MooseVariableFVReal
[]
[]
[AuxKernels]
[mag]
type = VectorMagnitudeAux
variable = U
x = vel_x
y = vel_y
[]
[compute_fl]
type = NSLiquidFractionAux
variable = fl
temperature = T
T_liquidus = '${T_liquidus}'
T_solidus = '${T_solidus}'
execute_on = 'TIMESTEP_END'
[]
[rho_out]
type = FunctorAux
functor = 'rho_mixture'
variable = 'density'
[]
[th_cond_out]
type = FunctorAux
functor = 'k_mixture'
variable = 'th_cond'
[]
[cp_out]
type = FunctorAux
functor = 'cp_mixture'
variable = 'cp_var'
[]
[darcy_out]
type = FunctorAux
functor = 'Darcy_coefficient'
variable = 'darcy_coef'
[]
[fch_out]
type = FunctorAux
functor = 'Forchheimer_coefficient'
variable = 'fch_coef'
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = 0.0
solver_sys = u_system
[]
[vel_y]
type = MooseLinearVariableFVReal
solver_sys = v_system
initial_condition = 0.0
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = pressure_system
initial_condition = 0.2
[]
[T]
type = MooseLinearVariableFVReal
solver_sys = energy_system
initial_condition = ${T_cold}
[]
[]
[FVInterpolationMethods]
[upwind]
type = FVAdvectedUpwind
[]
[]
[LinearFVKernels]
[u_time]
type = LinearFVTimeDerivative
variable = vel_x
factor = 'rho_mixture'
[]
[v_time]
type = LinearFVTimeDerivative
variable = vel_y
factor = 'rho_mixture'
[]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
advected_interp_method_name = upwind
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
advected_interp_method_name = upwind
[]
[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_liquid}'
gravity = '0 -9.81 0'
alpha_name = ${alpha_b}
ref_temperature = ${T_solidus}
T_fluid = T
momentum_component = 'x'
[]
[v_boussinesq]
type = LinearFVMomentumBoussinesq
variable = vel_y
rho = '${rho_liquid}'
gravity = '0 -9.81 0'
alpha_name = ${alpha_b}
ref_temperature = ${T_solidus}
T_fluid = T
momentum_component = 'y'
[]
[u_friction_darcy]
type = LinearFVReaction
variable = vel_x
coeff = 'darcy_coef_friction'
[]
[v_friction_darcy]
type = LinearFVReaction
variable = vel_y
coeff = 'darcy_coef_friction'
[]
[u_friction_forch]
type = LinearFVReaction
variable = vel_x
coeff = 'forch_coef_friction'
[]
[v_friction_forch]
type = LinearFVReaction
variable = vel_y
coeff = 'forch_coef_friction'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[h_time]
type = LinearFVTimeDerivative
variable = T
# factor should be mixture. For simplicity and
# because the properties are the same for liquid and solid
# the factor is defined as below.
factor = ${fparse rho_liquid*cp_liquid}
[]
[h_advection]
type = LinearFVEnergyAdvection
variable = T
advected_quantity = temperature
cp = ${cp_liquid}
rhie_chow_user_object = 'rc'
[]
[conduction]
type = LinearFVDiffusion
variable = T
diffusion_coeff = k_mixture
use_nonorthogonal_correction = false
[]
[energy_source]
type = LinearFVPhaseChangeSource
variable = T
L = ${L}
T_liquidus = ${T_liquidus}
T_solidus = ${T_solidus}
rho = 'rho_mixture'
[]
[]
[LinearFVBCs]
[walls-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left right top bottom'
variable = vel_x
functor = 0.0
[]
[walls-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left right top bottom'
variable = vel_y
functor = 0.0
[]
[hot_wall]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T
functor = '${T_hot}'
boundary = 'left'
[]
[cold_wall]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T
functor = '${T_cold}'
boundary = 'right'
[]
[]
[FunctorMaterials]
[eff_cp]
type = NSFVMixtureFunctorMaterial
phase_2_names = '${cp_solid} ${k_solid} ${rho_solid}'
phase_1_names = '${cp_liquid} ${k_liquid} ${rho_liquid}'
prop_names = 'cp_mixture k_mixture rho_mixture'
phase_1_fraction = fl
[]
[mushy_zone_resistance]
type = INSFVMushyPorousFrictionFunctorMaterial
liquid_fraction = 'fl'
mu = '${mu}'
rho_l = '${rho_liquid}'
dendrite_spacing_scaling = 1e-3
[]
[darcy_coeff_friction]
type = ParsedFunctorMaterial
property_name = 'darcy_coef_friction'
functor_names = 'darcy_coef'
functor_symbols = 'darcy_coef'
expression = 'darcy_coef'
[]
[forch_coeff_friction]
type = ParsedFunctorMaterial
property_name = 'forch_coef_friction'
functor_names = 'U fch_coef'
functor_symbols = 'U fch_coef'
expression = 'fch_coef * U'
[]
[]
[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.7
pressure_variable_relaxation = 0.3
energy_equation_relaxation = 0.9
num_iterations = 8
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.005
start_time = 0.0
end_time = 60.0
num_piso_iterations = 0
pin_pressure = true
pressure_pin_value = 0.0
pressure_pin_point = '0.05 0.05 0.0'
[]
[Postprocessors]
[ave_p]
type = ElementAverageValue
variable = 'pressure'
execute_on = 'INITIAL TIMESTEP_END'
[]
[ave_fl]
type = ElementAverageValue
variable = 'fl'
execute_on = 'INITIAL TIMESTEP_END'
[]
[ave_T]
type = ElementAverageValue
variable = 'T'
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Outputs]
[out_avg]
type = Exodus
time_step_interval = 2000
[]
csv = false
[]
(modules/navier_stokes/test/tests/finite_volume/ins/turbulence/bfs/linear-segregated-transient/BFS_ERCOFTAC.i)
Re = 5100
rho = 1.0
bulk_u = 1.0
H = 1.0
mu = '${fparse rho * bulk_u * H / Re}'
advected_interp_method = 'upwind'
### k-epsilon Closure Parameters ###
sigma_k = 1.0
sigma_eps = 1.3
C1_eps = 1.44
C2_eps = 1.92
C_mu = 0.09
### Initial and Boundary Conditions ###
intensity = 0.01
k_init = '${fparse 1.5*(intensity * bulk_u)^2}'
eps_init = '${fparse C_mu^0.75 * k_init^1.5 / H}'
### Modeling parameters ###
bulk_wall_treatment = false
walls = 'bottom wall-side top'
wall_treatment = 'neq' # Options: eq_newton, eq_incremental, eq_linearized, neq
[Mesh]
[gen]
type = CartesianMeshGenerator
dim = 2
dx = '${fparse 10.0*H} ${fparse 20.0*H}'
dy = '${H} ${fparse 5*H}'
ix = '8 16'
iy = '2 8'
subdomain_id = '
2 1
1 1
'
[]
[corner_walls]
type = SideSetsBetweenSubdomainsGenerator
input = gen
primary_block ='1'
paired_block ='2'
new_boundary = 'wall-side'
[]
[delete_bottom]
type = BlockDeletionGenerator
input = corner_walls
block ='2'
[]
# Prevent test diffing on distributed parallel element numbering
allow_renumbering = false
[]
[Problem]
linear_sys_names = 'u_system v_system pressure_system TKE_system TKED_system'
previous_nl_solution_required = true
[]
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
pressure = pressure
rho = ${rho}
p_diffusion_kernel = p_diffusion
[]
[]
[Variables]
[vel_x]
type = MooseLinearVariableFVReal
initial_condition = ${bulk_u}
solver_sys = u_system
[]
[vel_y]
type = MooseLinearVariableFVReal
initial_condition = 0
solver_sys = v_system
[]
[pressure]
type = MooseLinearVariableFVReal
initial_condition = 1e-8
solver_sys = pressure_system
[]
[TKE]
type = MooseLinearVariableFVReal
solver_sys = TKE_system
initial_condition = ${k_init}
[]
[TKED]
type = MooseLinearVariableFVReal
solver_sys = TKED_system
initial_condition = ${eps_init}
[]
[]
[FVInterpolationMethods]
[upwind]
type = FVAdvectedUpwind
[]
[]
[LinearFVKernels]
[u_time]
type = LinearFVTimeDerivative
variable = vel_x
factor = ${rho}
[]
[u_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_x
advected_interp_method_name = ${advected_interp_method}
mu = 'mu_t'
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
use_deviatoric_terms = yes
[]
[u_diffusion]
type = LinearFVDiffusion
variable = vel_x
diffusion_coeff = ${mu}
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[v_time]
type = LinearFVTimeDerivative
variable = vel_y
factor = ${rho}
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = ${advected_interp_method}
mu = 'mu_t'
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
use_deviatoric_terms = yes
[]
[v_diffusion]
type = LinearFVDiffusion
variable = vel_y
diffusion_coeff = ${mu}
use_nonorthogonal_correction = false
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[TKE_time]
type = LinearFVTimeDerivative
variable = TKE
factor = ${rho}
[]
[TKE_advection]
type = LinearFVTurbulentAdvection
variable = TKE
advected_interp_method_name = ${advected_interp_method}
[]
[TKE_diffusion]
type = LinearFVTurbulentDiffusion
variable = TKE
diffusion_coeff = ${mu}
use_nonorthogonal_correction = false
[]
[TKE_turb_diffusion]
type = LinearFVTurbulentDiffusion
variable = TKE
diffusion_coeff = 'mu_t'
scaling_coeff = ${sigma_k}
use_nonorthogonal_correction = false
[]
[TKE_source_sink]
type = LinearFVTKESourceSink
variable = TKE
u = vel_x
v = vel_y
epsilon = TKED
rho = ${rho}
mu = ${mu}
mu_t = 'mu_t'
walls = ${walls}
wall_treatment = ${wall_treatment}
C_pl = 1e10
[]
[TKED_time]
type = LinearFVTimeDerivative
variable = TKED
factor = ${rho}
[]
[TKED_advection]
type = LinearFVTurbulentAdvection
variable = TKED
advected_interp_method_name = ${advected_interp_method}
walls = ${walls}
[]
[TKED_diffusion]
type = LinearFVTurbulentDiffusion
variable = TKED
diffusion_coeff = ${mu}
use_nonorthogonal_correction = false
walls = ${walls}
[]
[TKED_turb_diffusion]
type = LinearFVTurbulentDiffusion
variable = TKED
diffusion_coeff = 'mu_t'
scaling_coeff = ${sigma_eps}
use_nonorthogonal_correction = false
walls = ${walls}
[]
[TKED_source_sink]
type = LinearFVTKEDSourceSink
variable = TKED
u = vel_x
v = vel_y
tke = TKE
rho = ${rho}
mu = ${mu}
mu_t = 'mu_t'
C1_eps = ${C1_eps}
C2_eps = ${C2_eps}
walls = ${walls}
wall_treatment = ${wall_treatment}
C_pl = 1e10
[]
[]
[LinearFVBCs]
[inlet-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_x
functor = '${bulk_u}'
[]
[inlet-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = vel_y
functor = '0.0'
[]
[inlet_TKE]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = TKE
functor = '${k_init}'
[]
[inlet_TKED]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'left'
variable = TKED
functor = '${eps_init}'
[]
[outlet_p]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = 'right'
variable = pressure
functor = 0.0
[]
[outlet_u]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'right'
variable = vel_x
use_two_term_expansion = false
[]
[outlet_v]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'right'
variable = vel_y
use_two_term_expansion = false
[]
[outlet_TKE]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'right'
variable = TKE
use_two_term_expansion = false
[]
[outlet_TKED]
type = LinearFVAdvectionDiffusionOutflowBC
boundary = 'right'
variable = TKED
use_two_term_expansion = false
[]
[walls-u]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = ${walls}
variable = vel_x
functor = 0.0
[]
[walls-v]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
boundary = ${walls}
variable = vel_y
functor = 0.0
[]
[walls_mu_t]
type = LinearFVTurbulentViscosityWallFunctionBC
boundary = ${walls}
variable = 'mu_t'
u = vel_x
v = vel_y
rho = ${rho}
mu = ${mu}
tke = TKE
wall_treatment = ${wall_treatment}
[]
[]
[AuxVariables]
[mu_t]
type = MooseLinearVariableFVReal
initial_condition = '${fparse rho * C_mu * ${k_init}^2 / eps_init}'
[]
[yplus]
type = MooseLinearVariableFVReal
[]
[mu_eff]
type = MooseLinearVariableFVReal
initial_condition = '${fparse rho * C_mu * ${k_init}^2 / eps_init + mu}'
[]
[]
[AuxKernels]
[compute_mu_t]
type = kEpsilonViscosityAux
variable = mu_t
C_mu = ${C_mu}
tke = TKE
epsilon = TKED
mu = ${mu}
rho = ${rho}
u = vel_x
v = vel_y
bulk_wall_treatment = ${bulk_wall_treatment}
walls = ${walls}
wall_treatment = ${wall_treatment}
execute_on = 'NONLINEAR'
mu_t_ratio_max = 1e20
[]
[compute_y_plus]
type = RANSYPlusAux
variable = yplus
tke = TKE
mu = ${mu}
rho = ${rho}
u = vel_x
v = vel_y
walls = ${walls}
wall_treatment = ${wall_treatment}
execute_on = 'NONLINEAR'
[]
[compute_mu_eff]
type = ParsedAux
variable = 'mu_eff'
coupled_variables = 'mu_t'
expression = 'mu_t + ${mu}'
execute_on = 'NONLINEAR'
[]
[]
[Executioner]
type = PIMPLE
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system v_system'
pressure_system = 'pressure_system'
turbulence_systems = 'TKE_system TKED_system'
momentum_l_abs_tol = 1e-14
pressure_l_abs_tol = 1e-14
turbulence_l_abs_tol = 1e-14
momentum_l_tol = 1e-14
pressure_l_tol = 1e-14
turbulence_l_tol = 1e-14
momentum_equation_relaxation = 0.7
pressure_variable_relaxation = 0.3
turbulence_equation_relaxation = '0.5 0.5'
num_iterations = 20
pressure_absolute_tolerance = 1e-6
momentum_absolute_tolerance = 1e-6
turbulence_absolute_tolerance = '1e-6 1e-6'
momentum_petsc_options_iname = '-pc_type -pc_hypre_type'
momentum_petsc_options_value = 'hypre boomeramg'
pressure_petsc_options_iname = '-pc_type -pc_hypre_type'
pressure_petsc_options_value = 'hypre boomeramg'
turbulence_petsc_options_iname = '-pc_type -pc_hypre_type'
turbulence_petsc_options_value = 'hypre boomeramg'
print_fields = false
continue_on_max_its = true
dt = 10.0
num_steps = 10
num_piso_iterations = 2
[]
[Outputs]
csv = true
[]
[VectorPostprocessors]
[side_bottom]
type = SideValueSampler
boundary = 'bottom'
variable = 'vel_x vel_y pressure TKE TKED'
sort_by = 'x'
execute_on = 'timestep_end'
[]
[side_top]
type = SideValueSampler
boundary = 'top'
variable = 'vel_x vel_y pressure TKE TKED'
sort_by = 'x'
execute_on = 'timestep_end'
[]
[line_entry_channel_wall]
type = LineValueSampler
start_point = '${fparse 0.5 * H} ${fparse 1.00001 * H} 0'
end_point = '${fparse 29.5 * H} ${fparse 1.00001 * H} 0'
num_points = 24
variable = 'vel_x vel_y pressure TKE TKED'
sort_by = 'x'
execute_on = 'timestep_end'
[]
[line_quarter_entry_channel]
type = LineValueSampler
start_point = '${fparse 0.5 * H} ${fparse 2.25001 * H} 0'
end_point = '${fparse 29.5 * H} ${fparse 2.25001 * H} 0'
num_points = 24
variable = 'vel_x vel_y pressure TKE TKED'
sort_by = 'x'
execute_on = 'timestep_end'
[]
[]
(modules/navier_stokes/examples/solidification/1d_stefan_T.i)
rho_salt = 1
cp_salt = 1
k_salt = 1
L = 1
# Numerical regularization of sharp melting at T_m = 0.
# For a sharper run, reduce this to 1e-4 or 1e-5.
# Setting it exactly to zero activates your degenerate sharp branch.
T_solidus = 0
T_liquidus = 1e-2
T_hot_bc = 1
erf_lambda = 0.6194595791366345
t0 = 0.0065023282
simulation_end_time = 0.25
Lx = 2.0
nx = 1000
[Problem]
previous_nl_solution_required = true
linear_sys_names = 'energy_system p_system u_system'
[]
[Mesh]
[salt_mesh]
type = GeneratedMeshGenerator
dim = 1
nx = ${nx}
xmin = 0.0
xmax = ${Lx}
subdomain_ids = 0
bias_x = 1.0
[]
[name_salt]
type = RenameBlockGenerator
input = salt_mesh
old_block = 0
new_block = 'salt'
[]
[]
[Functions]
# Initial temperature corresponding to the sharp analytical solution.
[T_exact_initial]
type = ParsedFunction
expression = 'if(x < 0.1, 1.0 - erf(x / (2.0 * sqrt(${t0}))) / ${erf_lambda}, 0.0)'
[]
[]
[UserObjects]
[rc]
type = RhieChowMassFlux
u = vel_x
v = vel_y
w = vel_z
pressure = pressure
rho = ${rho_salt}
p_diffusion_kernel = p_diffusion
block = salt
[]
[]
[Variables]
[T]
type = MooseLinearVariableFVReal
solver_sys = energy_system
block = salt
[]
# Dummy velocity/pressure variables kept because your PIMPLE block
# references u_system and p_system, even though they are not solved.
[vel_x]
type = MooseLinearVariableFVReal
solver_sys = 'u_system'
initial_condition = 0
block = salt
[]
[pressure]
type = MooseLinearVariableFVReal
solver_sys = 'p_system'
initial_condition = 0
block = salt
[]
[]
[AuxVariables]
[fl]
type = MooseVariableFVReal
initial_condition = 0.0
[]
[]
[AuxKernels]
[compute_fl]
type = NSLiquidFractionAux
variable = fl
temperature = T
T_liquidus = '${T_liquidus}'
T_solidus = '${T_solidus}'
execute_on = 'TIMESTEP_END'
[]
[]
[ICs]
[h_salt_ic]
type = FunctionIC
variable = T
function = T_exact_initial
block = salt
[]
[]
[LinearFVKernels]
# Pressure diffusion kernel kept only because the Rhie-Chow object
# references it. Pressure solve is disabled in the Executioner.
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
block = salt
use_nonorthogonal_correction = false
[]
# rho * dh/dt
[h_time]
type = LinearFVTimeDerivative
variable = T
factor = ${fparse rho_salt*cp_salt}
block = salt
[]
# div(k * dT/dh * grad(h))
[h_conduction]
type = LinearFVDiffusion
variable = T
diffusion_coeff = ${k_salt}
use_nonorthogonal_correction = false
block = salt
# coeff_interp_method = harm
[]
[energy_source]
type = LinearFVPhaseChangeSource
variable = T
L = ${L}
T_liquidus = ${T_liquidus}
T_solidus = ${T_solidus}
rho = ${rho_salt}
smoothing = 'sharp'
[]
[]
[LinearFVBCs]
# Hot wall at x = 0.
[hot_left]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T
boundary = left
functor = ${T_hot_bc}
[]
# Far-field solid at T_m = 0.
[cold_right]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T
boundary = right
functor = 0.0
[]
[]
[FunctorMaterials]
[ins_fv]
type = INSFVEnthalpyFunctorMaterial
rho = ${rho_salt}
cp = ${cp_salt}
temperature = 'T'
[]
[]
[VectorPostprocessors]
[horizontal_center]
type = LineValueSampler
start_point = '0 0 0'
end_point = '0.5 0 0'
num_points = ${fparse nx*0.5/Lx}
variable = 'fl'
sort_by = 'x'
execute_on = 'FINAL'
warn_discontinuous_face_values = false
[]
[]
[Executioner]
type = PIMPLE
dt = 1.25e-4
# This corresponds to analytical final time tau_end = 0.25
# because tau = t + t0.
end_time = ${simulation_end_time}
num_iterations = 60
continue_on_max_its = true
print_fields = false
energy_system = energy_system
rhie_chow_user_object = 'rc'
momentum_systems = 'u_system'
pressure_system = 'p_system'
should_solve_momentum = false
should_solve_pressure = false
energy_l_abs_tol = 1e-18
energy_l_tol = 1e-18
energy_absolute_tolerance = 1e-18
energy_equation_relaxation = 0.9
energy_petsc_options_iname = '-pc_type -pc_hypre_type'
energy_petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
[out_test]
type = Exodus
time_step_interval = 400
[]
[]
(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
[]
(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
[]
[]
[FVInterpolationMethods]
[average]
type = FVGeometricAverage
[]
[]
[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_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'x'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[v_advection_stress]
type = LinearWCNSFVMomentumFlux
variable = vel_y
advected_interp_method_name = ${advected_interp_method}
mu = ${mu}
u = vel_x
v = vel_y
momentum_component = 'y'
rhie_chow_user_object = 'rc'
use_nonorthogonal_correction = false
[]
[u_pressure]
type = LinearFVMomentumPressure
variable = vel_x
pressure = pressure
momentum_component = 'x'
[]
[v_pressure]
type = LinearFVMomentumPressure
variable = vel_y
pressure = pressure
momentum_component = 'y'
[]
[u_boussinesq]
type = LinearFVMomentumBoussinesq
variable = vel_x
rho = ${rho}
gravity = '0 -9.81 0'
alpha_name = ${alpha_b}
ref_temperature = 300.0
T_fluid = T
momentum_component = 'x'
[]
[v_boussinesq]
type = LinearFVMomentumBoussinesq
variable = vel_y
rho = ${rho}
gravity = '0 -9.81 0'
alpha_name = ${alpha_b}
ref_temperature = 300.0
T_fluid = T
momentum_component = 'y'
[]
[p_diffusion]
type = LinearFVPressureCorrectionDiffusion
variable = pressure
diffusion_tensor = Ainv
use_nonorthogonal_correction = false
[]
[HbyA_divergence]
type = LinearFVDivergence
variable = pressure
face_flux = HbyA
force_boundary_execution = true
[]
[h_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/heat_transfer/test/tests/linearfvbcs/linear_fv_functor_radiative_bc/linear_fv_functor_radiative_bc_mms.i)
# MMS convergence test for LinearFVFunctorRadiativeBC.
#
# Exact solution: T_exact(x) = T_L + B * (exp(x) - 1)
# where B = (T_R_mms - T_L) / (e - 1).
#
# This satisfies:
# Left BC: T(0) = T_L (Dirichlet)
# Right BC: -k * T'(1) = sigma*eps*(T_R_mms^4 - T_inf^4) (radiative)
# with T'(1) = B*e = (T_R_mms - T_L)*e/(e-1)
# i.e. k*(T_L - T_R_mms)*e/(e-1) = sigma*eps*(T_R_mms^4 - T_inf^4)
# Source: f(x) = -k * T_exact'' = -k * B * exp(x) (spatially varying)
#
# The exponential profile produces non-trivial interior discretization error,
# ensuring the convergence test exercises both the FV interior scheme and the
# Robin boundary condition simultaneously.
#
# T_R_mms must be supplied via CLI args, as the root of:
# k*(T_L - T_R)*e/(e-1) = sigma*eps*(T_R^4 - T_inf^4)
# (computed in the Python convergence script).
T_L = 1000.0
T_inf = 300.0
k = 1.0
eps = 1.0
T_R_mms = 0 # set via CLI: T_R_mms=<value>
B_mms = '${fparse (T_R_mms - T_L) / (exp(1.0) - 1.0)}'
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10 # overridden by CLI: Mesh/gen/nx=<N>
xmin = 0
xmax = 1
[]
[]
[Problem]
linear_sys_names = 'heat_system'
[]
[Variables]
[T]
type = MooseLinearVariableFVReal
solver_sys = 'heat_system'
initial_condition = ${T_L}
[]
[]
[Functions]
[exact_T]
type = ParsedFunction
expression = 'T_L + B_mms * (exp(x) - 1.0)'
symbol_names = 'T_L B_mms'
symbol_values = '${T_L} ${B_mms}'
[]
[source_fn]
type = ParsedFunction
expression = '-k * B_mms * exp(x)'
symbol_names = 'k B_mms'
symbol_values = '${k} ${B_mms}'
[]
[]
[LinearFVKernels]
[time]
type = LinearFVTimeDerivative
variable = T
[]
[diffusion]
type = LinearFVDiffusion
variable = T
diffusion_coeff = ${k}
[]
[source]
type = LinearFVSource
variable = T
source_density = source_fn
[]
[]
[LinearFVBCs]
[left]
type = LinearFVAdvectionDiffusionFunctorDirichletBC
variable = T
boundary = 'left'
functor = ${T_L}
[]
[right]
type = LinearFVFunctorRadiativeBC
variable = T
boundary = 'right'
emissivity = ${eps}
Tinfinity = ${T_inf}
diffusion_coeff = ${k}
[]
[]
[Postprocessors]
[l2_error]
type = ElementL2FunctorError
approximate = T
exact = exact_T
execute_on = TIMESTEP_END
[]
[]
[Executioner]
type = Transient
system_names = heat_system
scheme = 'implicit-euler'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
dt = 1e6
num_steps = 100
l_tol = 1e-12
[]
[Outputs]
[out]
type = CSV
execute_on = final
[]
[]