- LLatent heat.
C++ Type:MooseFunctorName
Controllable:No
Description:Latent heat.
- T_liquidusThe liquidus temperature.
C++ Type:MooseFunctorName
Controllable:No
Description:The liquidus temperature.
- T_solidusThe solidus temperature.
C++ Type:MooseFunctorName
Controllable:No
Description:The solidus temperature.
- liquid_fractionLiquid Fraction Functor.
C++ Type:MooseFunctorName
Controllable:No
Description:Liquid Fraction Functor.
- rhoThe mixture density.
C++ Type:MooseFunctorName
Controllable:No
Description:The mixture density.
- variableThe name of the variable that this residual object operates on
C++ Type:NonlinearVariableName
Controllable:No
Description:The name of the variable that this residual object operates on
NSFVPhaseChangeSource
Computes the energy source due to solidification/melting.
The power source is computed as:
where is the liquid density, is the latent heat, and is the liquid fraction.
Example
For an example on how to use this object see the model of the Galium melting experiment below Gau and Viskanta (1986)
##########################################################
# Simulation of Galium 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}'
advected_interp_method = 'upwind'
velocity_interp_method = 'rc'
T_cold = 301.15
T_hot = 311.15
Nx = 100
Ny = 50
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = vel_x
v = vel_y
pressure = pressure
[]
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 88.9e-3
ymin = 0
ymax = 63.5e-3
nx = ${Nx}
ny = ${Ny}
[]
[]
[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 = ADFunctorElementalAux
functor = 'rho_mixture'
variable = 'density'
[]
[th_cond_out]
type = ADFunctorElementalAux
functor = 'k_mixture'
variable = 'th_cond'
[]
[cp_out]
type = ADFunctorElementalAux
functor = 'cp_mixture'
variable = 'cp_var'
[]
[darcy_out]
type = ADFunctorElementalAux
functor = 'Darcy_coefficient'
variable = 'darcy_coef'
[]
[fch_out]
type = ADFunctorElementalAux
functor = 'Forchheimer_coefficient'
variable = 'fch_coef'
[]
[]
[Variables]
[vel_x]
type = INSFVVelocityVariable
initial_condition = 0.0
[]
[vel_y]
type = INSFVVelocityVariable
initial_condition = 0.0
[]
[pressure]
type = INSFVPressureVariable
[]
[lambda]
family = SCALAR
order = FIRST
[]
[T]
type = INSFVEnergyVariable
initial_condition = '${T_cold}'
scaling = 1.0
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = rho_mixture
[]
[mean_zero_pressure]
type = FVIntegralValueConstraint
variable = pressure
lambda = lambda
phi0 = 0.0
[]
[u_time]
type = INSFVMomentumTimeDerivative
variable = vel_x
rho = rho_mixture
momentum_component = 'x'
[]
[u_advection]
type = INSFVMomentumAdvection
variable = vel_x
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = rho_mixture
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = vel_x
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = vel_x
momentum_component = 'x'
pressure = pressure
[]
[u_friction]
type = INSFVMomentumFriction
variable = vel_x
momentum_component = 'x'
linear_coef_name = 'Darcy_coefficient'
quadratic_coef_name = 'Forchheimer_coefficient'
[]
[u_buoyancy]
type = INSFVMomentumBoussinesq
variable = vel_x
T_fluid = T
gravity = '0 -9.81 0'
rho = '${rho_liquid}'
ref_temperature = ${T_cold}
momentum_component = 'x'
[]
[u_gravity]
type = INSFVMomentumGravity
variable = vel_x
gravity = '0 -9.81 0'
rho = '${rho_liquid}'
momentum_component = 'x'
[]
[v_time]
type = INSFVMomentumTimeDerivative
variable = vel_y
rho = rho_mixture
momentum_component = 'y'
[]
[v_advection]
type = INSFVMomentumAdvection
variable = vel_y
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = rho_mixture
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = vel_y
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = vel_y
momentum_component = 'y'
pressure = pressure
[]
[v_friction]
type = INSFVMomentumFriction
variable = vel_y
momentum_component = 'y'
linear_coef_name = 'Darcy_coefficient'
quadratic_coef_name = 'Forchheimer_coefficient'
[]
[v_buoyancy]
type = INSFVMomentumBoussinesq
variable = vel_y
T_fluid = T
gravity = '0 -9.81 0'
rho = '${rho_liquid}'
ref_temperature = ${T_cold}
momentum_component = 'y'
[]
[v_gravity]
type = INSFVMomentumGravity
variable = vel_y
gravity = '0 -9.81 0'
rho = '${rho_liquid}'
momentum_component = 'y'
[]
[T_time]
type = INSFVEnergyTimeDerivative
variable = T
cp = cp_mixture
rho = rho_mixture
[]
[energy_advection]
type = INSFVEnergyAdvection
variable = T
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
[]
[energy_diffusion]
type = FVDiffusion
coeff = k_mixture
variable = T
[]
[energy_source]
type = NSFVPhaseChangeSource
variable = T
L = ${L}
liquid_fraction = fl
T_liquidus = ${T_liquidus}
T_solidus = ${T_solidus}
rho = 'rho_mixture'
[]
[]
[FVBCs]
[walls-u]
type = INSFVNoSlipWallBC
boundary = 'left right top bottom'
variable = vel_x
function = 0
[]
[walls-v]
type = INSFVNoSlipWallBC
boundary = 'left right top bottom'
variable = vel_y
function = 0
[]
[hot_wall]
type = FVDirichletBC
variable = T
value = '${T_hot}'
boundary = 'left'
[]
[cold_wall]
type = FVDirichletBC
variable = T
value = '${T_cold}'
boundary = 'right'
[]
[]
[Materials]
[ins_fv]
type = INSFVEnthalpyMaterial
rho = rho_mixture
cp = cp_mixture
temperature = 'T'
[]
[eff_cp]
type = NSFVMixtureMaterial
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 = INSFVMushyPorousFrictionMaterial
liquid_fraction = 'fl'
mu = '${mu}'
rho_l = '${rho_liquid}'
dendrite_spacing_scaling = 1e-1
[]
[const_functor]
type = ADGenericFunctorMaterial
prop_names = 'alpha_b'
prop_values = '${alpha_b}'
[]
[]
[Executioner]
type = Transient
# Time-stepping parameters
start_time = 0.0
end_time = 200.0
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 10
dt = 0.1
[]
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-2
nl_abs_tol = 1e-4
nl_max_its = 30
[]
[Outputs]
exodus = true
csv = false
[]
(moose/modules/navier_stokes/examples/solidification/galium_melting.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
- prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
C++ Type:MaterialPropertyName
Controllable:No
Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
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
Controllable:No
Description:The tag for the matrices this Kernel should fill
- vector_tagsnontimeThe tag for the vectors this Kernel should fill
Default:nontime
C++ Type:MultiMooseEnum
Controllable:No
Description:The tag for the vectors this Kernel should fill
Tagging 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
References
- Chie Gau and Rc Viskanta.
Melting and solidification of a pure metal on a vertical wall.
Journal of Heat and Mass Transfer, 108:174–181, 1986.[BibTeX]