- ntNumber of elements in the angular direction
C++ Type:unsigned int
Controllable:No
Description:Number of elements in the angular direction
- rmaxOuter radius
C++ Type:double
Controllable:No
Description:Outer radius
- rminInner radius. If rmin=0 then a disc mesh (with no central hole) will be created.
C++ Type:double
Controllable:No
Description:Inner radius. If rmin=0 then a disc mesh (with no central hole) will be created.
AnnularMeshGenerator
For rmin>0: creates an annular mesh of QUAD4 elements. For rmin=0: creates a disc mesh of QUAD4 and TRI3 elements. Boundary sidesets are created at rmax and rmin, and given these names. If dmin!0 and dmax!360, a sector of an annulus or disc is created. In this case boundary sidesets are also created at dmin and dmax, and given these names
Overview
This MeshGenerator object creates a mesh with an annular shape, and Quad4 elements distributed on several rings. The user can choose the inner and outer radii, as well as the number of elements in the radial and angular directions.
It is also possible to create a disc-shaped mesh with this class. To do so, the user has to choose 0 for the value of the inner radius. This will create a mesh composed of TRI3 elements at the center of the disc, and QUAD4 everywhere else.
If and , this will create a fraction of an annulus or disc.
Description
The AnnularMesh mesh generator builds simple 2D annular and disc meshes. They are created by drawing radial lines and concentric circles, and the mesh consists of the quadrilaterals thus formed. Therefore, no sophisticated paving is used to construct the mesh.
The inner radius and the outer radius must be specified. If the inner radius is zero a disc mesh is created, while if it is positive an annulus is created. The annulus has just one subdomain (block number = 0), whereas the disc has two subdomains: subdomain zero consists of the outer quadrilaterals, while the other (block number = 1) consists of the triangular elements that emanate from the origin.
The minimum and maximum angle may also be specified. These default to zero and 360, respectively. If other values are chosen, a sector of an annulus, or a sector of a disc will be created. Both angles are measured anti-clockwise from the xx axis.
The number of elements in the radial direction and the angular direction may be specified. By default, the mesh spacing is uniform in the radial direction, but the following options are available for more control over the radial meshing: - A growth factor that controls the element size in the radial direction may be specified. In this case, the radial element size in the innermost ring is multiplied by this factor for each concentric ring of elements, moving from the inner to the outer radius. If the growth factor is positive, the element radial dimension increases with increasing radial position, while if the growth factor is negative, the element radial dimension decreases with increasing radial position. - A list of values that define the radial positions of the rings of interior nodes can be specified. This allows for direct control of the element size for every one of the concentric rings. In this case, the number of radial elements is not specified, because it is inferred from the length of that list. - A flag that enforces equal areas among all of the elements. When true, this parameter will automatically determine the radial element spacing so that each element has the same area.
Sidesets are also created:
Sideset 0 is called "rmin" and is the set of sides at the minimum radius (which is zero for the disc).
Sideset 1 is called "rmax" and is the set of sides at the maximum radius.
Sideset 2 is called "dmin" and is the set of sides at the minimum angle, which is created only in the case of a sector of an annulus (or disc)
Sideset 3 is called "dmax" and is the set of sides at the maximum angle, which is created only in the case of a sector of an annulus (or disc)
Input Parameters
- boundary_id_offset0This offset is added to the generated boundary IDs
Default:0
C++ Type:short
Controllable:No
Description:This offset is added to the generated boundary IDs
- boundary_name_prefixIf provided, prefix the built in boundary names with this string
C++ Type:BoundaryName
Controllable:No
Description:If provided, prefix the built in boundary names with this string
- dmax360Maximum angle, measured in degrees anticlockwise from x axis. If dmin=0 and dmax=360 an annular mesh is created. Otherwise, only a sector of an annulus is created
Default:360
C++ Type:double
Controllable:No
Description:Maximum angle, measured in degrees anticlockwise from x axis. If dmin=0 and dmax=360 an annular mesh is created. Otherwise, only a sector of an annulus is created
- dmin0Minimum degree, measured in degrees anticlockwise from x axis
Default:0
C++ Type:double
Controllable:No
Description:Minimum degree, measured in degrees anticlockwise from x axis
- equal_areaFalseWhether to select the radial discretization to achieve equal areas of each ring
Default:False
C++ Type:bool
Controllable:No
Description:Whether to select the radial discretization to achieve equal areas of each ring
- growth_r1The ratio of radial sizes of successive rings of elements
Default:1
C++ Type:double
Controllable:No
Description:The ratio of radial sizes of successive rings of elements
- nr1Number of elements in the radial direction
Default:1
C++ Type:unsigned int
Controllable:No
Description:Number of elements in the radial direction
- quad_subdomain_id0The subdomain ID given to the QUAD4 elements
Default:0
C++ Type:unsigned short
Controllable:No
Description:The subdomain ID given to the QUAD4 elements
- radial_positionsDirectly prescribed positions of intermediate radial nodes
C++ Type:std::vector<double>
Controllable:No
Description:Directly prescribed positions of intermediate radial nodes
- tri_subdomain_id1The subdomain ID given to the TRI3 elements (these exist only if rmin=0, and they exist at the center of the disc
Default:1
C++ Type:unsigned short
Controllable:No
Description:The subdomain ID given to the TRI3 elements (these exist only if rmin=0, and they exist at the center of the disc
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:No
Description:Set the enabled status of the MooseObject.
- save_with_nameKeep the mesh from this mesh generator in memory with the name specified
C++ Type:std::string
Controllable:No
Description:Keep the mesh from this mesh generator in memory with the name specified
Advanced Parameters
- nemesisFalseWhether or not to output the mesh file in the nemesisformat (only if output = true)
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not to output the mesh file in the nemesisformat (only if output = true)
- outputFalseWhether or not to output the mesh file after generating the mesh
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not to output the mesh file after generating the mesh
- show_infoFalseWhether or not to show mesh info after generating the mesh (bounding box, element types, sidesets, nodesets, subdomains, etc)
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not to show mesh info after generating the mesh (bounding box, element types, sidesets, nodesets, subdomains, etc)
Debugging Parameters
Input Files
- (modules/porous_flow/test/tests/thm_rehbinder/free_outer.i)
- (modules/porous_flow/examples/tutorial/05.i)
- (test/tests/meshgenerators/annular_mesh_generator/annular_mesh_generator_radial_positions.i)
- (modules/porous_flow/examples/tutorial/11.i)
- (modules/porous_flow/examples/tutorial/08.i)
- (test/tests/meshgenerators/annular_mesh_generator/annular_mesh_generator_deprecated.i)
- (modules/solid_mechanics/test/tests/action/material_output_order.i)
- (modules/porous_flow/examples/tutorial/07.i)
- (modules/porous_flow/examples/tutorial/10.i)
- (modules/porous_flow/examples/tutorial/04.i)
- (modules/porous_flow/examples/tutorial/08_KT.i)
- (test/tests/meshgenerators/displaced_mesh/displaced_mesh.i)
- (modules/porous_flow/test/tests/thm_rehbinder/fixed_outer.i)
- (modules/thermal_hydraulics/test/tests/components/hs_coupler_2d3d/mesh.i)
- (modules/thermal_hydraulics/test/tests/components/hs_boundary_external_app_heat_flux/mesh.i)
- (modules/solid_mechanics/test/tests/torque/torque_small.i)
- (modules/porous_flow/examples/tutorial/05_tabulated.i)
- (modules/porous_flow/examples/tutorial/03.i)
- (test/tests/meshgenerators/annular_mesh_generator/annular_mesh_generator_negative_growth.i)
- (modules/porous_flow/examples/tutorial/00.i)
- (test/tests/meshgenerators/annular_mesh_generator/boundary_prefix_offset.i)
- (test/tests/meshgenerators/annular_mesh_generator/equal_area.i)
- (test/tests/meshgenerators/annular_mesh_generator/annular_mesh_generator.i)
- (modules/solid_mechanics/test/tests/torque/ad_torque_small.i)
- (modules/porous_flow/test/tests/aux_kernels/element_normal_2D_3D.i)
- (modules/porous_flow/examples/tutorial/06.i)
- (modules/porous_flow/examples/tutorial/06_KT.i)
- (modules/porous_flow/test/tests/aux_kernels/element_normal_1D_2D.i)
- (modules/porous_flow/examples/tutorial/01.i)
(modules/porous_flow/test/tests/thm_rehbinder/free_outer.i)
[Mesh]
[annular]
type = AnnularMeshGenerator
nr = 40
nt = 16
rmin = 0.1
rmax = 1
dmin = 0.0
dmax = 90
growth_r = 1.1
[]
[make3D]
input = annular
type = MeshExtruderGenerator
bottom_sideset = bottom
top_sideset = top
extrusion_vector = '0 0 1'
num_layers = 1
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
biot_coefficient = 1.0
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[porepressure]
[]
[temperature]
[]
[]
[BCs]
# sideset 1 = outer
# sideset 2 = cavity
# sideset 3 = ymin
# sideset 4 = xmin
[plane_strain]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'top bottom'
[]
[ymin]
type = DirichletBC
variable = disp_y
value = 0
boundary = dmin
[]
[xmin]
type = DirichletBC
variable = disp_x
value = 0
boundary = dmax
[]
[cavity_temperature]
type = DirichletBC
variable = temperature
value = 1000
boundary = rmin
[]
[cavity_porepressure]
type = DirichletBC
variable = porepressure
value = 1E6
boundary = rmin
[]
[cavity_zero_effective_stress_x]
type = Pressure
variable = disp_x
function = 1E6
boundary = rmin
use_displaced_mesh = false
[]
[cavity_zero_effective_stress_y]
type = Pressure
variable = disp_y
function = 1E6
boundary = rmin
use_displaced_mesh = false
[]
[outer_temperature]
type = DirichletBC
variable = temperature
value = 0
boundary = rmax
[]
[outer_pressure]
type = DirichletBC
variable = porepressure
value = 0
boundary = rmax
[]
[]
[AuxVariables]
[stress_rr]
family = MONOMIAL
order = CONSTANT
[]
[stress_pp]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[stress_rr]
type = RankTwoScalarAux
rank_two_tensor = stress
variable = stress_rr
scalar_type = RadialStress
point1 = '0 0 0'
point2 = '0 0 1'
[]
[stress_pp]
type = RankTwoScalarAux
rank_two_tensor = stress
variable = stress_pp
scalar_type = HoopStress
point1 = '0 0 0'
point2 = '0 0 1'
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0.0
bulk_modulus = 1E12
viscosity = 1.0E-3
density0 = 1000.0
cv = 1000.0
cp = 1000.0
porepressure_coefficient = 0.0
[]
[]
[PorousFlowBasicTHM]
coupling_type = ThermoHydroMechanical
multiply_by_density = false
add_stress_aux = true
porepressure = porepressure
temperature = temperature
eigenstrain_names = thermal_contribution
gravity = '0 0 0'
fp = the_simple_fluid
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1E10
poissons_ratio = 0.2
[]
[strain]
type = ComputeSmallStrain
eigenstrain_names = thermal_contribution
[]
[thermal_contribution]
type = ComputeThermalExpansionEigenstrain
temperature = temperature
thermal_expansion_coeff = 1E-6
eigenstrain_name = thermal_contribution
stress_free_temperature = 0.0
[]
[stress]
type = ComputeLinearElasticStress
[]
[porosity]
type = PorousFlowPorosityConst # only the initial value of this is ever used
porosity = 0.1
[]
[biot_modulus]
type = PorousFlowConstantBiotModulus
solid_bulk_compliance = 1E-10
fluid_bulk_modulus = 1E12
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
[]
[thermal_expansion]
type = PorousFlowConstantThermalExpansionCoefficient
fluid_coefficient = 1E-6
drained_coefficient = 1E-6
[]
[thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '1E6 0 0 0 1E6 0 0 0 1E6'
[]
[]
[VectorPostprocessors]
[P]
type = LineValueSampler
start_point = '0.1 0 0'
end_point = '1.0 0 0'
num_points = 10
sort_by = x
variable = porepressure
[]
[T]
type = LineValueSampler
start_point = '0.1 0 0'
end_point = '1.0 0 0'
num_points = 10
sort_by = x
variable = temperature
[]
[U]
type = LineValueSampler
start_point = '0.1 0 0'
end_point = '1.0 0 0'
num_points = 10
sort_by = x
variable = disp_x
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -snes_rtol'
petsc_options_value = 'gmres asm lu 1E-8'
[]
[]
[Executioner]
type = Steady
solve_type = Newton
[]
[Outputs]
file_base = free_outer
execute_on = timestep_end
csv = true
[]
(modules/porous_flow/examples/tutorial/05.i)
# Darcy flow with heat advection and conduction, using Water97 properties
[Mesh]
[annular]
type = AnnularMeshGenerator
nr = 10
rmin = 1.0
rmax = 10
growth_r = 1.4
nt = 4
dmin = 0
dmax = 90
[]
[make3D]
type = MeshExtruderGenerator
extrusion_vector = '0 0 12'
num_layers = 3
bottom_sideset = 'bottom'
top_sideset = 'top'
input = annular
[]
[shift_down]
type = TransformGenerator
transform = TRANSLATE
vector_value = '0 0 -6'
input = make3D
[]
[aquifer]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 -2'
top_right = '10 10 2'
input = shift_down
[]
[injection_area]
type = ParsedGenerateSideset
combinatorial_geometry = 'x*x+y*y<1.01'
included_subdomains = 1
new_sideset_name = 'injection_area'
input = 'aquifer'
[]
[rename]
type = RenameBlockGenerator
old_block = '0 1'
new_block = 'caps aquifer'
input = 'injection_area'
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[porepressure]
initial_condition = 1E6
[]
[temperature]
initial_condition = 313
scaling = 1E-8
[]
[]
[PorousFlowBasicTHM]
porepressure = porepressure
temperature = temperature
coupling_type = ThermoHydro
gravity = '0 0 0'
fp = the_simple_fluid
[]
[BCs]
[constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 2E6
boundary = injection_area
[]
[constant_injection_temperature]
type = DirichletBC
variable = temperature
value = 333
boundary = injection_area
[]
[]
[FluidProperties]
[the_simple_fluid]
type = Water97FluidProperties
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[biot_modulus]
type = PorousFlowConstantBiotModulus
biot_coefficient = 0.8
solid_bulk_compliance = 2E-7
fluid_bulk_modulus = 1E7
[]
[permeability_aquifer]
type = PorousFlowPermeabilityConst
block = aquifer
permeability = '1E-14 0 0 0 1E-14 0 0 0 1E-14'
[]
[permeability_caps]
type = PorousFlowPermeabilityConst
block = caps
permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-16'
[]
[thermal_expansion]
type = PorousFlowConstantThermalExpansionCoefficient
biot_coefficient = 0.8
drained_coefficient = 0.003
fluid_coefficient = 0.0002
[]
[rock_internal_energy]
type = PorousFlowMatrixInternalEnergy
density = 2500.0
specific_heat_capacity = 1200.0
[]
[thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '10 0 0 0 10 0 0 0 10'
block = 'caps aquifer'
[]
[]
[Preconditioning]
active = basic
[basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[]
[preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E6
dt = 1E5
nl_abs_tol = 1E-10
[]
[Outputs]
exodus = true
[]
(test/tests/meshgenerators/annular_mesh_generator/annular_mesh_generator_radial_positions.i)
[Mesh]
[./amg]
type = AnnularMeshGenerator
nt = 12
rmin = 1
rmax = 5
radial_positions = '2 4'
dmin = 45
dmax = 135
[]
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/examples/tutorial/11.i)
# Two-phase borehole injection problem
[Mesh]
[annular]
type = AnnularMeshGenerator
nr = 10
rmin = 1.0
rmax = 10
growth_r = 1.4
nt = 4
dmin = 0
dmax = 90
[]
[make3D]
input = annular
type = MeshExtruderGenerator
extrusion_vector = '0 0 12'
num_layers = 3
bottom_sideset = 'bottom'
top_sideset = 'top'
[]
[shift_down]
type = TransformGenerator
transform = TRANSLATE
vector_value = '0 0 -6'
input = make3D
[]
[aquifer]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 -2'
top_right = '10 10 2'
input = shift_down
[]
[injection_area]
type = ParsedGenerateSideset
combinatorial_geometry = 'x*x+y*y<1.01'
included_subdomains = 1
new_sideset_name = 'injection_area'
input = 'aquifer'
[]
[rename]
type = RenameBlockGenerator
old_block = '0 1'
new_block = 'caps aquifer'
input = 'injection_area'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pwater pgas T disp_x disp_y'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
alpha = 1E-6
m = 0.6
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
gravity = '0 0 0'
biot_coefficient = 1.0
PorousFlowDictator = dictator
[]
[Variables]
[pwater]
initial_condition = 20E6
[]
[pgas]
initial_condition = 20.1E6
[]
[T]
initial_condition = 330
scaling = 1E-5
[]
[disp_x]
scaling = 1E-5
[]
[disp_y]
scaling = 1E-5
[]
[]
[Kernels]
[mass_water_dot]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pwater
[]
[flux_water]
type = PorousFlowAdvectiveFlux
fluid_component = 0
use_displaced_mesh = false
variable = pwater
[]
[vol_strain_rate_water]
type = PorousFlowMassVolumetricExpansion
fluid_component = 0
variable = pwater
[]
[mass_co2_dot]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = pgas
[]
[flux_co2]
type = PorousFlowAdvectiveFlux
fluid_component = 1
use_displaced_mesh = false
variable = pgas
[]
[vol_strain_rate_co2]
type = PorousFlowMassVolumetricExpansion
fluid_component = 1
variable = pgas
[]
[energy_dot]
type = PorousFlowEnergyTimeDerivative
variable = T
[]
[advection]
type = PorousFlowHeatAdvection
use_displaced_mesh = false
variable = T
[]
[conduction]
type = PorousFlowHeatConduction
use_displaced_mesh = false
variable = T
[]
[vol_strain_rate_heat]
type = PorousFlowHeatVolumetricExpansion
variable = T
[]
[grad_stress_x]
type = StressDivergenceTensors
temperature = T
variable = disp_x
eigenstrain_names = thermal_contribution
use_displaced_mesh = false
component = 0
[]
[poro_x]
type = PorousFlowEffectiveStressCoupling
variable = disp_x
use_displaced_mesh = false
component = 0
[]
[grad_stress_y]
type = StressDivergenceTensors
temperature = T
variable = disp_y
eigenstrain_names = thermal_contribution
use_displaced_mesh = false
component = 1
[]
[poro_y]
type = PorousFlowEffectiveStressCoupling
variable = disp_y
use_displaced_mesh = false
component = 1
[]
[]
[AuxVariables]
[disp_z]
[]
[effective_fluid_pressure]
family = MONOMIAL
order = CONSTANT
[]
[mass_frac_phase0_species0]
initial_condition = 1 # all water in phase=0
[]
[mass_frac_phase1_species0]
initial_condition = 0 # no water in phase=1
[]
[sgas]
family = MONOMIAL
order = CONSTANT
[]
[swater]
family = MONOMIAL
order = CONSTANT
[]
[stress_rr]
family = MONOMIAL
order = CONSTANT
[]
[stress_tt]
family = MONOMIAL
order = CONSTANT
[]
[stress_zz]
family = MONOMIAL
order = CONSTANT
[]
[porosity]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[effective_fluid_pressure]
type = ParsedAux
coupled_variables = 'pwater pgas swater sgas'
expression = 'pwater * swater + pgas * sgas'
variable = effective_fluid_pressure
[]
[swater]
type = PorousFlowPropertyAux
variable = swater
property = saturation
phase = 0
execute_on = timestep_end
[]
[sgas]
type = PorousFlowPropertyAux
variable = sgas
property = saturation
phase = 1
execute_on = timestep_end
[]
[stress_rr]
type = RankTwoScalarAux
variable = stress_rr
rank_two_tensor = stress
scalar_type = RadialStress
point1 = '0 0 0'
point2 = '0 0 1'
execute_on = timestep_end
[]
[stress_tt]
type = RankTwoScalarAux
variable = stress_tt
rank_two_tensor = stress
scalar_type = HoopStress
point1 = '0 0 0'
point2 = '0 0 1'
execute_on = timestep_end
[]
[stress_zz]
type = RankTwoAux
variable = stress_zz
rank_two_tensor = stress
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[porosity]
type = PorousFlowPropertyAux
variable = porosity
property = porosity
execute_on = timestep_end
[]
[]
[BCs]
[roller_tmax]
type = DirichletBC
variable = disp_x
value = 0
boundary = dmax
[]
[roller_tmin]
type = DirichletBC
variable = disp_y
value = 0
boundary = dmin
[]
[pinned_top_bottom_x]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'top bottom'
[]
[pinned_top_bottom_y]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'top bottom'
[]
[cavity_pressure_x]
type = Pressure
boundary = injection_area
variable = disp_x
component = 0
postprocessor = constrained_effective_fluid_pressure_at_wellbore
use_displaced_mesh = false
[]
[cavity_pressure_y]
type = Pressure
boundary = injection_area
variable = disp_y
component = 1
postprocessor = constrained_effective_fluid_pressure_at_wellbore
use_displaced_mesh = false
[]
[cold_co2]
type = DirichletBC
boundary = injection_area
variable = T
value = 290 # injection temperature
use_displaced_mesh = false
[]
[constant_co2_injection]
type = PorousFlowSink
boundary = injection_area
variable = pgas
fluid_phase = 1
flux_function = -1E-4
use_displaced_mesh = false
[]
[outer_water_removal]
type = PorousFlowPiecewiseLinearSink
boundary = rmax
variable = pwater
fluid_phase = 0
pt_vals = '0 1E9'
multipliers = '0 1E8'
PT_shift = 20E6
use_mobility = true
use_relperm = true
use_displaced_mesh = false
[]
[outer_co2_removal]
type = PorousFlowPiecewiseLinearSink
boundary = rmax
variable = pgas
fluid_phase = 1
pt_vals = '0 1E9'
multipliers = '0 1E8'
PT_shift = 20.1E6
use_mobility = true
use_relperm = true
use_displaced_mesh = false
[]
[]
[FluidProperties]
[true_water]
type = Water97FluidProperties
[]
[tabulated_water]
type = TabulatedFluidProperties
fp = true_water
temperature_min = 275
pressure_max = 1E8
interpolated_properties = 'density viscosity enthalpy internal_energy'
fluid_property_file = water97_tabulated_11.csv
[]
[true_co2]
type = CO2FluidProperties
[]
[tabulated_co2]
type = TabulatedFluidProperties
fp = true_co2
temperature_min = 275
pressure_max = 1E8
interpolated_properties = 'density viscosity enthalpy internal_energy'
fluid_property_file = co2_tabulated_11.csv
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = T
[]
[saturation_calculator]
type = PorousFlow2PhasePP
phase0_porepressure = pwater
phase1_porepressure = pgas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'mass_frac_phase0_species0 mass_frac_phase1_species0'
[]
[water]
type = PorousFlowSingleComponentFluid
fp = tabulated_water
phase = 0
[]
[co2]
type = PorousFlowSingleComponentFluid
fp = tabulated_co2
phase = 1
[]
[relperm_water]
type = PorousFlowRelativePermeabilityCorey
n = 4
s_res = 0.1
sum_s_res = 0.2
phase = 0
[]
[relperm_co2]
type = PorousFlowRelativePermeabilityBC
nw_phase = true
lambda = 2
s_res = 0.1
sum_s_res = 0.2
phase = 1
[]
[porosity_mat]
type = PorousFlowPorosity
fluid = true
mechanical = true
thermal = true
porosity_zero = 0.1
reference_temperature = 330
reference_porepressure = 20E6
thermal_expansion_coeff = 15E-6 # volumetric
solid_bulk = 8E9 # unimportant since biot = 1
[]
[permeability_aquifer]
type = PorousFlowPermeabilityKozenyCarman
block = aquifer
poroperm_function = kozeny_carman_phi0
phi0 = 0.1
n = 2
m = 2
k0 = 1E-12
[]
[permeability_caps]
type = PorousFlowPermeabilityKozenyCarman
block = caps
poroperm_function = kozeny_carman_phi0
phi0 = 0.1
n = 2
m = 2
k0 = 1E-15
k_anisotropy = '1 0 0 0 1 0 0 0 0.1'
[]
[rock_thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '2 0 0 0 2 0 0 0 2'
[]
[rock_internal_energy]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 1100
density = 2300
[]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 5E9
poissons_ratio = 0.0
[]
[strain]
type = ComputeSmallStrain
eigenstrain_names = 'thermal_contribution initial_stress'
[]
[thermal_contribution]
type = ComputeThermalExpansionEigenstrain
temperature = T
thermal_expansion_coeff = 5E-6 # this is the linear thermal expansion coefficient
eigenstrain_name = thermal_contribution
stress_free_temperature = 330
[]
[initial_strain]
type = ComputeEigenstrainFromInitialStress
initial_stress = '20E6 0 0 0 20E6 0 0 0 20E6'
eigenstrain_name = initial_stress
[]
[stress]
type = ComputeLinearElasticStress
[]
[effective_fluid_pressure_mat]
type = PorousFlowEffectiveFluidPressure
[]
[volumetric_strain]
type = PorousFlowVolumetricStrain
[]
[]
[Postprocessors]
[effective_fluid_pressure_at_wellbore]
type = PointValue
variable = effective_fluid_pressure
point = '1 0 0'
execute_on = timestep_begin
use_displaced_mesh = false
[]
[constrained_effective_fluid_pressure_at_wellbore]
type = FunctionValuePostprocessor
function = constrain_effective_fluid_pressure
execute_on = timestep_begin
[]
[]
[Functions]
[constrain_effective_fluid_pressure]
type = ParsedFunction
symbol_names = effective_fluid_pressure_at_wellbore
symbol_values = effective_fluid_pressure_at_wellbore
expression = 'max(effective_fluid_pressure_at_wellbore, 20E6)'
[]
[]
[Preconditioning]
active = basic
[basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[]
[preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E3
[TimeStepper]
type = IterationAdaptiveDT
dt = 1E3
growth_factor = 1.2
optimal_iterations = 10
[]
nl_abs_tol = 1E-7
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/examples/tutorial/08.i)
# Unsaturated Darcy-Richards flow
[Mesh]
[annular]
type = AnnularMeshGenerator
nr = 10
rmin = 1.0
rmax = 10
growth_r = 1.4
nt = 4
dmin = 0
dmax = 90
[]
[make3D]
input = annular
type = MeshExtruderGenerator
extrusion_vector = '0 0 12'
num_layers = 3
bottom_sideset = 'bottom'
top_sideset = 'top'
[]
[shift_down]
type = TransformGenerator
transform = TRANSLATE
vector_value = '0 0 -6'
input = make3D
[]
[aquifer]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 -2'
top_right = '10 10 2'
input = shift_down
[]
[injection_area]
type = ParsedGenerateSideset
combinatorial_geometry = 'x*x+y*y<1.01'
included_subdomains = 1
new_sideset_name = 'injection_area'
input = 'aquifer'
[]
[rename]
type = RenameBlockGenerator
old_block = '0 1'
new_block = 'caps aquifer'
input = 'injection_area'
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[porepressure]
[]
[]
[PorousFlowUnsaturated]
porepressure = porepressure
coupling_type = Hydro
gravity = '0 0 0'
fp = the_simple_fluid
relative_permeability_exponent = 3
relative_permeability_type = Corey
residual_saturation = 0.1
van_genuchten_alpha = 1E-6
van_genuchten_m = 0.6
[]
[BCs]
[production]
type = PorousFlowSink
variable = porepressure
fluid_phase = 0
flux_function = 1E-2
use_relperm = true
boundary = injection_area
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
viscosity = 1.0E-3
density0 = 1000.0
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[permeability_aquifer]
type = PorousFlowPermeabilityConst
block = aquifer
permeability = '1E-14 0 0 0 1E-14 0 0 0 1E-14'
[]
[permeability_caps]
type = PorousFlowPermeabilityConst
block = caps
permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-16'
[]
[]
[Preconditioning]
active = basic
[basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[]
[preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E6
dt = 1E5
nl_abs_tol = 1E-7
[]
[Outputs]
exodus = true
[]
(test/tests/meshgenerators/annular_mesh_generator/annular_mesh_generator_deprecated.i)
[Mesh]
[./amg]
type = AnnularMeshGenerator
nr = 10
nt = 12
rmin = 1
rmax = 5
tmin = 0.785398163
tmax = 2.356194490
growth_r = 1.3
[]
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/action/material_output_order.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
origin = '0 0 2'
direction = '0 0 1'
polar_moment_of_inertia = pmi
factor = t
[]
[Mesh]
[ring]
type = AnnularMeshGenerator
nr = 1
nt = 30
rmin = 0.95
rmax = 1
[]
[extrude]
type = MeshExtruderGenerator
input = ring
extrusion_vector = '0 0 2'
bottom_sideset = 'bottom'
top_sideset = 'top'
num_layers = 5
[]
[]
[AuxVariables]
[alpha_var]
[]
[shear_stress_var]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[alpha]
type = RotationAngle
variable = alpha_var
[]
[shear_stress]
type = ParsedAux
variable = shear_stress_var
coupled_variables = 'stress_yz stress_xz'
expression = 'sqrt(stress_yz^2 + stress_xz^2)'
[]
[]
[BCs]
# fix bottom
[fix_x]
type = DirichletBC
boundary = bottom
variable = disp_x
value = 0
[]
[fix_y]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0
[]
[fix_z]
type = DirichletBC
boundary = bottom
variable = disp_z
value = 0
[]
# twist top
[twist_x]
type = Torque
boundary = top
variable = disp_x
[]
[twist_y]
type = Torque
boundary = top
variable = disp_y
[]
[twist_z]
type = Torque
boundary = top
variable = disp_z
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = SMALL
generate_output = 'vonmises_stress stress_yz stress_xz'
[]
[]
[Postprocessors]
[pmi]
type = PolarMomentOfInertia
boundary = top
# execute_on = 'INITIAL NONLINEAR'
execute_on = 'INITIAL'
[]
[alpha]
type = SideAverageValue
variable = alpha_var
boundary = top
[]
[shear_stress]
type = ElementAverageValue
variable = shear_stress_var
[]
[]
[Materials]
[stress]
type = ComputeLinearElasticStress
[]
[elastic]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 0.3
shear_modulus = 100
[]
[]
[Executioner]
# type = Steady
type = Transient
num_steps = 1
solve_type = PJFNK
petsc_options_iname = '-pctype'
petsc_options_value = 'lu'
nl_max_its = 150
[]
[Outputs]
exodus = true
print_linear_residuals = false
perf_graph = true
[]
(modules/porous_flow/examples/tutorial/07.i)
# Darcy flow with a tracer that precipitates causing mineralisation and porosity changes and permeability changes
[Mesh]
[annular]
type = AnnularMeshGenerator
nr = 10
rmin = 1.0
rmax = 10
growth_r = 1.4
nt = 4
dmin = 0
dmax = 90
[]
[make3D]
input = annular
type = MeshExtruderGenerator
extrusion_vector = '0 0 12'
num_layers = 3
bottom_sideset = 'bottom'
top_sideset = 'top'
[]
[shift_down]
type = TransformGenerator
transform = TRANSLATE
vector_value = '0 0 -6'
input = make3D
[]
[aquifer]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 -2'
top_right = '10 10 2'
input = shift_down
[]
[injection_area]
type = ParsedGenerateSideset
combinatorial_geometry = 'x*x+y*y<1.01'
included_subdomains = 1
new_sideset_name = 'injection_area'
input = 'aquifer'
[]
[rename]
type = RenameBlockGenerator
old_block = '0 1'
new_block = 'caps aquifer'
input = 'injection_area'
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[porepressure]
[]
[tracer_concentration]
[]
[]
[PorousFlowFullySaturated]
porepressure = porepressure
coupling_type = Hydro
gravity = '0 0 0'
fp = the_simple_fluid
mass_fraction_vars = tracer_concentration
number_aqueous_kinetic = 1
temperature = 283.0
stabilization = none # Note to reader: try this with other stabilization and compare the results
[]
[AuxVariables]
[eqm_k]
initial_condition = 0.1
[]
[mineral_conc]
family = MONOMIAL
order = CONSTANT
[]
[initial_and_reference_conc]
initial_condition = 0
[]
[porosity]
family = MONOMIAL
order = CONSTANT
[]
[permeability]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[mineral_conc]
type = PorousFlowPropertyAux
property = mineral_concentration
mineral_species = 0
variable = mineral_conc
[]
[porosity]
type = PorousFlowPropertyAux
property = porosity
variable = porosity
[]
[permeability]
type = PorousFlowPropertyAux
property = permeability
column = 0
row = 0
variable = permeability
[]
[]
[Kernels]
[precipitation_dissolution]
type = PorousFlowPreDis
mineral_density = 1000.0
stoichiometry = 1
variable = tracer_concentration
[]
[]
[BCs]
[constant_injection_of_tracer]
type = PorousFlowSink
variable = tracer_concentration
flux_function = -5E-3
boundary = injection_area
[]
[constant_outer_porepressure]
type = DirichletBC
variable = porepressure
value = 0
boundary = rmax
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
viscosity = 1.0E-3
density0 = 1000.0
[]
[]
[Materials]
[porosity_mat]
type = PorousFlowPorosity
porosity_zero = 0.1
chemical = true
initial_mineral_concentrations = initial_and_reference_conc
reference_chemistry = initial_and_reference_conc
[]
[permeability_aquifer]
type = PorousFlowPermeabilityKozenyCarman
block = aquifer
k0 = 1E-14
m = 2
n = 3
phi0 = 0.1
poroperm_function = kozeny_carman_phi0
[]
[permeability_caps]
type = PorousFlowPermeabilityKozenyCarman
block = caps
k0 = 1E-15
k_anisotropy = '1 0 0 0 1 0 0 0 0.1'
m = 2
n = 3
phi0 = 0.1
poroperm_function = kozeny_carman_phi0
[]
[precipitation_dissolution_mat]
type = PorousFlowAqueousPreDisChemistry
reference_temperature = 283.0
activation_energy = 1 # irrelevant because T=Tref
equilibrium_constants = eqm_k # equilibrium tracer concentration
kinetic_rate_constant = 1E-8
molar_volume = 1
num_reactions = 1
primary_activity_coefficients = 1
primary_concentrations = tracer_concentration
reactions = 1
specific_reactive_surface_area = 1
[]
[mineral_concentration]
type = PorousFlowAqueousPreDisMineral
[]
[]
[Preconditioning]
active = basic
[basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[]
[preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E6
dt = 1E5
nl_abs_tol = 1E-10
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/examples/tutorial/10.i)
# Unsaturated Darcy-Richards flow without using an Action
[Mesh]
[annular]
type = AnnularMeshGenerator
nr = 10
rmin = 1.0
rmax = 10
growth_r = 1.4
nt = 4
dmin = 0
dmax = 90
[]
[make3D]
input = annular
type = MeshExtruderGenerator
extrusion_vector = '0 0 12'
num_layers = 3
bottom_sideset = 'bottom'
top_sideset = 'top'
[]
[shift_down]
type = TransformGenerator
transform = TRANSLATE
vector_value = '0 0 -6'
input = make3D
[]
[aquifer]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 -2'
top_right = '10 10 2'
input = shift_down
[]
[injection_area]
type = ParsedGenerateSideset
combinatorial_geometry = 'x*x+y*y<1.01'
included_subdomains = 1
new_sideset_name = 'injection_area'
input = 'aquifer'
[]
[rename]
type = RenameBlockGenerator
old_block = '0 1'
new_block = 'caps aquifer'
input = 'injection_area'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = pp
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
alpha = 1E-6
m = 0.6
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pp]
[]
[]
[Kernels]
[time_derivative]
type = PorousFlowMassTimeDerivative
variable = pp
[]
[flux]
type = PorousFlowAdvectiveFlux
variable = pp
gravity = '0 0 0'
[]
[]
[AuxVariables]
[sat]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[saturation]
type = PorousFlowPropertyAux
variable = sat
property = saturation
[]
[]
[BCs]
[production]
type = PorousFlowSink
variable = pp
fluid_phase = 0
flux_function = 1E-2
use_relperm = true
boundary = injection_area
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
viscosity = 1.0E-3
density0 = 1000.0
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[permeability_aquifer]
type = PorousFlowPermeabilityConst
block = aquifer
permeability = '1E-14 0 0 0 1E-14 0 0 0 1E-14'
[]
[permeability_caps]
type = PorousFlowPermeabilityConst
block = caps
permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-16'
[]
[saturation_calculator]
type = PorousFlow1PhaseP
porepressure = pp
capillary_pressure = pc
[]
[temperature]
type = PorousFlowTemperature
temperature = 293
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = the_simple_fluid
phase = 0
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 3
s_res = 0.1
sum_s_res = 0.1
phase = 0
[]
[]
[Preconditioning]
active = basic
[basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[]
[preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E6
dt = 1E5
nl_abs_tol = 1E-7
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/examples/tutorial/04.i)
# Darcy flow with heat advection and conduction, and elasticity
[Mesh]
[annular]
type = AnnularMeshGenerator
nr = 10
rmin = 1.0
rmax = 10
growth_r = 1.4
nt = 4
dmin = 0
dmax = 90
[]
[make3D]
type = MeshExtruderGenerator
extrusion_vector = '0 0 12'
num_layers = 3
bottom_sideset = 'bottom'
top_sideset = 'top'
input = annular
[]
[shift_down]
type = TransformGenerator
transform = TRANSLATE
vector_value = '0 0 -6'
input = make3D
[]
[aquifer]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 -2'
top_right = '10 10 2'
input = shift_down
[]
[injection_area]
type = ParsedGenerateSideset
combinatorial_geometry = 'x*x+y*y<1.01'
included_subdomains = 1
new_sideset_name = 'injection_area'
input = 'aquifer'
[]
[rename]
type = RenameBlockGenerator
old_block = '0 1'
new_block = 'caps aquifer'
input = 'injection_area'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
biot_coefficient = 1.0
[]
[Variables]
[porepressure]
[]
[temperature]
initial_condition = 293
scaling = 1E-8
[]
[disp_x]
scaling = 1E-10
[]
[disp_y]
scaling = 1E-10
[]
[disp_z]
scaling = 1E-10
[]
[]
[PorousFlowBasicTHM]
porepressure = porepressure
temperature = temperature
coupling_type = ThermoHydroMechanical
gravity = '0 0 0'
fp = the_simple_fluid
eigenstrain_names = thermal_contribution
use_displaced_mesh = false
[]
[BCs]
[constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1E6
boundary = injection_area
[]
[constant_injection_temperature]
type = DirichletBC
variable = temperature
value = 313
boundary = injection_area
[]
[roller_tmax]
type = DirichletBC
variable = disp_x
value = 0
boundary = dmax
[]
[roller_tmin]
type = DirichletBC
variable = disp_y
value = 0
boundary = dmin
[]
[roller_top_bottom]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'top bottom'
[]
[cavity_pressure_x]
type = Pressure
boundary = injection_area
variable = disp_x
component = 0
factor = 1E6
use_displaced_mesh = false
[]
[cavity_pressure_y]
type = Pressure
boundary = injection_area
variable = disp_y
component = 1
factor = 1E6
use_displaced_mesh = false
[]
[]
[AuxVariables]
[stress_rr]
family = MONOMIAL
order = CONSTANT
[]
[stress_pp]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[stress_rr]
type = RankTwoScalarAux
rank_two_tensor = stress
variable = stress_rr
scalar_type = RadialStress
point1 = '0 0 0'
point2 = '0 0 1'
[]
[stress_pp]
type = RankTwoScalarAux
rank_two_tensor = stress
variable = stress_pp
scalar_type = HoopStress
point1 = '0 0 0'
point2 = '0 0 1'
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
viscosity = 1.0E-3
density0 = 1000.0
thermal_expansion = 0.0002
cp = 4194
cv = 4186
porepressure_coefficient = 0
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[biot_modulus]
type = PorousFlowConstantBiotModulus
solid_bulk_compliance = 2E-7
fluid_bulk_modulus = 1E7
[]
[permeability_aquifer]
type = PorousFlowPermeabilityConst
block = aquifer
permeability = '1E-14 0 0 0 1E-14 0 0 0 1E-14'
[]
[permeability_caps]
type = PorousFlowPermeabilityConst
block = caps
permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-16'
[]
[thermal_expansion]
type = PorousFlowConstantThermalExpansionCoefficient
drained_coefficient = 0.003
fluid_coefficient = 0.0002
[]
[rock_internal_energy]
type = PorousFlowMatrixInternalEnergy
density = 2500.0
specific_heat_capacity = 1200.0
[]
[thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '10 0 0 0 10 0 0 0 10'
block = 'caps aquifer'
[]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 5E9
poissons_ratio = 0.0
[]
[strain]
type = ComputeSmallStrain
eigenstrain_names = thermal_contribution
[]
[thermal_contribution]
type = ComputeThermalExpansionEigenstrain
temperature = temperature
thermal_expansion_coeff = 0.001 # this is the linear thermal expansion coefficient
eigenstrain_name = thermal_contribution
stress_free_temperature = 293
[]
[stress]
type = ComputeLinearElasticStress
[]
[]
[Preconditioning]
active = basic
[basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[]
[preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E6
dt = 1E5
nl_abs_tol = 1E-15
nl_rel_tol = 1E-14
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/examples/tutorial/08_KT.i)
# Unsaturated Darcy-Richards flow
[Mesh]
[annular]
type = AnnularMeshGenerator
nr = 10
rmin = 1.0
rmax = 10
growth_r = 1.4
nt = 4
dmin = 0
dmax = 90
[]
[make3D]
input = annular
type = MeshExtruderGenerator
extrusion_vector = '0 0 12'
num_layers = 3
bottom_sideset = 'bottom'
top_sideset = 'top'
[]
[shift_down]
type = TransformGenerator
transform = TRANSLATE
vector_value = '0 0 -6'
input = make3D
[]
[aquifer]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 -2'
top_right = '10 10 2'
input = shift_down
[]
[injection_area]
type = ParsedGenerateSideset
combinatorial_geometry = 'x*x+y*y<1.01'
included_subdomains = 1
new_sideset_name = 'injection_area'
input = 'aquifer'
[]
[rename]
type = RenameBlockGenerator
old_block = '0 1'
new_block = 'caps aquifer'
input = 'injection_area'
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[porepressure]
[]
[]
[PorousFlowUnsaturated]
porepressure = porepressure
coupling_type = Hydro
gravity = '0 0 0'
fp = the_simple_fluid
relative_permeability_exponent = 3
relative_permeability_type = Corey
residual_saturation = 0.1
van_genuchten_alpha = 1E-6
van_genuchten_m = 0.6
stabilization = KT
flux_limiter_type = None
[]
[BCs]
[production]
type = PorousFlowSink
variable = porepressure
fluid_phase = 0
flux_function = 1E-2
use_relperm = true
boundary = injection_area
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
viscosity = 1.0E-3
density0 = 1000.0
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[permeability_aquifer]
type = PorousFlowPermeabilityConst
block = aquifer
permeability = '1E-14 0 0 0 1E-14 0 0 0 1E-14'
[]
[permeability_caps]
type = PorousFlowPermeabilityConst
block = caps
permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-16'
[]
[]
[Preconditioning]
active = basic
[basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[]
[preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E5
dt = 1E5
nl_rel_tol = 1E-14
[]
[Outputs]
exodus = true
[]
(test/tests/meshgenerators/displaced_mesh/displaced_mesh.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[./mg]
type = AnnularMeshGenerator
rmin = 1.0
rmax = 2.0
nt = 20
[]
[]
(modules/porous_flow/test/tests/thm_rehbinder/fixed_outer.i)
[Mesh]
[annular]
type = AnnularMeshGenerator
nr = 40
nt = 16
rmin = 0.1
rmax = 1
dmin = 0.0
dmax = 90
growth_r = 1.1
[]
[make3D]
input = annular
type = MeshExtruderGenerator
bottom_sideset = bottom
top_sideset = top
extrusion_vector = '0 0 1'
num_layers = 1
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
biot_coefficient = 1.0
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[porepressure]
[]
[temperature]
[]
[]
[BCs]
[plane_strain]
type = DirichletBC
variable = disp_z
value = 0
boundary = 'top bottom'
[]
[ymin]
type = DirichletBC
variable = disp_y
value = 0
boundary = dmin
[]
[xmin]
type = DirichletBC
variable = disp_x
value = 0
boundary = dmax
[]
[cavity_temperature]
type = DirichletBC
variable = temperature
value = 1000
boundary = rmin
[]
[cavity_porepressure]
type = DirichletBC
variable = porepressure
value = 1E6
boundary = rmin
[]
[cavity_zero_effective_stress_x]
type = Pressure
variable = disp_x
function = 1E6
boundary = rmin
use_displaced_mesh = false
[]
[cavity_zero_effective_stress_y]
type = Pressure
variable = disp_y
function = 1E6
boundary = rmin
use_displaced_mesh = false
[]
[outer_temperature]
type = DirichletBC
variable = temperature
value = 0
boundary = rmax
[]
[outer_pressure]
type = DirichletBC
variable = porepressure
value = 0
boundary = rmax
[]
[fixed_outer_x]
type = DirichletBC
variable = disp_x
value = 0
boundary = rmax
[]
[fixed_outer_y]
type = DirichletBC
variable = disp_y
value = 0
boundary = rmax
[]
[]
[AuxVariables]
[stress_rr]
family = MONOMIAL
order = CONSTANT
[]
[stress_pp]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[stress_rr]
type = RankTwoScalarAux
rank_two_tensor = stress
variable = stress_rr
scalar_type = RadialStress
point1 = '0 0 0'
point2 = '0 0 1'
[]
[stress_pp]
type = RankTwoScalarAux
rank_two_tensor = stress
variable = stress_pp
scalar_type = HoopStress
point1 = '0 0 0'
point2 = '0 0 1'
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0.0
bulk_modulus = 1E12
viscosity = 1.0E-3
density0 = 1000.0
cv = 1000.0
cp = 1000.0
porepressure_coefficient = 0.0
[]
[]
[PorousFlowBasicTHM]
coupling_type = ThermoHydroMechanical
multiply_by_density = false
add_stress_aux = true
porepressure = porepressure
temperature = temperature
eigenstrain_names = thermal_contribution
gravity = '0 0 0'
fp = the_simple_fluid
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1E10
poissons_ratio = 0.2
[]
[strain]
type = ComputeSmallStrain
eigenstrain_names = thermal_contribution
[]
[thermal_contribution]
type = ComputeThermalExpansionEigenstrain
temperature = temperature
thermal_expansion_coeff = 1E-6
eigenstrain_name = thermal_contribution
stress_free_temperature = 0.0
[]
[stress]
type = ComputeLinearElasticStress
[]
[porosity]
type = PorousFlowPorosityConst # only the initial value of this is ever used
porosity = 0.1
[]
[biot_modulus]
type = PorousFlowConstantBiotModulus
solid_bulk_compliance = 1E-10
fluid_bulk_modulus = 1E12
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
[]
[thermal_expansion]
type = PorousFlowConstantThermalExpansionCoefficient
fluid_coefficient = 1E-6
drained_coefficient = 1E-6
[]
[thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '1E6 0 0 0 1E6 0 0 0 1E6'
[]
[]
[VectorPostprocessors]
[P]
type = LineValueSampler
start_point = '0.1 0 0'
end_point = '1.0 0 0'
num_points = 10
sort_by = x
variable = porepressure
[]
[T]
type = LineValueSampler
start_point = '0.1 0 0'
end_point = '1.0 0 0'
num_points = 10
sort_by = x
variable = temperature
[]
[U]
type = LineValueSampler
start_point = '0.1 0 0'
end_point = '1.0 0 0'
num_points = 10
sort_by = x
variable = disp_x
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -sub_pc_type -snes_rtol'
petsc_options_value = 'gmres asm lu 1E-8'
[]
[]
[Executioner]
type = Steady
solve_type = Newton
[]
[Outputs]
file_base = fixed_outer
execute_on = timestep_end
csv = true
[]
(modules/thermal_hydraulics/test/tests/components/hs_coupler_2d3d/mesh.i)
# Generates meshes used by hs_coupler_2d3d.i.
#
# Run as
# myapp-opt -i mesh.i --mesh-only mesh.e
# to build the standard mesh and for the fine mesh change "n_elems_azimuthal"
# to "13" and run as
# myapp-opt -i mesh.i --mesh-only mesh_fine.e
R_inner = 0.005
R_outer = 0.01
length = 0.5
n_elems_axial = 10
n_elems_radial = 5
n_elems_azimuthal = 10
[Mesh]
[ring]
type = AnnularMeshGenerator
nr = ${n_elems_radial}
nt = ${n_elems_azimuthal}
rmin = ${R_inner}
rmax = ${R_outer}
[]
[extrude]
type = AdvancedExtruderGenerator
input = ring
heights = ${length}
num_layers = ${n_elems_axial}
direction = '0 0 1'
[]
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/test/tests/components/hs_boundary_external_app_heat_flux/mesh.i)
# Generates a mesh to be used by main.i. Run with --mesh-only:
#
# thermal_hydraulics-opt -i mesh.i --mesh-only mesh.e
length = 5.0
inner_radius = 0.01
outer_radius = 0.02
n_elems_axial = 10
n_elems_radial = 5
n_elems_azimuthal = 10
[Mesh]
[annular]
type = AnnularMeshGenerator
nr = ${n_elems_radial}
nt = ${n_elems_azimuthal}
rmin = ${inner_radius}
rmax = ${outer_radius}
growth_r = 1.0
[]
[extruder]
type = AdvancedExtruderGenerator
input = annular
heights = '${length}'
num_layers = '${n_elems_axial}'
direction = '0 0 1'
[]
[rename_boundary]
type = RenameBoundaryGenerator
input = extruder
old_boundary = '0'
new_boundary = 'inner'
[]
[]
(modules/solid_mechanics/test/tests/torque/torque_small.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
origin = '0 0 2'
direction = '0 0 1'
polar_moment_of_inertia = pmi
factor = t
[]
[Mesh]
[ring]
type = AnnularMeshGenerator
nr = 1
nt = 30
rmin = 0.95
rmax = 1
[]
[extrude]
type = MeshExtruderGenerator
input = ring
extrusion_vector = '0 0 2'
bottom_sideset = 'bottom'
top_sideset = 'top'
num_layers = 5
[]
[]
[AuxVariables]
[alpha_var]
[]
[shear_stress_var]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[alpha]
type = RotationAngle
variable = alpha_var
[]
[shear_stress]
type = ParsedAux
variable = shear_stress_var
coupled_variables = 'stress_yz stress_xz'
expression = 'sqrt(stress_yz^2 + stress_xz^2)'
[]
[]
[BCs]
# fix bottom
[fix_x]
type = DirichletBC
boundary = bottom
variable = disp_x
value = 0
[]
[fix_y]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0
[]
[fix_z]
type = DirichletBC
boundary = bottom
variable = disp_z
value = 0
[]
# twist top
[twist_x]
type = Torque
boundary = top
variable = disp_x
[]
[twist_y]
type = Torque
boundary = top
variable = disp_y
[]
[twist_z]
type = Torque
boundary = top
variable = disp_z
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = SMALL
generate_output = 'vonmises_stress stress_yz stress_xz'
[]
[]
[Postprocessors]
[pmi]
type = PolarMomentOfInertia
boundary = top
# execute_on = 'INITIAL NONLINEAR'
execute_on = 'INITIAL'
[]
[alpha]
type = SideAverageValue
variable = alpha_var
boundary = top
[]
[shear_stress]
type = ElementAverageValue
variable = shear_stress_var
[]
[]
[Materials]
[stress]
type = ComputeLinearElasticStress
[]
[elastic]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 0.3
shear_modulus = 100
[]
[]
[Executioner]
# type = Steady
type = Transient
num_steps = 1
solve_type = PJFNK
petsc_options_iname = '-pctype'
petsc_options_value = 'lu'
nl_max_its = 150
[]
[Outputs]
exodus = true
print_linear_residuals = false
perf_graph = true
[]
(modules/porous_flow/examples/tutorial/05_tabulated.i)
# Darcy flow with heat advection and conduction, using Water97 properties
[Mesh]
[annular]
type = AnnularMeshGenerator
nr = 10
rmin = 1.0
rmax = 10
growth_r = 1.4
nt = 4
dmin = 0
dmax = 90
[]
[make3D]
type = MeshExtruderGenerator
extrusion_vector = '0 0 12'
num_layers = 3
bottom_sideset = 'bottom'
top_sideset = 'top'
input = annular
[]
[shift_down]
type = TransformGenerator
transform = TRANSLATE
vector_value = '0 0 -6'
input = make3D
[]
[aquifer]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 -2'
top_right = '10 10 2'
input = shift_down
[]
[injection_area]
type = ParsedGenerateSideset
combinatorial_geometry = 'x*x+y*y<1.01'
included_subdomains = 1
new_sideset_name = 'injection_area'
input = 'aquifer'
[]
[rename]
type = RenameBlockGenerator
old_block = '0 1'
new_block = 'caps aquifer'
input = 'injection_area'
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[porepressure]
initial_condition = 1E6
[]
[temperature]
initial_condition = 313
scaling = 1E-8
[]
[]
[PorousFlowBasicTHM]
porepressure = porepressure
temperature = temperature
coupling_type = ThermoHydro
gravity = '0 0 0'
fp = tabulated_water
[]
[BCs]
[constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 2E6
boundary = injection_area
[]
[constant_injection_temperature]
type = DirichletBC
variable = temperature
value = 333
boundary = injection_area
[]
[]
[FluidProperties]
[true_water]
type = Water97FluidProperties
[]
[tabulated_water]
type = TabulatedFluidProperties
fp = true_water
temperature_min = 275
interpolated_properties = 'density viscosity enthalpy internal_energy'
fluid_property_file = water97_tabulated.csv
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[biot_modulus]
type = PorousFlowConstantBiotModulus
biot_coefficient = 0.8
solid_bulk_compliance = 2E-7
fluid_bulk_modulus = 1E7
[]
[permeability_aquifer]
type = PorousFlowPermeabilityConst
block = aquifer
permeability = '1E-14 0 0 0 1E-14 0 0 0 1E-14'
[]
[permeability_caps]
type = PorousFlowPermeabilityConst
block = caps
permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-16'
[]
[thermal_expansion]
type = PorousFlowConstantThermalExpansionCoefficient
biot_coefficient = 0.8
drained_coefficient = 0.003
fluid_coefficient = 0.0002
[]
[rock_internal_energy]
type = PorousFlowMatrixInternalEnergy
density = 2500.0
specific_heat_capacity = 1200.0
[]
[thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '10 0 0 0 10 0 0 0 10'
block = 'caps aquifer'
[]
[]
[Preconditioning]
active = basic
[basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[]
[preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E6
dt = 1E5
nl_abs_tol = 1E-10
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/examples/tutorial/03.i)
# Darcy flow with heat advection and conduction
[Mesh]
[annular]
type = AnnularMeshGenerator
nr = 10
rmin = 1.0
rmax = 10
growth_r = 1.4
nt = 4
dmin = 0
dmax = 90
[]
[make3D]
type = MeshExtruderGenerator
extrusion_vector = '0 0 12'
num_layers = 3
bottom_sideset = 'bottom'
top_sideset = 'top'
input = annular
[]
[shift_down]
type = TransformGenerator
transform = TRANSLATE
vector_value = '0 0 -6'
input = make3D
[]
[aquifer]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 -2'
top_right = '10 10 2'
input = shift_down
[]
[injection_area]
type = ParsedGenerateSideset
combinatorial_geometry = 'x*x+y*y<1.01'
included_subdomains = 1
new_sideset_name = 'injection_area'
input = 'aquifer'
[]
[rename]
type = RenameBlockGenerator
old_block = '0 1'
new_block = 'caps aquifer'
input = 'injection_area'
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[porepressure]
[]
[temperature]
initial_condition = 293
scaling = 1E-8
[]
[]
[PorousFlowBasicTHM]
porepressure = porepressure
temperature = temperature
coupling_type = ThermoHydro
gravity = '0 0 0'
fp = the_simple_fluid
[]
[BCs]
[constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1E6
boundary = injection_area
[]
[constant_injection_temperature]
type = DirichletBC
variable = temperature
value = 313
boundary = injection_area
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
viscosity = 1.0E-3
density0 = 1000.0
thermal_expansion = 0.0002
cp = 4194
cv = 4186
porepressure_coefficient = 0
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[biot_modulus]
type = PorousFlowConstantBiotModulus
biot_coefficient = 0.8
solid_bulk_compliance = 2E-7
fluid_bulk_modulus = 1E7
[]
[permeability_aquifer]
type = PorousFlowPermeabilityConst
block = aquifer
permeability = '1E-14 0 0 0 1E-14 0 0 0 1E-14'
[]
[permeability_caps]
type = PorousFlowPermeabilityConst
block = caps
permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-16'
[]
[thermal_expansion]
type = PorousFlowConstantThermalExpansionCoefficient
biot_coefficient = 0.8
drained_coefficient = 0.003
fluid_coefficient = 0.0002
[]
[rock_internal_energy]
type = PorousFlowMatrixInternalEnergy
density = 2500.0
specific_heat_capacity = 1200.0
[]
[thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '10 0 0 0 10 0 0 0 10'
block = 'caps aquifer'
[]
[]
[Preconditioning]
active = basic
[basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[]
[preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E6
dt = 1E5
nl_abs_tol = 1E-10
[]
[Outputs]
exodus = true
[]
(test/tests/meshgenerators/annular_mesh_generator/annular_mesh_generator_negative_growth.i)
[Mesh]
[./amg]
type = AnnularMeshGenerator
nr = 10
nt = 12
rmin = 1
rmax = 5
dmin = 45
dmax = 135
growth_r = -1.3
[]
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/examples/tutorial/00.i)
# Creates the mesh for the remainder of the tutorial
[Mesh]
[annular]
type = AnnularMeshGenerator
nr = 10
rmin = 1.0
rmax = 10
growth_r = 1.4
nt = 4
dmin = 0
dmax = 90
[]
[make3D]
type = MeshExtruderGenerator
extrusion_vector = '0 0 12'
num_layers = 3
bottom_sideset = 'bottom'
top_sideset = 'top'
input = annular
[]
[shift_down]
type = TransformGenerator
transform = TRANSLATE
vector_value = '0 0 -6'
input = make3D
[]
[aquifer]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 -2'
top_right = '10 10 2'
input = shift_down
[]
[injection_area]
type = ParsedGenerateSideset
combinatorial_geometry = 'x*x+y*y<1.01'
included_subdomains = 1
new_sideset_name = 'injection_area'
input = 'aquifer'
[]
[rename]
type = RenameBlockGenerator
old_block = '0 1'
new_block = 'caps aquifer'
input = 'injection_area'
[]
[]
[Variables]
[dummy_var]
[]
[]
[Kernels]
[dummy_diffusion]
type = Diffusion
variable = dummy_var
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
file_base = 3D_mesh
exodus = true
[]
(test/tests/meshgenerators/annular_mesh_generator/boundary_prefix_offset.i)
[Mesh]
[amg]
type = AnnularMeshGenerator
nt = 12
rmin = 1
rmax = 5
dmin = 45
dmax = 135
boundary_id_offset = 7
boundary_name_prefix = bunga
[]
[rename]
type = RenameBoundaryGenerator
input = amg
old_boundary = '7 bunga_rmax'
new_boundary = 'little_john khan'
[]
[]
[Outputs]
exodus = true
[]
(test/tests/meshgenerators/annular_mesh_generator/equal_area.i)
[Mesh]
[amg]
type = AnnularMeshGenerator
nt = 12
rmin = 1
rmax = 5
dmin = 45
dmax = 135
equal_area = true
[]
[]
[Outputs]
exodus = true
[]
(test/tests/meshgenerators/annular_mesh_generator/annular_mesh_generator.i)
[Mesh]
[./amg]
type = AnnularMeshGenerator
nr = 10
nt = 12
rmin = 1
rmax = 5
dmin = 45
dmax = 135
growth_r = 1.3
[]
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/torque/ad_torque_small.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
origin = '0 0 2'
direction = '0 0 1'
polar_moment_of_inertia = pmi
factor = t
[]
[Mesh]
[ring]
type = AnnularMeshGenerator
nr = 1
nt = 30
rmin = 0.95
rmax = 1
[]
[extrude]
type = MeshExtruderGenerator
input = ring
extrusion_vector = '0 0 2'
bottom_sideset = 'bottom'
top_sideset = 'top'
num_layers = 5
[]
[]
[AuxVariables]
[alpha_var]
[]
[shear_stress_var]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[alpha]
type = RotationAngle
variable = alpha_var
[]
[shear_stress]
type = ParsedAux
variable = shear_stress_var
coupled_variables = 'stress_yz stress_xz'
expression = 'sqrt(stress_yz^2 + stress_xz^2)'
[]
[]
[BCs]
# fix bottom
[fix_x]
type = DirichletBC
boundary = bottom
variable = disp_x
value = 0
[]
[fix_y]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0
[]
[fix_z]
type = DirichletBC
boundary = bottom
variable = disp_z
value = 0
[]
# twist top
[twist_x]
type = ADTorque
boundary = top
variable = disp_x
[]
[twist_y]
type = ADTorque
boundary = top
variable = disp_y
[]
[twist_z]
type = ADTorque
boundary = top
variable = disp_z
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = SMALL
use_automatic_differentiation = true
generate_output = 'vonmises_stress stress_yz stress_xz'
[]
[]
[Postprocessors]
[pmi]
type = PolarMomentOfInertia
boundary = top
# execute_on = 'INITIAL NONLINEAR'
execute_on = 'INITIAL'
[]
[alpha]
type = SideAverageValue
variable = alpha_var
boundary = top
[]
[shear_stress]
type = ElementAverageValue
variable = shear_stress_var
[]
[]
[Materials]
[stress]
type = ADComputeLinearElasticStress
[]
[elastic]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 0.3
shear_modulus = 100
[]
[]
[Executioner]
# type = Steady
type = Transient
num_steps = 1
solve_type = NEWTON
petsc_options_iname = '-pctype'
petsc_options_value = 'lu'
nl_max_its = 150
[]
[Outputs]
exodus = true
print_linear_residuals = false
perf_graph = true
[]
(modules/porous_flow/test/tests/aux_kernels/element_normal_2D_3D.i)
# The PorousFlowElementNormal is used to calculate normal directions
[Mesh]
[base]
type = AnnularMeshGenerator
dmax = 90
nr = 1
nt = 1
rmin = 0.1
rmax = 1
[]
[make3D]
type = MeshExtruderGenerator
input = base
bottom_sideset = bottom
extrusion_vector = '0 0 1'
top_sideset = top
[]
[rmax_block]
type = LowerDBlockFromSidesetGenerator
input = make3D
sidesets = rmax
new_block_name = rmax
[]
[top_block]
type = LowerDBlockFromSidesetGenerator
input = rmax_block
sidesets = top
new_block_name = top
[]
[]
[Variables]
[dummy]
[]
[]
[Kernels]
[dummy]
type = Diffusion
variable = dummy
[]
[]
[AuxVariables]
[nx]
family = MONOMIAL
order = CONSTANT
[]
[ny]
family = MONOMIAL
order = CONSTANT
[]
[nz]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[nx]
type = PorousFlowElementNormal
variable = nx
component = x
3D_default = '-3 4 5'
[]
[ny]
type = PorousFlowElementNormal
variable = ny
component = y
3D_default = '-3 4 5'
[]
[nz]
type = PorousFlowElementNormal
variable = nz
component = z
3D_default = '-3 4 5'
[]
[]
[Postprocessors]
[n3Dx]
type = ElementAverageValue
variable = nx
block = 0
[]
[n3Dy]
type = ElementAverageValue
variable = ny
block = 0
[]
[n3Dz]
type = ElementAverageValue
variable = nz
block = 0
[]
[nrmaxx]
type = ElementAverageValue
variable = nx
block = rmax
[]
[nrmaxy]
type = ElementAverageValue
variable = ny
block = rmax
[]
[nrmaxz]
type = ElementAverageValue
variable = nz
block = rmax
[]
[ntopx]
type = ElementAverageValue
variable = nx
block = top
[]
[ntopy]
type = ElementAverageValue
variable = ny
block = top
[]
[ntopz]
type = ElementAverageValue
variable = nz
block = top
[]
[]
[Executioner]
type = Transient
dt = 1
num_steps = 1
[]
[Outputs]
csv = true
exodus = true
[]
(modules/porous_flow/examples/tutorial/06.i)
# Darcy flow with a tracer
[Mesh]
[annular]
type = AnnularMeshGenerator
nr = 10
rmin = 1.0
rmax = 10
growth_r = 1.4
nt = 4
dmin = 0
dmax = 90
[]
[make3D]
type = MeshExtruderGenerator
extrusion_vector = '0 0 12'
num_layers = 3
bottom_sideset = 'bottom'
top_sideset = 'top'
input = annular
[]
[shift_down]
type = TransformGenerator
transform = TRANSLATE
vector_value = '0 0 -6'
input = make3D
[]
[aquifer]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 -2'
top_right = '10 10 2'
input = shift_down
[]
[injection_area]
type = ParsedGenerateSideset
combinatorial_geometry = 'x*x+y*y<1.01'
included_subdomains = 1
new_sideset_name = 'injection_area'
input = 'aquifer'
[]
[rename]
type = RenameBlockGenerator
old_block = '0 1'
new_block = 'caps aquifer'
input = 'injection_area'
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[porepressure]
[]
[tracer_concentration]
[]
[]
[ICs]
[tracer_concentration]
type = FunctionIC
function = '0.5*if(x*x+y*y<1.01,1,0)'
variable = tracer_concentration
[]
[]
[PorousFlowFullySaturated]
porepressure = porepressure
coupling_type = Hydro
gravity = '0 0 0'
fp = the_simple_fluid
mass_fraction_vars = tracer_concentration
stabilization = none # Note to reader: 06_KT.i uses KT stabilization - compare the results
[]
[BCs]
[constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1E6
boundary = injection_area
[]
[constant_outer_porepressure]
type = DirichletBC
variable = porepressure
value = 0
boundary = rmax
[]
[injected_tracer]
type = DirichletBC
variable = tracer_concentration
value = 0.5
boundary = injection_area
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
viscosity = 1.0E-3
density0 = 1000.0
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[permeability_aquifer]
type = PorousFlowPermeabilityConst
block = aquifer
permeability = '1E-14 0 0 0 1E-14 0 0 0 1E-14'
[]
[permeability_caps]
type = PorousFlowPermeabilityConst
block = caps
permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-16'
[]
[]
[Preconditioning]
active = basic
[basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[]
[preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E6
dt = 1E5
nl_rel_tol = 1E-14
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/examples/tutorial/06_KT.i)
# Darcy flow with a tracer
[Mesh]
[annular]
type = AnnularMeshGenerator
nr = 10
rmin = 1.0
rmax = 10
growth_r = 1.4
nt = 4
dmin = 0
dmax = 90
[]
[make3D]
type = MeshExtruderGenerator
extrusion_vector = '0 0 12'
num_layers = 3
bottom_sideset = 'bottom'
top_sideset = 'top'
input = annular
[]
[shift_down]
type = TransformGenerator
transform = TRANSLATE
vector_value = '0 0 -6'
input = make3D
[]
[aquifer]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 -2'
top_right = '10 10 2'
input = shift_down
[]
[injection_area]
type = ParsedGenerateSideset
combinatorial_geometry = 'x*x+y*y<1.01'
included_subdomains = 1
new_sideset_name = 'injection_area'
input = 'aquifer'
[]
[rename]
type = RenameBlockGenerator
old_block = '0 1'
new_block = 'caps aquifer'
input = 'injection_area'
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[porepressure]
[]
[tracer_concentration]
[]
[]
[ICs]
[tracer_concentration]
type = FunctionIC
function = '0.5*if(x*x+y*y<1.01,1,0)'
variable = tracer_concentration
[]
[]
[PorousFlowFullySaturated]
porepressure = porepressure
coupling_type = Hydro
gravity = '0 0 0'
fp = the_simple_fluid
mass_fraction_vars = tracer_concentration
stabilization = KT
flux_limiter_type = superbee
[]
[BCs]
[constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1E6
boundary = injection_area
[]
[constant_outer_porepressure]
type = DirichletBC
variable = porepressure
value = 0
boundary = rmax
[]
[injected_tracer]
type = DirichletBC
variable = tracer_concentration
value = 0.5
boundary = injection_area
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
viscosity = 1.0E-3
density0 = 1000.0
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[permeability_aquifer]
type = PorousFlowPermeabilityConst
block = aquifer
permeability = '1E-14 0 0 0 1E-14 0 0 0 1E-14'
[]
[permeability_caps]
type = PorousFlowPermeabilityConst
block = caps
permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-16'
[]
[]
[Preconditioning]
active = basic
[basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[]
[preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E6
dt = 1E5
nl_rel_tol = 1E-14
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/test/tests/aux_kernels/element_normal_1D_2D.i)
# The PorousFlowElementNormal is used to calculate normal directions
[Mesh]
[base]
type = AnnularMeshGenerator
dmax = 90
nr = 3
nt = 1
rmin = 0
rmax = 1
[]
[rotate]
type = TransformGenerator
input = base
transform = ROTATE
vector_value = '0 45 0'
[]
[rmax_block]
type = LowerDBlockFromSidesetGenerator
input = rotate
sidesets = rmax
new_block_name = rmax
[]
[dmax_block]
type = LowerDBlockFromSidesetGenerator
input = rmax_block
sidesets = dmax
new_block_name = dmax
[]
[]
[Variables]
[dummy]
[]
[]
[Kernels]
[dummy]
type = Diffusion
variable = dummy
[]
[]
[AuxVariables]
[nx]
family = MONOMIAL
order = CONSTANT
[]
[ny]
family = MONOMIAL
order = CONSTANT
[]
[nz]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[nx]
type = PorousFlowElementNormal
variable = nx
component = x
1D_perp = '0 1 0'
[]
[ny]
type = PorousFlowElementNormal
variable = ny
component = y
1D_perp = '0 1 0'
[]
[nz]
type = PorousFlowElementNormal
variable = nz
component = z
1D_perp = '0 1 0'
[]
[]
[Postprocessors]
[n2Dx]
type = ElementAverageValue
variable = nx
block = '0 1'
[]
[n2Dy]
type = ElementAverageValue
variable = ny
block = '0 1'
[]
[n2Dz]
type = ElementAverageValue
variable = nz
block = '0 1'
[]
[nrmaxx]
type = ElementAverageValue
variable = nx
block = rmax
[]
[nrmaxy]
type = ElementAverageValue
variable = ny
block = rmax
[]
[nrmaxz]
type = ElementAverageValue
variable = nz
block = rmax
[]
[ndmaxx]
type = ElementAverageValue
variable = nx
block = dmax
[]
[ndmaxy]
type = ElementAverageValue
variable = ny
block = dmax
[]
[ndmaxz]
type = ElementAverageValue
variable = nz
block = dmax
[]
[]
[Executioner]
type = Transient
dt = 1
num_steps = 1
[]
[Outputs]
csv = true
[]
(modules/porous_flow/examples/tutorial/01.i)
# Darcy flow
[Mesh]
[annular]
type = AnnularMeshGenerator
nr = 10
rmin = 1.0
rmax = 10
growth_r = 1.4
nt = 4
dmin = 0
dmax = 90
[]
[make3D]
type = MeshExtruderGenerator
extrusion_vector = '0 0 12'
num_layers = 3
bottom_sideset = 'bottom'
top_sideset = 'top'
input = annular
[]
[shift_down]
type = TransformGenerator
transform = TRANSLATE
vector_value = '0 0 -6'
input = make3D
[]
[aquifer]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 -2'
top_right = '10 10 2'
input = shift_down
[]
[injection_area]
type = ParsedGenerateSideset
combinatorial_geometry = 'x*x+y*y<1.01'
included_subdomains = 1
new_sideset_name = 'injection_area'
input = 'aquifer'
[]
[rename]
type = RenameBlockGenerator
old_block = '0 1'
new_block = 'caps aquifer'
input = 'injection_area'
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[porepressure]
[]
[]
[PorousFlowBasicTHM]
porepressure = porepressure
coupling_type = Hydro
gravity = '0 0 0'
fp = the_simple_fluid
[]
[BCs]
[constant_injection_porepressure]
type = DirichletBC
variable = porepressure
value = 1E6
boundary = injection_area
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E9
viscosity = 1.0E-3
density0 = 1000.0
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosity
porosity_zero = 0.1
[]
[biot_modulus]
type = PorousFlowConstantBiotModulus
biot_coefficient = 0.8
solid_bulk_compliance = 2E-7
fluid_bulk_modulus = 1E7
[]
[permeability_aquifer]
type = PorousFlowPermeabilityConst
block = aquifer
permeability = '1E-14 0 0 0 1E-14 0 0 0 1E-14'
[]
[permeability_caps]
type = PorousFlowPermeabilityConst
block = caps
permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-16'
[]
[]
[Preconditioning]
active = basic
[basic]
type = SMP
full = true
[]
[preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1E6
dt = 1E5
nl_abs_tol = 1E-13
[]
[Outputs]
exodus = true
[]