- additional_linear_resistanceAdditional linear friction factor
C++ Type:libMesh::VectorValue<double>
Controllable:No
Description:Additional linear friction factor
- additional_quadratic_resistanceAdditional quadratic friction factor
C++ Type:libMesh::VectorValue<double>
Controllable:No
Description:Additional quadratic friction factor
- base_linear_friction_coefsName of the base anistropic Darcy/linear friction functor
C++ Type:MooseFunctorName
Controllable:No
Description:Name of the base anistropic Darcy/linear friction functor
- base_quadratic_friction_coefsName of the base anistropic Forchheimer/quadratic friction functor
C++ Type:MooseFunctorName
Controllable:No
Description:Name of the base anistropic Forchheimer/quadratic friction functor
- directionDirection of the diode
C++ Type:libMesh::VectorValue<double>
Controllable:No
Description:Direction of the diode
- sum_linear_friction_nameName of the additional Darcy/linear friction functor
C++ Type:MooseFunctorName
Controllable:No
Description:Name of the additional Darcy/linear friction functor
- sum_quadratic_friction_nameName of the additional Forchheimer/quadratic friction functor
C++ Type:MooseFunctorName
Controllable:No
Description:Name of the additional Forchheimer/quadratic friction functor
- turn_on_diodeFalseWhether to add the additional friction
Default:False
C++ Type:bool
Controllable:Yes
Description:Whether to add the additional friction
NSFVFrictionFlowDiodeMaterial
Increases the anistropic friction coefficients, linear or quadratic, by K_i * |direction_i| when the diode is turned on with a boolean
This material is meant to be used to implement a simplistic volumetric flow diode. The parameter "additional_linear_resistance" and "additional_quadratic_resistance" should be chosen such that the flow is sufficiently vanished in the direction opposite the diode.
The operation of the diode is controlled with the "turn_on_diode" parameter. If this parameter is false, the 'diode' does NOT create any flow restriction.
Example input file syntax
Simple always-on friction term
In this example the friction flow diode is added to a porous media simulation. The combined_linear/quadratic
friction coefficients contain both the diode friction coefficients and the base porous media friction.
The friction coefficients are then combined using a PiecewiseByBlockVectorFunctorMaterial ADPiecewiseByBlockVectorFunctorMaterial to have a uniform name over the whole domain for friction coefficients.
[Materials]
[porosity]
type = ADGenericFunctorMaterial
prop_names = 'porosity'
prop_values = '0.5'
[]
[base_friction]
type = ADGenericVectorFunctorMaterial
prop_names = 'Darcy Forchheimer'
prop_values = '1 1 1 0.1 0.2 0.3'
[]
[diode]
type = NSFVFrictionFlowDiodeMaterial
direction = '1 0 0'
additional_linear_resistance = '10 0 0' #'100 10 20'
additional_quadratic_resistance = '10 0 0' #'10 4 4'
base_linear_friction_coefs = 'Darcy'
base_quadratic_friction_coefs = 'Forchheimer'
sum_linear_friction_name = 'diode_linear'
sum_quadratic_friction_name = 'diode_quad'
block = '2'
turn_on_diode = true
[]
[combine_linear_friction]
type = ADPiecewiseByBlockVectorFunctorMaterial
prop_name = 'combined_linear'
subdomain_to_prop_value = '1 Darcy
2 diode_linear'
[]
[combine_quadratic_friction]
type = ADPiecewiseByBlockVectorFunctorMaterial
prop_name = 'combined_quadratic'
subdomain_to_prop_value = '1 Forchheimer
2 diode_quad'
[]
[]
(moose/modules/navier_stokes/test/tests/finite_volume/materials/flow_diode/friction.i)Dynamic operation of a diode
In this example, we show three Control strategies for the diode. The idea of these controls is to detect a condition in which the flow should be blocked, because it's going in the way opposite the direction of the diode, or because it meets a criterion that is outlined in the postprocessors and functions involved to describe it.
The first strategy is simply to block the flow at a given time.
[time_based]
type = BoolFunctionControl
function = time_function
parameter = 'Materials/diode/turn_on_diode'
execute_on = timestep_begin
[]
[time_function]
type = ParsedFunction
expression = 'if(t<0.1, 0, 1)'
[]
(moose/modules/navier_stokes/test/tests/finite_volume/materials/flow_diode/transient_operation.i)The second strategy is to look at the pressure drop across the diode, and block (add friction to) the flow if it exceeds a certain value. If it exceeds a certain value, then in all likelihood means that the flow is flowing through the diode in the direction of decreasing pressure.
[pdrop_based]
type = BoolFunctionControl
function = pdrop_positive
parameter = 'Materials/diode/turn_on_diode'
execute_on = timestep_begin
[]
[pdrop_diode]
type = PressureDrop
upstream_boundary = 'diode_inlet'
downstream_boundary = 'top_left'
weighting_functor = 'momentum'
boundary = 'diode_inlet top_left'
pressure = pressure
[]
[pdrop_positive]
type = ParsedFunction
expression = 'if(pdrop_diode>100, 1, 0)'
symbol_names = pdrop_diode
symbol_values = pdrop_diode
[]
(moose/modules/navier_stokes/test/tests/finite_volume/materials/flow_diode/transient_operation.i)The final strategy is to compute the mass flow rate through the diode, and block (add friction to) the flow if it exceeds a certain value.
[flow_based]
type = BoolFunctionControl
function = velocity_big_enough
parameter = 'Materials/diode/turn_on_diode'
execute_on = timestep_begin
[]
[flow_diode]
type = VolumetricFlowRate
boundary = 'diode_inlet'
vel_x = superficial_vel_x
vel_y = superficial_vel_y
advected_quantity = ${rho}
[]
[velocity_big_enough]
type = ParsedFunction
expression = 'if(flow_diode<-0.4, 1, 0)'
symbol_names = flow_diode
symbol_values = flow_diode
[]
(moose/modules/navier_stokes/test/tests/finite_volume/materials/flow_diode/transient_operation.i)All these strategies are workarounds for the fact that looking at the local velocity (in multi-dimensional space) to apply a friction term based on this local velocity, rather than an average quantity, seems to be numerically unstable.
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
- boundaryThe list of boundaries (ids or names) from the mesh where this object applies
C++ Type:std::vector<BoundaryName>
Controllable:No
Description:The list of boundaries (ids or names) from the mesh where this object applies
- computeTrueWhen false, MOOSE will not call compute methods on this material. The user must call computeProperties() after retrieving the MaterialBase via MaterialBasePropertyInterface::getMaterialBase(). Non-computed MaterialBases are not sorted for dependencies.
Default:True
C++ Type:bool
Controllable:No
Description:When false, MOOSE will not call compute methods on this material. The user must call computeProperties() after retrieving the MaterialBase via MaterialBasePropertyInterface::getMaterialBase(). Non-computed MaterialBases are not sorted for dependencies.
- constant_onNONEWhen ELEMENT, MOOSE will only call computeQpProperties() for the 0th quadrature point, and then copy that value to the other qps.When SUBDOMAIN, MOOSE will only call computeQpProperties() for the 0th quadrature point, and then copy that value to the other qps. Evaluations on element qps will be skipped
Default:NONE
C++ Type:MooseEnum
Controllable:No
Description:When ELEMENT, MOOSE will only call computeQpProperties() for the 0th quadrature point, and then copy that value to the other qps.When SUBDOMAIN, MOOSE will only call computeQpProperties() for the 0th quadrature point, and then copy that value to the other qps. Evaluations on element qps will be skipped
- declare_suffixAn optional suffix parameter that can be appended to any declared 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 declared properties. The suffix will be prepended with a '_' character.
- 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
- 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
- output_propertiesList of material properties, from this material, to output (outputs must also be defined to an output type)
C++ Type:std::vector<std::string>
Controllable:No
Description:List of material properties, from this material, to output (outputs must also be defined to an output type)
- outputsnone Vector of output names where you would like to restrict the output of variables(s) associated with this object
Default:none
C++ Type:std::vector<OutputName>
Controllable:No
Description:Vector of output names where you would like to restrict the output of variables(s) associated with this object