- polar_xThe x component of the polarization
C++ Type:std::vector<VariableName>
Unit:(no unit assumed)
Controllable:No
Description:The x component of the polarization
- polar_yThe y component of the polarization
C++ Type:std::vector<VariableName>
Unit:(no unit assumed)
Controllable:No
Description:The y component of the polarization
- variableThe name of the variable that this object applies to
C++ Type:AuxVariableName
Unit:(no unit assumed)
Controllable:No
Description:The name of the variable that this object applies to
WallEnergyDensity
Overview
Computes the free energy density due to gradients in the polarization vector field . It is defined as follows,
with gradient coefficients . Here denotes the component and derivative direction.
Example Input File Syntax
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
- check_boundary_restrictedTrueWhether to check for multiple element sides on the boundary in the case of a boundary restricted, element aux variable. Setting this to false will allow contribution to a single element's elemental value(s) from multiple boundary sides on the same element (example: when the restricted boundary exists on two or more sides of an element, such as at a corner of a mesh
Default:True
C++ Type:bool
Controllable:No
Description:Whether to check for multiple element sides on the boundary in the case of a boundary restricted, element aux variable. Setting this to false will allow contribution to a single element's elemental value(s) from multiple boundary sides on the same element (example: when the restricted boundary exists on two or more sides of an element, such as at a corner of a mesh
- execute_onLINEAR TIMESTEP_ENDThe list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.
Default:LINEAR TIMESTEP_END
C++ Type:ExecFlagEnum
Options:XFEM_MARK, NONE, INITIAL, LINEAR, LINEAR_CONVERGENCE, NONLINEAR, NONLINEAR_CONVERGENCE, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, MULTIAPP_FIXED_POINT_CONVERGENCE, MULTISYSTEM_FIXED_POINT_ITERATION_END, FINAL, CUSTOM, PRE_DISPLACE
Controllable:No
Description:The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html.
- polar_zThe z component of the polarization
C++ Type:std::vector<VariableName>
Unit:(no unit assumed)
Controllable:No
Description:The z component of the polarization
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.
- search_methodnearest_node_connected_sidesChoice of search algorithm. All options begin by finding the nearest node in the primary boundary to a query point in the secondary boundary. In the default nearest_node_connected_sides algorithm, primary boundary elements are searched iff that nearest node is one of their nodes. This is fast to determine via a pregenerated node-to-elem map and is robust on conforming meshes. In the optional all_proximate_sides algorithm, primary boundary elements are searched iff they touch that nearest node, even if they are not topologically connected to it. This is more CPU-intensive but is necessary for robustness on any boundary surfaces which has disconnections (such as Flex IGA meshes) or non-conformity (such as hanging nodes in adaptively h-refined meshes).
Default:nearest_node_connected_sides
C++ Type:MooseEnum
Options:nearest_node_connected_sides, all_proximate_sides
Controllable:No
Description:Choice of search algorithm. All options begin by finding the nearest node in the primary boundary to a query point in the secondary boundary. In the default nearest_node_connected_sides algorithm, primary boundary elements are searched iff that nearest node is one of their nodes. This is fast to determine via a pregenerated node-to-elem map and is robust on conforming meshes. In the optional all_proximate_sides algorithm, primary boundary elements are searched iff they touch that nearest node, even if they are not topologically connected to it. This is more CPU-intensive but is necessary for robustness on any boundary surfaces which has disconnections (such as Flex IGA meshes) or non-conformity (such as hanging nodes in adaptively h-refined meshes).
- 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
- 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
Unit:(no unit assumed)
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.
- use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Default:False
C++ Type:bool
Controllable:No
Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Material Property Retrieval Parameters
Input Files
- (test/tests/polar-elastic-electric/PTO_3D_E_full.i)
- (test/tests/polar-elastic-electric/PTO_2D_E_full.i)
- (test/tests/action/PTO_3D_action.i)
- (test/tests/electrostatics/PTO_STO_2D_E_full.i)
- (test/tests/polar-elastic/PTO_3D_full.i)
- (test/tests/polar-elastic/PTO_2D_multi_polar.i)
- (test/tests/film/PTO_film_clamped_multi_polar.i)
- (test/tests/action/PTO_3D_E_action.i)
- (test/tests/polar-elastic/PTO_2D_full.i)
- (test/tests/polar-elastic-electric/PTO_2D_E_multi_polar.i)
- (test/tests/polar-elastic/PTO_3D_multi_polar.i)
- (test/tests/userobjects/terminator_full.i)
- (test/tests/polar-elastic-electric/PTO_3D_E_multi_polar.i)
- (test/tests/action/PTO_2D_E_action.i)
- (test/tests/action/PTO_2D_action.i)
- (test/tests/ics/PTO_3D_fluct.i)
(test/tests/polar-elastic-electric/PTO_3D_E_full.i)
TC = 25.0
um = -0.01
l0 = 1.0
L = 4.0
dx = 1.0
nx = ${fparse int(L/dx + 0.5)}
eps_r = 10.0
eps0 = 0.0088542
alpha1 = ${fparse 3.8e-4*(TC - 479.0)}
G110 = ${fparse l0*l0*abs(alpha1)}
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = ${nx}
ny = ${nx}
nz = ${nx}
xmin = 0.0
xmax = ${L}
ymin = 0.0
ymax = ${L}
zmin = 0.0
zmax = ${L}
elem_type = HEX8
[]
[pin]
type = ExtraNodesetGenerator
input = gen
new_boundary = 'pin_node'
coord = '2.0 2.0 2.0'
use_closest_node = true
[]
[]
[GlobalParams]
polar_x = polar_x
polar_y = polar_y
polar_z = polar_z
potential_E_int = potential_E_int
[]
[Variables]
[polar_x]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = RandomIC
min = -0.5
max = 0.5
seed = 1
[]
[]
[polar_y]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = RandomIC
min = -0.5
max = 0.5
seed = 2
[]
[]
[polar_z]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = RandomIC
min = -0.5
max = 0.5
seed = 3
[]
[]
[potential_E_int]
order = FIRST
family = LAGRANGE
[]
[u_x]
order = FIRST
family = LAGRANGE
[]
[u_y]
order = FIRST
family = LAGRANGE
[]
[u_z]
order = FIRST
family = LAGRANGE
[]
[]
[AuxVariables]
[Pmag]
order = FIRST
family = LAGRANGE
[]
[wE]
order = CONSTANT
family = MONOMIAL
[]
[strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[Pmag]
type = ParsedAux
variable = Pmag
coupled_variables = 'polar_x polar_y polar_z'
expression = 'sqrt(polar_x^2 + polar_y^2 + polar_z^2)'
execute_on = 'initial timestep_end'
[]
[wE]
type = WallEnergyDensity
variable = wE
execute_on = 'initial timestep_end'
[]
[strain_xx]
type = RankTwoAux
variable = strain_xx
rank_two_tensor = total_strain
index_i = 0
index_j = 0
execute_on = 'initial timestep_end'
[]
[strain_zz]
type = RankTwoAux
variable = strain_zz
rank_two_tensor = total_strain
index_i = 2
index_j = 2
execute_on = 'initial timestep_end'
[]
[]
[Materials]
[Landau_P]
type = GenericConstantMaterial
prop_names = 'alpha1 alpha11 alpha12 alpha111 alpha112 alpha123 alpha1111 alpha1112 alpha1122 alpha1123'
prop_values = '${alpha1} -0.073 0.75 0.26 0.61 -3.7 0.0 0.0 0.0 0.0'
[]
[Landau_G]
type = GenericConstantMaterial
prop_names = 'G110 G11_G110 G12_G110 G44_G110 G44P_G110'
prop_values = '${G110} 0.6 0.0 0.3 0.3'
[]
[mat_C]
type = GenericConstantMaterial
prop_names = 'C11 C12 C44'
prop_values = '174.269 79.029 47.62'
[]
[mat_Q]
type = GenericConstantMaterial
prop_names = 'Q11 Q12 Q44'
prop_values = '0.089 -0.026 0.03375'
[]
[permittivity]
type = GenericConstantMaterial
prop_names = 'permittivity'
prop_values = '${fparse eps_r*eps0}'
[]
[elasticity_tensor]
type = ComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '174.269 79.029 79.029 174.269 79.029 174.269 47.62 47.62 47.62'
[]
[misfit]
type = GenericConstantRankTwoTensor
tensor_name = global_strain
tensor_values = '${um} 0 0 0 ${um} 0 0 0 0'
[]
[strain]
type = ComputeSmallStrain
displacements = 'u_x u_y u_z'
eigenstrain_names = 'ferro'
global_strain = global_strain
[]
[ferro]
type = ComputeCubicParentElectrostrictiveStrain
eigenstrain_name = ferro
[]
[stress]
type = ComputeLinearElasticStress
[]
[]
[Kernels]
[time_x]
type = TimeDerivative
variable = polar_x
[]
[time_y]
type = TimeDerivative
variable = polar_y
[]
[time_z]
type = TimeDerivative
variable = polar_z
[]
[poisson]
type = Electrostatics
variable = potential_E_int
[]
[divP]
type = PolarElectricEStrong
variable = potential_E_int
[]
[Ephi_x]
type = PolarElectricPStrong
variable = polar_x
component = 0
[]
[Ephi_y]
type = PolarElectricPStrong
variable = polar_y
component = 1
[]
[Ephi_z]
type = PolarElectricPStrong
variable = polar_z
component = 2
[]
[div_x]
type = StressDivergenceTensors
variable = u_x
displacements = 'u_x u_y u_z'
component = 0
[]
[div_y]
type = StressDivergenceTensors
variable = u_y
displacements = 'u_x u_y u_z'
component = 1
[]
[div_z]
type = StressDivergenceTensors
variable = u_z
displacements = 'u_x u_y u_z'
component = 2
[]
[bed_x]
type = BulkEnergyDerivativeEighth
variable = polar_x
component = 0
[]
[bed_y]
type = BulkEnergyDerivativeEighth
variable = polar_y
component = 1
[]
[bed_z]
type = BulkEnergyDerivativeEighth
variable = polar_z
component = 2
[]
[walled_x]
type = WallEnergyDerivative
variable = polar_x
component = 0
[]
[walled_y]
type = WallEnergyDerivative
variable = polar_y
component = 1
[]
[walled_z]
type = WallEnergyDerivative
variable = polar_z
component = 2
[]
[electrostr_x]
type = CubicParentElasticPDerivative
variable = polar_x
component = 0
displacements = 'u_x u_y u_z'
[]
[electrostr_y]
type = CubicParentElasticPDerivative
variable = polar_y
component = 1
displacements = 'u_x u_y u_z'
[]
[electrostr_z]
type = CubicParentElasticPDerivative
variable = polar_z
component = 2
displacements = 'u_x u_y u_z'
[]
[]
[BCs]
[Periodic]
[xyz]
auto_direction = 'x y z'
variable = 'polar_x polar_y polar_z potential_E_int u_x u_y u_z'
[]
[]
[phi_pin]
type = DirichletBC
variable = potential_E_int
boundary = 'pin_node'
value = 0
[]
[pin_ux]
type = DirichletBC
variable = u_x
boundary = 'pin_node'
value = 0
[]
[pin_uy]
type = DirichletBC
variable = u_y
boundary = 'pin_node'
value = 0
[]
[pin_uz]
type = DirichletBC
variable = u_z
boundary = 'pin_node'
value = 0
[]
[]
[Postprocessors]
[Fbulk]
type = BulkEnergyEighth
execute_on = 'initial timestep_end'
[]
[Fwall]
type = WallEnergy
execute_on = 'initial timestep_end'
[]
[Felec]
type = ElectrostaticEnergy
execute_on = 'initial timestep_end'
[]
[Felastic]
type = CubicParentElasticEnergy
execute_on = 'initial timestep_end'
[]
[Ftotal]
type = LinearCombinationPostprocessor
pp_names = 'Fbulk Fwall Felastic Felec'
pp_coefs = '1 1 1 1'
execute_on = 'timestep_end'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-pc_type -sub_pc_type -ksp_type -ksp_rtol -ksp_gmres_restart'
petsc_options_value = 'bjacobi ilu gmres 1e-6 100'
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
l_max_its = 200
end_time = 5.0
[TimeStepper]
type = IterationAdaptiveDT
dt = 0.5
growth_factor = 1.3
cutback_factor = 0.8
optimal_iterations = 8
linear_iteration_ratio = 1000
[]
dtmax = 5.0
num_steps = 3
[]
[Outputs]
print_linear_residuals = false
[exo]
type = Exodus
[]
[]
(test/tests/polar-elastic-electric/PTO_2D_E_full.i)
TC = 25.0
um = -0.01
l0 = 1.0
Lx = 8.0
tf = 2.0
dx = 0.2
nx = ${fparse int(Lx/dx + 0.5)}
ny = ${fparse int(tf/dx + 0.5)}
lam = 8.0
P_seed = 0.3
Px_seed = 0.01
eps_r = 10.0
eps0 = 0.0088542
alpha1 = ${fparse 3.8e-4*(TC - 479.0)}
G110 = ${fparse l0*l0*abs(alpha1)}
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = ${nx}
ny = ${ny}
xmin = 0.0
xmax = ${Lx}
ymin = 0.0
ymax = ${tf}
elem_type = QUAD4
[]
[pin]
type = ExtraNodesetGenerator
input = gen
new_boundary = 'pin_node'
coord = '8.0 0.0 0.0'
use_closest_node = true
[]
[]
[GlobalParams]
polar_x = polar_x
polar_y = polar_y
polar_z = polar_z
potential_E_int = potential_E_int
[]
[Functions]
[ic_Py]
type = ParsedFunction
expression = '${P_seed}*cos(2*pi*x/${lam})'
[]
[ic_Px]
type = ParsedFunction
expression = '${Px_seed}*sin(2*pi*x/${lam})'
[]
[]
[Variables]
[polar_x]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = FunctionIC
function = ic_Px
[]
[]
[polar_y]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = FunctionIC
function = ic_Py
[]
[]
[polar_z]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = ConstantIC
value = 0.0
[]
[]
[potential_E_int]
order = FIRST
family = LAGRANGE
[]
[u_x]
order = FIRST
family = LAGRANGE
[]
[u_y]
order = FIRST
family = LAGRANGE
[]
[]
[AuxVariables]
[Pmag]
order = FIRST
family = LAGRANGE
[]
[wE]
order = CONSTANT
family = MONOMIAL
[]
[strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[Pmag]
type = ParsedAux
variable = Pmag
coupled_variables = 'polar_x polar_y polar_z'
expression = 'sqrt(polar_x^2 + polar_y^2 + polar_z^2)'
execute_on = 'initial timestep_end'
[]
[wE]
type = WallEnergyDensity
variable = wE
execute_on = 'initial timestep_end'
[]
[strain_xx]
type = RankTwoAux
variable = strain_xx
rank_two_tensor = total_strain
index_i = 0
index_j = 0
execute_on = 'initial timestep_end'
[]
[strain_yy]
type = RankTwoAux
variable = strain_yy
rank_two_tensor = total_strain
index_i = 1
index_j = 1
execute_on = 'initial timestep_end'
[]
[]
[Materials]
[Landau_P]
type = GenericConstantMaterial
prop_names = 'alpha1 alpha11 alpha12 alpha111 alpha112 alpha123 alpha1111 alpha1112 alpha1122 alpha1123'
prop_values = '${alpha1} -0.073 0.75 0.26 0.61 -3.7 0.0 0.0 0.0 0.0'
[]
[Landau_G]
type = GenericConstantMaterial
prop_names = 'G110 G11_G110 G12_G110 G44_G110 G44P_G110'
prop_values = '${G110} 0.6 0.0 0.3 0.3'
[]
[mat_C]
type = GenericConstantMaterial
prop_names = 'C11 C12 C44'
prop_values = '174.269 79.029 47.62'
[]
[mat_Q]
type = GenericConstantMaterial
prop_names = 'Q11 Q12 Q44'
prop_values = '0.089 -0.026 0.03375'
[]
[permittivity]
type = GenericConstantMaterial
prop_names = 'permittivity'
prop_values = '${fparse eps_r*eps0}'
[]
[elasticity_tensor]
type = ComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '174.269 79.029 79.029 174.269 79.029 174.269 47.62 47.62 47.62'
[]
[misfit]
type = GenericConstantRankTwoTensor
tensor_name = global_strain
tensor_values = '${um} 0 0 0 0 0 0 0 ${um}'
[]
[strain]
type = ComputeSmallStrain
displacements = 'u_x u_y'
eigenstrain_names = 'ferro'
global_strain = global_strain
[]
[ferro]
type = ComputeCubicParentElectrostrictiveStrain
eigenstrain_name = ferro
[]
[stress]
type = ComputeLinearElasticStress
[]
[]
[Kernels]
[time_x]
type = TimeDerivative
variable = polar_x
[]
[time_y]
type = TimeDerivative
variable = polar_y
[]
[time_z]
type = TimeDerivative
variable = polar_z
[]
[poisson]
type = Electrostatics
variable = potential_E_int
[]
[divP]
type = PolarElectricEStrong
variable = potential_E_int
[]
[Ephi_x]
type = PolarElectricPStrong
variable = polar_x
component = 0
[]
[Ephi_y]
type = PolarElectricPStrong
variable = polar_y
component = 1
[]
[Ephi_z]
type = PolarElectricPStrong
variable = polar_z
component = 2
[]
[div_x]
type = StressDivergenceTensors
variable = u_x
displacements = 'u_x u_y'
component = 0
[]
[div_y]
type = StressDivergenceTensors
variable = u_y
displacements = 'u_x u_y'
component = 1
[]
[bed_x]
type = BulkEnergyDerivativeEighth
variable = polar_x
component = 0
[]
[bed_y]
type = BulkEnergyDerivativeEighth
variable = polar_y
component = 1
[]
[bed_z]
type = BulkEnergyDerivativeEighth
variable = polar_z
component = 2
[]
[walled_x]
type = WallEnergyDerivative
variable = polar_x
component = 0
[]
[walled_y]
type = WallEnergyDerivative
variable = polar_y
component = 1
[]
[walled_z]
type = WallEnergyDerivative
variable = polar_z
component = 2
[]
[electrostr_x]
type = CubicParentElasticPDerivative
variable = polar_x
component = 0
displacements = 'u_x u_y'
[]
[electrostr_y]
type = CubicParentElasticPDerivative
variable = polar_y
component = 1
displacements = 'u_x u_y'
[]
[electrostr_z]
type = CubicParentElasticPDerivative
variable = polar_z
component = 2
displacements = 'u_x u_y'
[]
[]
[BCs]
[Periodic]
[x]
auto_direction = 'x'
variable = 'polar_x polar_y polar_z potential_E_int u_x u_y'
[]
[]
[phi_pin]
type = DirichletBC
variable = potential_E_int
boundary = 'pin_node'
value = 0
[]
[clamp_x]
type = DirichletBC
variable = u_x
boundary = 'bottom'
value = 0
[]
[clamp_y]
type = DirichletBC
variable = u_y
boundary = 'bottom'
value = 0
[]
[]
[Postprocessors]
[Fbulk]
type = BulkEnergyEighth
execute_on = 'initial timestep_end'
[]
[Fwall]
type = WallEnergy
execute_on = 'initial timestep_end'
[]
[Felec]
type = ElectrostaticEnergy
execute_on = 'initial timestep_end'
[]
[Felastic]
type = CubicParentElasticEnergy
execute_on = 'initial timestep_end'
[]
[Ftotal]
type = LinearCombinationPostprocessor
pp_names = 'Fbulk Fwall Felastic Felec'
pp_coefs = '1 1 1 1'
execute_on = 'timestep_end'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-pc_type -sub_pc_type -ksp_type -ksp_rtol -ksp_gmres_restart'
petsc_options_value = 'bjacobi ilu gmres 1e-6 100'
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
l_max_its = 200
end_time = 5.0
[TimeStepper]
type = IterationAdaptiveDT
dt = 0.5
growth_factor = 1.3
cutback_factor = 0.8
optimal_iterations = 8
linear_iteration_ratio = 1000
[]
dtmax = 5.0
num_steps = 3
[]
[Outputs]
print_linear_residuals = false
[exo]
type = Exodus
[]
[]
(test/tests/action/PTO_3D_action.i)
TC = 25.0
um = -0.01
l0 = 1.0
L = 4.0
nx = 4
alpha1 = ${fparse 3.8e-4*(TC - 479.0)}
G110 = ${fparse l0*l0*abs(alpha1)}
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = ${nx}
ny = ${nx}
nz = ${nx}
xmin = 0.0
xmax = ${L}
ymin = 0.0
ymax = ${L}
zmin = 0.0
zmax = ${L}
elem_type = HEX8
[]
[pin]
type = ExtraNodesetGenerator
input = gen
new_boundary = 'pin_node'
coord = '2.0 2.0 2.0'
use_closest_node = true
[]
[]
[GlobalParams]
displacements = 'u_x u_y u_z'
global_strain = global_strain
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = SMALL
add_variables = true
eigenstrain_names = 'ferro'
generate_output = 'strain_xx strain_zz'
[]
[]
[Ferret/CubicParentFEPhaseField]
electrostatics = false
elastic = true
alpha_ijkl = 'alpha1 alpha11 alpha12 alpha111 alpha112 alpha123 alpha1111 alpha1112 alpha1122 alpha1123'
alpha_ijkl_val = '${alpha1} -0.073 0.75 0.26 0.61 -3.7 0.0 0.0 0.0 0.0'
G_ij = 'G110 G11_G110 G12_G110 G44_G110 G44P_G110'
G_ij_val = '${G110} 0.6 0.0 0.3 0.3'
Q_ij = 'Q11 Q12 Q44'
Q_ij_val = '0.089 -0.026 0.03375'
C_ij = 'C11 C12 C44'
C_ij_val = '174.269 79.029 47.62'
[]
[ICs]
[Px]
type = RandomIC
variable = polar_x
min = -0.5
max = 0.5
seed = 1
[]
[Py]
type = RandomIC
variable = polar_y
min = -0.5
max = 0.5
seed = 2
[]
[Pz]
type = RandomIC
variable = polar_z
min = -0.5
max = 0.5
seed = 3
[]
[]
[AuxVariables]
[Pmag]
order = FIRST
family = LAGRANGE
[]
[wE]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[Pmag]
type = ParsedAux
variable = Pmag
coupled_variables = 'polar_x polar_y polar_z'
expression = 'sqrt(polar_x^2 + polar_y^2 + polar_z^2)'
execute_on = 'initial timestep_end'
[]
[wE]
type = WallEnergyDensity
variable = wE
polar_x = polar_x
polar_y = polar_y
polar_z = polar_z
execute_on = 'initial timestep_end'
[]
[]
[Materials]
[misfit]
type = GenericConstantRankTwoTensor
tensor_name = global_strain
tensor_values = '${um} 0 0 0 ${um} 0 0 0 0'
[]
[]
[BCs]
[Periodic]
[xyz]
auto_direction = 'x y z'
variable = 'polar_x polar_y polar_z u_x u_y u_z'
[]
[]
[pin_ux]
type = DirichletBC
variable = u_x
boundary = 'pin_node'
value = 0
[]
[pin_uy]
type = DirichletBC
variable = u_y
boundary = 'pin_node'
value = 0
[]
[pin_uz]
type = DirichletBC
variable = u_z
boundary = 'pin_node'
value = 0
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-pc_type -sub_pc_type -ksp_type -ksp_rtol -ksp_gmres_restart'
petsc_options_value = 'bjacobi ilu gmres 1e-6 100'
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
l_max_its = 200
end_time = 5.0
[TimeStepper]
type = IterationAdaptiveDT
dt = 0.5
growth_factor = 1.3
cutback_factor = 0.8
optimal_iterations = 8
linear_iteration_ratio = 1000
[]
dtmax = 5.0
num_steps = 3
[]
[Outputs]
print_linear_residuals = false
[exo]
type = Exodus
[]
[]
(test/tests/electrostatics/PTO_STO_2D_E_full.i)
TC = 25.0
Lx = 6.0
t_pto = 2.0
t_sto = 2.0
Ly = ${fparse 2.0*t_pto + t_sto}
dx = 0.25
nx = ${fparse int(Lx/dx + 0.5)}
ny = ${fparse int(Ly/dx + 0.5)}
y0 = ${t_pto}
y1 = ${fparse t_pto + t_sto}
lam = 6.0
P_seed = 0.3
Px_seed = 0.01
eps0 = 0.0088542
eps_r = 10.0
eps_sto = 300.0
a_pto = 3.957
a_sto = 3.905
a_sub = 3.944
um_pto = ${fparse (a_sub - a_pto)/a_pto}
um_sto = ${fparse (a_sub - a_sto)/a_sto}
l0 = 1.0
alpha1 = ${fparse 3.8e-4*(TC - 479.0)}
G110 = ${fparse l0*l0*abs(alpha1)}
alpha1_sto = ${fparse 1.0/(2.0*(eps_sto - eps_r)*eps0)}
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = ${nx}
ny = ${ny}
xmin = 0.0
xmax = ${Lx}
ymin = 0.0
ymax = ${Ly}
elem_type = QUAD4
[]
[sto_layer]
type = SubdomainBoundingBoxGenerator
input = gen
bottom_left = '0.0 ${y0} 0.0'
top_right = '${Lx} ${y1} 0.0'
block_id = 1
[]
[pin]
type = ExtraNodesetGenerator
input = sto_layer
new_boundary = 'pin_node'
coord = '${fparse 0.5*Lx} 0.0 0.0'
use_closest_node = true
[]
[]
[GlobalParams]
polar_x = polar_x
polar_y = polar_y
polar_z = polar_z
potential_E_int = potential_E_int
[]
[Functions]
[ic_Py]
type = ParsedFunction
expression = '${P_seed}*cos(2*pi*x/${lam})'
[]
[ic_Px]
type = ParsedFunction
expression = '${Px_seed}*sin(2*pi*x/${lam})'
[]
[]
[Variables]
[polar_x]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = FunctionIC
function = ic_Px
[]
[]
[polar_y]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = FunctionIC
function = ic_Py
[]
[]
[polar_z]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = ConstantIC
value = 0.0
[]
[]
[potential_E_int]
order = FIRST
family = LAGRANGE
[]
[u_x]
order = FIRST
family = LAGRANGE
[]
[u_y]
order = FIRST
family = LAGRANGE
[]
[]
[AuxVariables]
[Pmag]
order = FIRST
family = LAGRANGE
[]
[wE]
order = CONSTANT
family = MONOMIAL
[]
[strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[Pmag]
type = ParsedAux
variable = Pmag
coupled_variables = 'polar_x polar_y polar_z'
expression = 'sqrt(polar_x^2 + polar_y^2 + polar_z^2)'
execute_on = 'initial timestep_end'
[]
[wE]
type = WallEnergyDensity
variable = wE
execute_on = 'initial timestep_end'
[]
[strain_xx]
type = RankTwoAux
variable = strain_xx
rank_two_tensor = total_strain
index_i = 0
index_j = 0
execute_on = 'initial timestep_end'
[]
[strain_yy]
type = RankTwoAux
variable = strain_yy
rank_two_tensor = total_strain
index_i = 1
index_j = 1
execute_on = 'initial timestep_end'
[]
[]
[Materials]
[Landau_P_pto]
type = GenericConstantMaterial
prop_names = 'alpha1 alpha11 alpha12 alpha111 alpha112 alpha123 alpha1111 alpha1112 alpha1122 alpha1123'
prop_values = '${alpha1} -0.073 0.75 0.26 0.61 -3.7 0.0 0.0 0.0 0.0'
block = '0'
[]
[Landau_G_pto]
type = GenericConstantMaterial
prop_names = 'G110 G11_G110 G12_G110 G44_G110 G44P_G110'
prop_values = '${G110} 0.6 0.0 0.3 0.3'
block = '0'
[]
[mat_Q_pto]
type = GenericConstantMaterial
prop_names = 'Q11 Q12 Q44'
prop_values = '0.089 -0.026 0.03375'
block = '0'
[]
[mat_C_pto]
type = GenericConstantMaterial
prop_names = 'C11 C12 C44'
prop_values = '174.269 79.029 47.62'
block = '0'
[]
[elasticity_tensor_pto]
type = ComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '174.269 79.029 79.029 174.269 79.029 174.269 47.62 47.62 47.62'
block = '0'
[]
[misfit_pto]
type = GenericConstantRankTwoTensor
tensor_name = global_strain
tensor_values = '${um_pto} 0 0 0 0 0 0 0 ${um_pto}'
block = '0'
[]
[ferro_pto]
type = ComputeCubicParentElectrostrictiveStrain
eigenstrain_name = ferro
block = '0'
[]
[Landau_P_sto]
type = GenericConstantMaterial
prop_names = 'alpha1 alpha11 alpha12 alpha111 alpha112 alpha123 alpha1111 alpha1112 alpha1122 alpha1123'
prop_values = '${alpha1_sto} 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0'
block = '1'
[]
[Landau_G_sto]
type = GenericConstantMaterial
prop_names = 'G110 G11_G110 G12_G110 G44_G110 G44P_G110'
prop_values = '${G110} 0.6 0.0 0.3 0.3'
block = '1'
[]
[mat_Q_sto]
type = GenericConstantMaterial
prop_names = 'Q11 Q12 Q44'
prop_values = '0.04575 -0.01350 0.00957'
block = '1'
[]
[mat_C_sto]
type = GenericConstantMaterial
prop_names = 'C11 C12 C44'
prop_values = '318.1 102.5 123.5'
block = '1'
[]
[elasticity_tensor_sto]
type = ComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '318.1 102.5 102.5 318.1 102.5 318.1 123.5 123.5 123.5'
block = '1'
[]
[misfit_sto]
type = GenericConstantRankTwoTensor
tensor_name = global_strain
tensor_values = '${um_sto} 0 0 0 0 0 0 0 ${um_sto}'
block = '1'
[]
[ferro_sto]
type = ComputeCubicParentElectrostrictiveStrain
eigenstrain_name = ferro
block = '1'
[]
[permittivity]
type = GenericConstantMaterial
prop_names = 'permittivity'
prop_values = '${fparse eps_r*eps0}'
[]
[strain]
type = ComputeSmallStrain
displacements = 'u_x u_y'
eigenstrain_names = 'ferro'
global_strain = global_strain
[]
[stress]
type = ComputeLinearElasticStress
[]
[]
[Kernels]
[time_x]
type = TimeDerivative
variable = polar_x
[]
[time_y]
type = TimeDerivative
variable = polar_y
[]
[time_z]
type = TimeDerivative
variable = polar_z
[]
[poisson]
type = Electrostatics
variable = potential_E_int
[]
[divP]
type = PolarElectricEStrong
variable = potential_E_int
[]
[Ephi_x]
type = PolarElectricPStrong
variable = polar_x
component = 0
[]
[Ephi_y]
type = PolarElectricPStrong
variable = polar_y
component = 1
[]
[Ephi_z]
type = PolarElectricPStrong
variable = polar_z
component = 2
[]
[div_x]
type = StressDivergenceTensors
variable = u_x
displacements = 'u_x u_y'
component = 0
[]
[div_y]
type = StressDivergenceTensors
variable = u_y
displacements = 'u_x u_y'
component = 1
[]
[bed_x]
type = BulkEnergyDerivativeEighth
variable = polar_x
component = 0
[]
[bed_y]
type = BulkEnergyDerivativeEighth
variable = polar_y
component = 1
[]
[bed_z]
type = BulkEnergyDerivativeEighth
variable = polar_z
component = 2
[]
[walled_x]
type = WallEnergyDerivative
variable = polar_x
component = 0
[]
[walled_y]
type = WallEnergyDerivative
variable = polar_y
component = 1
[]
[walled_z]
type = WallEnergyDerivative
variable = polar_z
component = 2
[]
[electrostr_x]
type = CubicParentElasticPDerivative
variable = polar_x
component = 0
displacements = 'u_x u_y'
[]
[electrostr_y]
type = CubicParentElasticPDerivative
variable = polar_y
component = 1
displacements = 'u_x u_y'
[]
[electrostr_z]
type = CubicParentElasticPDerivative
variable = polar_z
component = 2
displacements = 'u_x u_y'
[]
[]
[BCs]
[Periodic]
[x]
auto_direction = 'x'
variable = 'polar_x polar_y polar_z potential_E_int u_x u_y'
[]
[]
[phi_pin]
type = DirichletBC
variable = potential_E_int
boundary = 'pin_node'
value = 0
[]
[clamp_x]
type = DirichletBC
variable = u_x
boundary = 'bottom'
value = 0
[]
[clamp_y]
type = DirichletBC
variable = u_y
boundary = 'bottom'
value = 0
[]
[]
[Postprocessors]
[Fbulk]
type = BulkEnergyEighth
execute_on = 'initial timestep_end'
[]
[Fwall]
type = WallEnergy
execute_on = 'initial timestep_end'
[]
[Felec]
type = ElectrostaticEnergy
execute_on = 'initial timestep_end'
[]
[Felastic]
type = CubicParentElasticEnergy
execute_on = 'initial timestep_end'
[]
[Ftotal]
type = LinearCombinationPostprocessor
pp_names = 'Fbulk Fwall Felastic Felec'
pp_coefs = '1 1 1 1'
execute_on = 'timestep_end'
[]
[Pmag_pto]
type = ElementAverageValue
variable = Pmag
block = '0'
execute_on = 'initial timestep_end'
[]
[Pmag_sto]
type = ElementAverageValue
variable = Pmag
block = '1'
execute_on = 'initial timestep_end'
[]
[exx_pto]
type = ElementAverageValue
variable = strain_xx
block = '0'
execute_on = 'initial timestep_end'
[]
[exx_sto]
type = ElementAverageValue
variable = strain_xx
block = '1'
execute_on = 'initial timestep_end'
[]
[phi_max]
type = NodalExtremeValue
variable = potential_E_int
value_type = max
execute_on = 'initial timestep_end'
[]
[phi_min]
type = NodalExtremeValue
variable = potential_E_int
value_type = min
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-pc_type -sub_pc_type -ksp_type -ksp_rtol -ksp_gmres_restart'
petsc_options_value = 'bjacobi ilu gmres 1e-6 100'
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
l_max_its = 200
end_time = 5.0
[TimeStepper]
type = IterationAdaptiveDT
dt = 0.5
growth_factor = 1.3
cutback_factor = 0.8
optimal_iterations = 8
linear_iteration_ratio = 1000
[]
dtmax = 5.0
num_steps = 4
[]
[Outputs]
print_linear_residuals = false
[exo]
type = Exodus
[]
[]
(test/tests/polar-elastic/PTO_3D_full.i)
TC = 25.0
um = -0.01
l0 = 1.0
L = 4.0
dx = 1.0
nx = ${fparse int(L/dx + 0.5)}
alpha1 = ${fparse 3.8e-4*(TC - 479.0)}
G110 = ${fparse l0*l0*abs(alpha1)}
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = ${nx}
ny = ${nx}
nz = ${nx}
xmin = 0.0
xmax = ${L}
ymin = 0.0
ymax = ${L}
zmin = 0.0
zmax = ${L}
elem_type = HEX8
[]
[pin]
type = ExtraNodesetGenerator
input = gen
new_boundary = 'pin_node'
coord = '2.0 2.0 2.0'
use_closest_node = true
[]
[]
[GlobalParams]
polar_x = polar_x
polar_y = polar_y
polar_z = polar_z
[]
[Variables]
[polar_x]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = RandomIC
min = -0.5
max = 0.5
seed = 1
[]
[]
[polar_y]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = RandomIC
min = -0.5
max = 0.5
seed = 2
[]
[]
[polar_z]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = RandomIC
min = -0.5
max = 0.5
seed = 3
[]
[]
[u_x]
order = FIRST
family = LAGRANGE
[]
[u_y]
order = FIRST
family = LAGRANGE
[]
[u_z]
order = FIRST
family = LAGRANGE
[]
[]
[AuxVariables]
[Pmag]
order = FIRST
family = LAGRANGE
[]
[wE]
order = CONSTANT
family = MONOMIAL
[]
[strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[Pmag]
type = ParsedAux
variable = Pmag
coupled_variables = 'polar_x polar_y polar_z'
expression = 'sqrt(polar_x^2 + polar_y^2 + polar_z^2)'
execute_on = 'initial timestep_end'
[]
[wE]
type = WallEnergyDensity
variable = wE
execute_on = 'initial timestep_end'
[]
[strain_xx]
type = RankTwoAux
variable = strain_xx
rank_two_tensor = total_strain
index_i = 0
index_j = 0
execute_on = 'initial timestep_end'
[]
[strain_zz]
type = RankTwoAux
variable = strain_zz
rank_two_tensor = total_strain
index_i = 2
index_j = 2
execute_on = 'initial timestep_end'
[]
[]
[Materials]
[Landau_P]
type = GenericConstantMaterial
prop_names = 'alpha1 alpha11 alpha12 alpha111 alpha112 alpha123 alpha1111 alpha1112 alpha1122 alpha1123'
prop_values = '${alpha1} -0.073 0.75 0.26 0.61 -3.7 0.0 0.0 0.0 0.0'
[]
[Landau_G]
type = GenericConstantMaterial
prop_names = 'G110 G11_G110 G12_G110 G44_G110 G44P_G110'
prop_values = '${G110} 0.6 0.0 0.3 0.3'
[]
[mat_C]
type = GenericConstantMaterial
prop_names = 'C11 C12 C44'
prop_values = '174.269 79.029 47.62'
[]
[mat_Q]
type = GenericConstantMaterial
prop_names = 'Q11 Q12 Q44'
prop_values = '0.089 -0.026 0.03375'
[]
[elasticity_tensor]
type = ComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '174.269 79.029 79.029 174.269 79.029 174.269 47.62 47.62 47.62'
[]
[misfit]
type = GenericConstantRankTwoTensor
tensor_name = global_strain
tensor_values = '${um} 0 0 0 ${um} 0 0 0 0'
[]
[strain]
type = ComputeSmallStrain
displacements = 'u_x u_y u_z'
eigenstrain_names = 'ferro'
global_strain = global_strain
[]
[ferro]
type = ComputeCubicParentElectrostrictiveStrain
eigenstrain_name = ferro
[]
[stress]
type = ComputeLinearElasticStress
[]
[]
[Kernels]
[time_x]
type = TimeDerivative
variable = polar_x
[]
[time_y]
type = TimeDerivative
variable = polar_y
[]
[time_z]
type = TimeDerivative
variable = polar_z
[]
[div_x]
type = StressDivergenceTensors
variable = u_x
displacements = 'u_x u_y u_z'
component = 0
[]
[div_y]
type = StressDivergenceTensors
variable = u_y
displacements = 'u_x u_y u_z'
component = 1
[]
[div_z]
type = StressDivergenceTensors
variable = u_z
displacements = 'u_x u_y u_z'
component = 2
[]
[bed_x]
type = BulkEnergyDerivativeEighth
variable = polar_x
component = 0
[]
[bed_y]
type = BulkEnergyDerivativeEighth
variable = polar_y
component = 1
[]
[bed_z]
type = BulkEnergyDerivativeEighth
variable = polar_z
component = 2
[]
[walled_x]
type = WallEnergyDerivative
variable = polar_x
component = 0
[]
[walled_y]
type = WallEnergyDerivative
variable = polar_y
component = 1
[]
[walled_z]
type = WallEnergyDerivative
variable = polar_z
component = 2
[]
[electrostr_x]
type = CubicParentElasticPDerivative
variable = polar_x
component = 0
displacements = 'u_x u_y u_z'
[]
[electrostr_y]
type = CubicParentElasticPDerivative
variable = polar_y
component = 1
displacements = 'u_x u_y u_z'
[]
[electrostr_z]
type = CubicParentElasticPDerivative
variable = polar_z
component = 2
displacements = 'u_x u_y u_z'
[]
[]
[BCs]
[Periodic]
[xyz]
auto_direction = 'x y z'
variable = 'polar_x polar_y polar_z u_x u_y u_z'
[]
[]
[pin_ux]
type = DirichletBC
variable = u_x
boundary = 'pin_node'
value = 0
[]
[pin_uy]
type = DirichletBC
variable = u_y
boundary = 'pin_node'
value = 0
[]
[pin_uz]
type = DirichletBC
variable = u_z
boundary = 'pin_node'
value = 0
[]
[]
[Postprocessors]
[Fbulk]
type = BulkEnergyEighth
execute_on = 'initial timestep_end'
[]
[Fwall]
type = WallEnergy
execute_on = 'initial timestep_end'
[]
[Felastic]
type = CubicParentElasticEnergy
execute_on = 'initial timestep_end'
[]
[Ftotal]
type = LinearCombinationPostprocessor
pp_names = 'Fbulk Fwall Felastic'
pp_coefs = '1 1 1'
execute_on = 'timestep_end'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-pc_type -sub_pc_type -ksp_type -ksp_rtol -ksp_gmres_restart'
petsc_options_value = 'bjacobi ilu gmres 1e-6 100'
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
l_max_its = 200
end_time = 5.0
[TimeStepper]
type = IterationAdaptiveDT
dt = 0.5
growth_factor = 1.3
cutback_factor = 0.8
optimal_iterations = 8
linear_iteration_ratio = 1000
[]
dtmax = 5.0
num_steps = 3
[]
[Outputs]
print_linear_residuals = false
[exo]
type = Exodus
[]
[]
(test/tests/polar-elastic/PTO_2D_multi_polar.i)
TC = 25.0
um = -0.01
l0 = 1.0
Lx = 8.0
tf = 2.0
nx = 40
ny = 10
lam = 8.0
P_seed = 0.3
Px_seed = 0.01
dt_polar = 0.5
alpha1 = ${fparse 3.8e-4*(TC - 479.0)}
G110 = ${fparse l0*l0*abs(alpha1)}
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = ${nx}
ny = ${ny}
xmin = 0.0
xmax = ${Lx}
ymin = 0.0
ymax = ${tf}
elem_type = QUAD4
[]
[]
[GlobalParams]
polar_x = polar_x
polar_y = polar_y
polar_z = polar_z
[]
[Functions]
[ic_Py]
type = ParsedFunction
expression = '${P_seed}*cos(2*pi*x/${lam})'
[]
[ic_Px]
type = ParsedFunction
expression = '${Px_seed}*sin(2*pi*x/${lam})'
[]
[]
[Variables]
[polar_x]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = FunctionIC
function = ic_Px
[]
[]
[polar_y]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = FunctionIC
function = ic_Py
[]
[]
[polar_z]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = ConstantIC
value = 0.0
[]
[]
[]
[AuxVariables]
[u_x]
order = FIRST
family = LAGRANGE
[]
[u_y]
order = FIRST
family = LAGRANGE
[]
[Px_old]
order = FIRST
family = LAGRANGE
[]
[Py_old]
order = FIRST
family = LAGRANGE
[]
[Pz_old]
order = FIRST
family = LAGRANGE
[]
[Pmag]
order = FIRST
family = LAGRANGE
[]
[wE]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[Px_old]
type = ParsedAux
variable = Px_old
coupled_variables = 'polar_x'
expression = 'polar_x'
execute_on = 'initial timestep_begin'
[]
[Py_old]
type = ParsedAux
variable = Py_old
coupled_variables = 'polar_y'
expression = 'polar_y'
execute_on = 'initial timestep_begin'
[]
[Pz_old]
type = ParsedAux
variable = Pz_old
coupled_variables = 'polar_z'
expression = 'polar_z'
execute_on = 'initial timestep_begin'
[]
[Pmag]
type = ParsedAux
variable = Pmag
coupled_variables = 'polar_x polar_y polar_z'
expression = 'sqrt(polar_x^2 + polar_y^2 + polar_z^2)'
execute_on = 'initial timestep_end'
[]
[wE]
type = WallEnergyDensity
variable = wE
execute_on = 'initial timestep_end'
[]
[]
[Materials]
[Landau_P]
type = GenericConstantMaterial
prop_names = 'alpha1 alpha11 alpha12 alpha111 alpha112 alpha123 alpha1111 alpha1112 alpha1122 alpha1123'
prop_values = '${alpha1} -0.073 0.75 0.26 0.61 -3.7 0.0 0.0 0.0 0.0'
[]
[Landau_G]
type = GenericConstantMaterial
prop_names = 'G110 G11_G110 G12_G110 G44_G110 G44P_G110'
prop_values = '${G110} 0.6 0.0 0.3 0.3'
[]
[mat_C]
type = GenericConstantMaterial
prop_names = 'C11 C12 C44'
prop_values = '174.269 79.029 47.62'
[]
[mat_Q]
type = GenericConstantMaterial
prop_names = 'Q11 Q12 Q44'
prop_values = '0.089 -0.026 0.03375'
[]
[misfit]
type = GenericConstantRankTwoTensor
tensor_name = global_strain
tensor_values = '${um} 0 0 0 0 0 0 0 ${um}'
[]
[strain]
type = ComputeSmallStrain
displacements = 'u_x u_y'
global_strain = global_strain
[]
[]
[Kernels]
[time_x]
type = TimeDerivative
variable = polar_x
[]
[time_y]
type = TimeDerivative
variable = polar_y
[]
[time_z]
type = TimeDerivative
variable = polar_z
[]
[walled_x]
type = WallEnergyDerivative
variable = polar_x
component = 0
[]
[walled_y]
type = WallEnergyDerivative
variable = polar_y
component = 1
[]
[walled_z]
type = WallEnergyDerivative
variable = polar_z
component = 2
[]
[bed_x]
type = BulkEnergyDerivativeEighth
variable = polar_x
component = 0
polar_x = Px_old
polar_y = Py_old
polar_z = Pz_old
[]
[bed_y]
type = BulkEnergyDerivativeEighth
variable = polar_y
component = 1
polar_x = Px_old
polar_y = Py_old
polar_z = Pz_old
[]
[bed_z]
type = BulkEnergyDerivativeEighth
variable = polar_z
component = 2
polar_x = Px_old
polar_y = Py_old
polar_z = Pz_old
[]
[electrostr_x]
type = CubicParentElasticPDerivative
variable = polar_x
component = 0
polar_x = Px_old
polar_y = Py_old
polar_z = Pz_old
[]
[electrostr_y]
type = CubicParentElasticPDerivative
variable = polar_y
component = 1
polar_x = Px_old
polar_y = Py_old
polar_z = Pz_old
[]
[electrostr_z]
type = CubicParentElasticPDerivative
variable = polar_z
component = 2
polar_x = Px_old
polar_y = Py_old
polar_z = Pz_old
[]
[]
[BCs]
[Periodic]
[x]
auto_direction = 'x'
variable = 'polar_x polar_y polar_z'
[]
[]
[]
[Postprocessors]
[Fbulk]
type = BulkEnergyEighth
execute_on = 'initial timestep_end'
[]
[Fwall]
type = WallEnergy
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-pc_type -sub_pc_type -ksp_type -ksp_rtol -ksp_gmres_restart'
petsc_options_value = 'bjacobi ilu gmres 1e-6 100'
[]
[]
[Executioner]
type = Transient
scheme = implicit-euler
solve_type = LINEAR
l_max_its = 300
dt = ${dt_polar}
end_time = 1e9
[]
[Outputs]
print_linear_residuals = false
[exo]
type = Exodus
file_base = PTO_2D_multi_exo
[]
[]
(test/tests/film/PTO_film_clamped_multi_polar.i)
TC = 25.0
um = -0.01
l0 = 1.0
L = 4.0
dx = 1.0
nx = ${fparse int(L/dx + 0.5)}
dt_polar = 0.5
alpha1 = ${fparse 3.8e-4*(TC - 479.0)}
G110 = ${fparse l0*l0*abs(alpha1)}
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = ${nx}
ny = ${nx}
nz = ${nx}
xmin = 0.0
xmax = ${L}
ymin = 0.0
ymax = ${L}
zmin = 0.0
zmax = ${L}
elem_type = HEX8
[]
[]
[GlobalParams]
polar_x = polar_x
polar_y = polar_y
polar_z = polar_z
[]
[Variables]
[polar_x]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = RandomIC
min = -0.5
max = 0.5
seed = 1
[]
[]
[polar_y]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = RandomIC
min = -0.5
max = 0.5
seed = 2
[]
[]
[polar_z]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = RandomIC
min = -0.5
max = 0.5
seed = 3
[]
[]
[]
[AuxVariables]
[u_x]
order = FIRST
family = LAGRANGE
[]
[u_y]
order = FIRST
family = LAGRANGE
[]
[u_z]
order = FIRST
family = LAGRANGE
[]
[Px_old]
order = FIRST
family = LAGRANGE
[]
[Py_old]
order = FIRST
family = LAGRANGE
[]
[Pz_old]
order = FIRST
family = LAGRANGE
[]
[Pmag]
order = FIRST
family = LAGRANGE
[]
[wE]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[Px_old]
type = ParsedAux
variable = Px_old
coupled_variables = 'polar_x'
expression = 'polar_x'
execute_on = 'initial timestep_begin'
[]
[Py_old]
type = ParsedAux
variable = Py_old
coupled_variables = 'polar_y'
expression = 'polar_y'
execute_on = 'initial timestep_begin'
[]
[Pz_old]
type = ParsedAux
variable = Pz_old
coupled_variables = 'polar_z'
expression = 'polar_z'
execute_on = 'initial timestep_begin'
[]
[Pmag]
type = ParsedAux
variable = Pmag
coupled_variables = 'polar_x polar_y polar_z'
expression = 'sqrt(polar_x^2 + polar_y^2 + polar_z^2)'
execute_on = 'initial timestep_end'
[]
[wE]
type = WallEnergyDensity
variable = wE
execute_on = 'initial timestep_end'
[]
[]
[Materials]
[Landau_P]
type = GenericConstantMaterial
prop_names = 'alpha1 alpha11 alpha12 alpha111 alpha112 alpha123 alpha1111 alpha1112 alpha1122 alpha1123'
prop_values = '${alpha1} -0.073 0.75 0.26 0.61 -3.7 0.0 0.0 0.0 0.0'
[]
[Landau_G]
type = GenericConstantMaterial
prop_names = 'G110 G11_G110 G12_G110 G44_G110 G44P_G110'
prop_values = '${G110} 0.6 0.0 0.3 0.3'
[]
[mat_C]
type = GenericConstantMaterial
prop_names = 'C11 C12 C44'
prop_values = '174.269 79.029 47.62'
[]
[mat_Q]
type = GenericConstantMaterial
prop_names = 'Q11 Q12 Q44'
prop_values = '0.089 -0.026 0.03375'
[]
[misfit]
type = GenericConstantRankTwoTensor
tensor_name = global_strain
tensor_values = '${um} 0 0 0 ${um} 0 0 0 0'
[]
[strain]
type = ComputeSmallStrain
displacements = 'u_x u_y u_z'
global_strain = global_strain
[]
[]
[Kernels]
[time_x]
type = TimeDerivative
variable = polar_x
[]
[time_y]
type = TimeDerivative
variable = polar_y
[]
[time_z]
type = TimeDerivative
variable = polar_z
[]
[bed_x]
type = BulkEnergyDerivativeEighth
variable = polar_x
component = 0
polar_x = Px_old
polar_y = Py_old
polar_z = Pz_old
[]
[bed_y]
type = BulkEnergyDerivativeEighth
variable = polar_y
component = 1
polar_x = Px_old
polar_y = Py_old
polar_z = Pz_old
[]
[bed_z]
type = BulkEnergyDerivativeEighth
variable = polar_z
component = 2
polar_x = Px_old
polar_y = Py_old
polar_z = Pz_old
[]
[walled_x]
type = WallEnergyDerivative
variable = polar_x
component = 0
[]
[walled_y]
type = WallEnergyDerivative
variable = polar_y
component = 1
[]
[walled_z]
type = WallEnergyDerivative
variable = polar_z
component = 2
[]
[electrostr_x]
type = CubicParentElasticPDerivative
variable = polar_x
component = 0
polar_x = Px_old
polar_y = Py_old
polar_z = Pz_old
[]
[electrostr_y]
type = CubicParentElasticPDerivative
variable = polar_y
component = 1
polar_x = Px_old
polar_y = Py_old
polar_z = Pz_old
[]
[electrostr_z]
type = CubicParentElasticPDerivative
variable = polar_z
component = 2
polar_x = Px_old
polar_y = Py_old
polar_z = Pz_old
[]
[]
[BCs]
[Periodic]
[xyz]
auto_direction = 'x y z'
variable = 'polar_x polar_y polar_z'
[]
[]
[]
[Postprocessors]
[Fbulk]
type = BulkEnergyEighth
execute_on = 'initial timestep_end'
[]
[Fwall]
type = WallEnergy
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-pc_type -sub_pc_type -ksp_type -ksp_rtol -ksp_gmres_restart'
petsc_options_value = 'bjacobi ilu gmres 1e-6 100'
[]
[]
[Executioner]
type = Transient
scheme = implicit-euler
solve_type = LINEAR
l_max_its = 300
dt = ${dt_polar}
end_time = 1e9
[]
[Outputs]
print_linear_residuals = false
[exo]
type = Exodus
file_base = PTO_film_clamped_multi_exo
[]
[]
(test/tests/action/PTO_3D_E_action.i)
TC = 25.0
um = -0.01
l0 = 1.0
L = 4.0
nx = 4
eps_r = 10.0
eps0 = 0.0088542
alpha1 = ${fparse 3.8e-4*(TC - 479.0)}
G110 = ${fparse l0*l0*abs(alpha1)}
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = ${nx}
ny = ${nx}
nz = ${nx}
xmin = 0.0
xmax = ${L}
ymin = 0.0
ymax = ${L}
zmin = 0.0
zmax = ${L}
elem_type = HEX8
[]
[pin]
type = ExtraNodesetGenerator
input = gen
new_boundary = 'pin_node'
coord = '2.0 2.0 2.0'
use_closest_node = true
[]
[]
[GlobalParams]
displacements = 'u_x u_y u_z'
global_strain = global_strain
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = SMALL
add_variables = true
eigenstrain_names = 'ferro'
generate_output = 'strain_xx strain_zz'
[]
[]
[Ferret/CubicParentFEPhaseField]
electrostatics = true
elastic = true
alpha_ijkl = 'alpha1 alpha11 alpha12 alpha111 alpha112 alpha123 alpha1111 alpha1112 alpha1122 alpha1123'
alpha_ijkl_val = '${alpha1} -0.073 0.75 0.26 0.61 -3.7 0.0 0.0 0.0 0.0'
G_ij = 'G110 G11_G110 G12_G110 G44_G110 G44P_G110'
G_ij_val = '${G110} 0.6 0.0 0.3 0.3'
Q_ij = 'Q11 Q12 Q44'
Q_ij_val = '0.089 -0.026 0.03375'
C_ij = 'C11 C12 C44'
C_ij_val = '174.269 79.029 47.62'
permittivity_val = '${fparse eps_r*eps0}'
[]
[ICs]
[Px]
type = RandomIC
variable = polar_x
min = -0.5
max = 0.5
seed = 1
[]
[Py]
type = RandomIC
variable = polar_y
min = -0.5
max = 0.5
seed = 2
[]
[Pz]
type = RandomIC
variable = polar_z
min = -0.5
max = 0.5
seed = 3
[]
[]
[AuxVariables]
[Pmag]
order = FIRST
family = LAGRANGE
[]
[wE]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[Pmag]
type = ParsedAux
variable = Pmag
coupled_variables = 'polar_x polar_y polar_z'
expression = 'sqrt(polar_x^2 + polar_y^2 + polar_z^2)'
execute_on = 'initial timestep_end'
[]
[wE]
type = WallEnergyDensity
variable = wE
polar_x = polar_x
polar_y = polar_y
polar_z = polar_z
execute_on = 'initial timestep_end'
[]
[]
[Materials]
[misfit]
type = GenericConstantRankTwoTensor
tensor_name = global_strain
tensor_values = '${um} 0 0 0 ${um} 0 0 0 0'
[]
[]
[BCs]
[Periodic]
[xyz]
auto_direction = 'x y z'
variable = 'polar_x polar_y polar_z potential_E_int u_x u_y u_z'
[]
[]
[phi_pin]
type = DirichletBC
variable = potential_E_int
boundary = 'pin_node'
value = 0
[]
[pin_ux]
type = DirichletBC
variable = u_x
boundary = 'pin_node'
value = 0
[]
[pin_uy]
type = DirichletBC
variable = u_y
boundary = 'pin_node'
value = 0
[]
[pin_uz]
type = DirichletBC
variable = u_z
boundary = 'pin_node'
value = 0
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-pc_type -sub_pc_type -ksp_type -ksp_rtol -ksp_gmres_restart'
petsc_options_value = 'bjacobi ilu gmres 1e-6 100'
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
l_max_its = 200
end_time = 5.0
[TimeStepper]
type = IterationAdaptiveDT
dt = 0.5
growth_factor = 1.3
cutback_factor = 0.8
optimal_iterations = 8
linear_iteration_ratio = 1000
[]
dtmax = 5.0
num_steps = 3
[]
[Outputs]
print_linear_residuals = false
[exo]
type = Exodus
[]
[]
(test/tests/polar-elastic/PTO_2D_full.i)
TC = 25.0
um = -0.01
l0 = 1.0
Lx = 8.0
tf = 2.0
dx = 0.2
nx = ${fparse int(Lx/dx + 0.5)}
ny = ${fparse int(tf/dx + 0.5)}
lam = 8.0
P_seed = 0.3
Px_seed = 0.01
alpha1 = ${fparse 3.8e-4*(TC - 479.0)}
G110 = ${fparse l0*l0*abs(alpha1)}
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = ${nx}
ny = ${ny}
xmin = 0.0
xmax = ${Lx}
ymin = 0.0
ymax = ${tf}
elem_type = QUAD4
[]
[]
[GlobalParams]
polar_x = polar_x
polar_y = polar_y
polar_z = polar_z
[]
[Functions]
[ic_Py]
type = ParsedFunction
expression = '${P_seed}*cos(2*pi*x/${lam})'
[]
[ic_Px]
type = ParsedFunction
expression = '${Px_seed}*sin(2*pi*x/${lam})'
[]
[]
[Variables]
[polar_x]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = FunctionIC
function = ic_Px
[]
[]
[polar_y]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = FunctionIC
function = ic_Py
[]
[]
[polar_z]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = ConstantIC
value = 0.0
[]
[]
[u_x]
order = FIRST
family = LAGRANGE
[]
[u_y]
order = FIRST
family = LAGRANGE
[]
[]
[AuxVariables]
[Pmag]
order = FIRST
family = LAGRANGE
[]
[wE]
order = CONSTANT
family = MONOMIAL
[]
[strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[Pmag]
type = ParsedAux
variable = Pmag
coupled_variables = 'polar_x polar_y polar_z'
expression = 'sqrt(polar_x^2 + polar_y^2 + polar_z^2)'
execute_on = 'initial timestep_end'
[]
[wE]
type = WallEnergyDensity
variable = wE
execute_on = 'initial timestep_end'
[]
[strain_xx]
type = RankTwoAux
variable = strain_xx
rank_two_tensor = total_strain
index_i = 0
index_j = 0
execute_on = 'initial timestep_end'
[]
[strain_yy]
type = RankTwoAux
variable = strain_yy
rank_two_tensor = total_strain
index_i = 1
index_j = 1
execute_on = 'initial timestep_end'
[]
[]
[Materials]
[Landau_P]
type = GenericConstantMaterial
prop_names = 'alpha1 alpha11 alpha12 alpha111 alpha112 alpha123 alpha1111 alpha1112 alpha1122 alpha1123'
prop_values = '${alpha1} -0.073 0.75 0.26 0.61 -3.7 0.0 0.0 0.0 0.0'
[]
[Landau_G]
type = GenericConstantMaterial
prop_names = 'G110 G11_G110 G12_G110 G44_G110 G44P_G110'
prop_values = '${G110} 0.6 0.0 0.3 0.3'
[]
[mat_C]
type = GenericConstantMaterial
prop_names = 'C11 C12 C44'
prop_values = '174.269 79.029 47.62'
[]
[mat_Q]
type = GenericConstantMaterial
prop_names = 'Q11 Q12 Q44'
prop_values = '0.089 -0.026 0.03375'
[]
[elasticity_tensor]
type = ComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '174.269 79.029 79.029 174.269 79.029 174.269 47.62 47.62 47.62'
[]
[misfit]
type = GenericConstantRankTwoTensor
tensor_name = global_strain
tensor_values = '${um} 0 0 0 0 0 0 0 ${um}'
[]
[strain]
type = ComputeSmallStrain
displacements = 'u_x u_y'
eigenstrain_names = 'ferro'
global_strain = global_strain
[]
[ferro]
type = ComputeCubicParentElectrostrictiveStrain
eigenstrain_name = ferro
[]
[stress]
type = ComputeLinearElasticStress
[]
[]
[Kernels]
[time_x]
type = TimeDerivative
variable = polar_x
[]
[time_y]
type = TimeDerivative
variable = polar_y
[]
[time_z]
type = TimeDerivative
variable = polar_z
[]
[div_x]
type = StressDivergenceTensors
variable = u_x
displacements = 'u_x u_y'
component = 0
[]
[div_y]
type = StressDivergenceTensors
variable = u_y
displacements = 'u_x u_y'
component = 1
[]
[bed_x]
type = BulkEnergyDerivativeEighth
variable = polar_x
component = 0
[]
[bed_y]
type = BulkEnergyDerivativeEighth
variable = polar_y
component = 1
[]
[bed_z]
type = BulkEnergyDerivativeEighth
variable = polar_z
component = 2
[]
[walled_x]
type = WallEnergyDerivative
variable = polar_x
component = 0
[]
[walled_y]
type = WallEnergyDerivative
variable = polar_y
component = 1
[]
[walled_z]
type = WallEnergyDerivative
variable = polar_z
component = 2
[]
[electrostr_x]
type = CubicParentElasticPDerivative
variable = polar_x
component = 0
displacements = 'u_x u_y'
[]
[electrostr_y]
type = CubicParentElasticPDerivative
variable = polar_y
component = 1
displacements = 'u_x u_y'
[]
[electrostr_z]
type = CubicParentElasticPDerivative
variable = polar_z
component = 2
displacements = 'u_x u_y'
[]
[]
[BCs]
[Periodic]
[x]
auto_direction = 'x'
variable = 'polar_x polar_y polar_z u_x u_y'
[]
[]
[clamp_x]
type = DirichletBC
variable = u_x
boundary = 'bottom'
value = 0
[]
[clamp_y]
type = DirichletBC
variable = u_y
boundary = 'bottom'
value = 0
[]
[]
[Postprocessors]
[Fbulk]
type = BulkEnergyEighth
execute_on = 'initial timestep_end'
[]
[Fwall]
type = WallEnergy
execute_on = 'initial timestep_end'
[]
[Felastic]
type = CubicParentElasticEnergy
execute_on = 'initial timestep_end'
[]
[Ftotal]
type = LinearCombinationPostprocessor
pp_names = 'Fbulk Fwall Felastic'
pp_coefs = '1 1 1'
execute_on = 'timestep_end'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-pc_type -sub_pc_type -ksp_type -ksp_rtol -ksp_gmres_restart'
petsc_options_value = 'bjacobi ilu gmres 1e-6 100'
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
l_max_its = 200
end_time = 5.0
[TimeStepper]
type = IterationAdaptiveDT
dt = 0.5
growth_factor = 1.3
cutback_factor = 0.8
optimal_iterations = 8
linear_iteration_ratio = 1000
[]
dtmax = 5.0
num_steps = 3
[]
[Outputs]
print_linear_residuals = false
[exo]
type = Exodus
[]
[]
(test/tests/polar-elastic-electric/PTO_2D_E_multi_polar.i)
TC = 25.0
um = -0.01
l0 = 1.0
Lx = 8.0
tf = 2.0
nx = 40
ny = 10
lam = 8.0
P_seed = 0.3
Px_seed = 0.01
eps_r = 10.0
eps0 = 0.0088542
dt_polar = 0.5
alpha1 = ${fparse 3.8e-4*(TC - 479.0)}
G110 = ${fparse l0*l0*abs(alpha1)}
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = ${nx}
ny = ${ny}
xmin = 0.0
xmax = ${Lx}
ymin = 0.0
ymax = ${tf}
elem_type = QUAD4
[]
[pin]
type = ExtraNodesetGenerator
input = gen
new_boundary = 'pin_node'
coord = '8.0 0.0 0.0'
use_closest_node = true
[]
[]
[GlobalParams]
polar_x = polar_x
polar_y = polar_y
polar_z = polar_z
potential_E_int = potential_E_int
[]
[Functions]
[ic_Py]
type = ParsedFunction
expression = '${P_seed}*cos(2*pi*x/${lam})'
[]
[ic_Px]
type = ParsedFunction
expression = '${Px_seed}*sin(2*pi*x/${lam})'
[]
[]
[Variables]
[polar_x]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = FunctionIC
function = ic_Px
[]
[]
[polar_y]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = FunctionIC
function = ic_Py
[]
[]
[polar_z]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = ConstantIC
value = 0.0
[]
[]
[potential_E_int]
order = FIRST
family = LAGRANGE
[]
[]
[AuxVariables]
[u_x]
order = FIRST
family = LAGRANGE
[]
[u_y]
order = FIRST
family = LAGRANGE
[]
[Px_old]
order = FIRST
family = LAGRANGE
[]
[Py_old]
order = FIRST
family = LAGRANGE
[]
[Pz_old]
order = FIRST
family = LAGRANGE
[]
[Pmag]
order = FIRST
family = LAGRANGE
[]
[wE]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[Px_old]
type = ParsedAux
variable = Px_old
coupled_variables = 'polar_x'
expression = 'polar_x'
execute_on = 'initial timestep_begin'
[]
[Py_old]
type = ParsedAux
variable = Py_old
coupled_variables = 'polar_y'
expression = 'polar_y'
execute_on = 'initial timestep_begin'
[]
[Pz_old]
type = ParsedAux
variable = Pz_old
coupled_variables = 'polar_z'
expression = 'polar_z'
execute_on = 'initial timestep_begin'
[]
[Pmag]
type = ParsedAux
variable = Pmag
coupled_variables = 'polar_x polar_y polar_z'
expression = 'sqrt(polar_x^2 + polar_y^2 + polar_z^2)'
execute_on = 'initial timestep_end'
[]
[wE]
type = WallEnergyDensity
variable = wE
execute_on = 'initial timestep_end'
[]
[]
[Materials]
[Landau_P]
type = GenericConstantMaterial
prop_names = 'alpha1 alpha11 alpha12 alpha111 alpha112 alpha123 alpha1111 alpha1112 alpha1122 alpha1123'
prop_values = '${alpha1} -0.073 0.75 0.26 0.61 -3.7 0.0 0.0 0.0 0.0'
[]
[Landau_G]
type = GenericConstantMaterial
prop_names = 'G110 G11_G110 G12_G110 G44_G110 G44P_G110'
prop_values = '${G110} 0.6 0.0 0.3 0.3'
[]
[mat_C]
type = GenericConstantMaterial
prop_names = 'C11 C12 C44'
prop_values = '174.269 79.029 47.62'
[]
[mat_Q]
type = GenericConstantMaterial
prop_names = 'Q11 Q12 Q44'
prop_values = '0.089 -0.026 0.03375'
[]
[permittivity]
type = GenericConstantMaterial
prop_names = 'permittivity'
prop_values = '${fparse eps_r*eps0}'
[]
[misfit]
type = GenericConstantRankTwoTensor
tensor_name = global_strain
tensor_values = '${um} 0 0 0 0 0 0 0 ${um}'
[]
[strain]
type = ComputeSmallStrain
displacements = 'u_x u_y'
global_strain = global_strain
[]
[]
[Kernels]
[time_x]
type = TimeDerivative
variable = polar_x
[]
[time_y]
type = TimeDerivative
variable = polar_y
[]
[time_z]
type = TimeDerivative
variable = polar_z
[]
[poisson]
type = Electrostatics
variable = potential_E_int
[]
[divP]
type = PolarElectricEStrong
variable = potential_E_int
[]
[Ephi_x]
type = PolarElectricPStrong
variable = polar_x
component = 0
[]
[Ephi_y]
type = PolarElectricPStrong
variable = polar_y
component = 1
[]
[Ephi_z]
type = PolarElectricPStrong
variable = polar_z
component = 2
[]
[walled_x]
type = WallEnergyDerivative
variable = polar_x
component = 0
[]
[walled_y]
type = WallEnergyDerivative
variable = polar_y
component = 1
[]
[walled_z]
type = WallEnergyDerivative
variable = polar_z
component = 2
[]
[bed_x]
type = BulkEnergyDerivativeEighth
variable = polar_x
component = 0
polar_x = Px_old
polar_y = Py_old
polar_z = Pz_old
[]
[bed_y]
type = BulkEnergyDerivativeEighth
variable = polar_y
component = 1
polar_x = Px_old
polar_y = Py_old
polar_z = Pz_old
[]
[bed_z]
type = BulkEnergyDerivativeEighth
variable = polar_z
component = 2
polar_x = Px_old
polar_y = Py_old
polar_z = Pz_old
[]
[electrostr_x]
type = CubicParentElasticPDerivative
variable = polar_x
component = 0
polar_x = Px_old
polar_y = Py_old
polar_z = Pz_old
[]
[electrostr_y]
type = CubicParentElasticPDerivative
variable = polar_y
component = 1
polar_x = Px_old
polar_y = Py_old
polar_z = Pz_old
[]
[electrostr_z]
type = CubicParentElasticPDerivative
variable = polar_z
component = 2
polar_x = Px_old
polar_y = Py_old
polar_z = Pz_old
[]
[]
[BCs]
[Periodic]
[x]
auto_direction = 'x'
variable = 'polar_x polar_y polar_z potential_E_int'
[]
[]
[phi_pin]
type = DirichletBC
variable = potential_E_int
boundary = 'pin_node'
value = 0
[]
[]
[Postprocessors]
[Fbulk]
type = BulkEnergyEighth
execute_on = 'initial timestep_end'
[]
[Fwall]
type = WallEnergy
execute_on = 'initial timestep_end'
[]
[Felec]
type = ElectrostaticEnergy
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-pc_type -sub_pc_type -ksp_type -ksp_rtol -ksp_gmres_restart'
petsc_options_value = 'bjacobi ilu gmres 1e-6 100'
[]
[]
[Executioner]
type = Transient
scheme = implicit-euler
solve_type = LINEAR
l_max_its = 300
dt = ${dt_polar}
end_time = 1e9
[]
[Outputs]
print_linear_residuals = false
[exo]
type = Exodus
file_base = PTO_2D_E_multi_exo
[]
[]
(test/tests/polar-elastic/PTO_3D_multi_polar.i)
TC = 25.0
um = -0.01
l0 = 1.0
L = 4.0
dx = 1.0
nx = ${fparse int(L/dx + 0.5)}
dt_polar = 0.5
alpha1 = ${fparse 3.8e-4*(TC - 479.0)}
G110 = ${fparse l0*l0*abs(alpha1)}
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = ${nx}
ny = ${nx}
nz = ${nx}
xmin = 0.0
xmax = ${L}
ymin = 0.0
ymax = ${L}
zmin = 0.0
zmax = ${L}
elem_type = HEX8
[]
[]
[GlobalParams]
polar_x = polar_x
polar_y = polar_y
polar_z = polar_z
[]
[Variables]
[polar_x]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = RandomIC
min = -0.5
max = 0.5
seed = 1
[]
[]
[polar_y]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = RandomIC
min = -0.5
max = 0.5
seed = 2
[]
[]
[polar_z]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = RandomIC
min = -0.5
max = 0.5
seed = 3
[]
[]
[]
[AuxVariables]
[u_x]
order = FIRST
family = LAGRANGE
[]
[u_y]
order = FIRST
family = LAGRANGE
[]
[u_z]
order = FIRST
family = LAGRANGE
[]
[Px_old]
order = FIRST
family = LAGRANGE
[]
[Py_old]
order = FIRST
family = LAGRANGE
[]
[Pz_old]
order = FIRST
family = LAGRANGE
[]
[Pmag]
order = FIRST
family = LAGRANGE
[]
[wE]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[Px_old]
type = ParsedAux
variable = Px_old
coupled_variables = 'polar_x'
expression = 'polar_x'
execute_on = 'initial timestep_begin'
[]
[Py_old]
type = ParsedAux
variable = Py_old
coupled_variables = 'polar_y'
expression = 'polar_y'
execute_on = 'initial timestep_begin'
[]
[Pz_old]
type = ParsedAux
variable = Pz_old
coupled_variables = 'polar_z'
expression = 'polar_z'
execute_on = 'initial timestep_begin'
[]
[Pmag]
type = ParsedAux
variable = Pmag
coupled_variables = 'polar_x polar_y polar_z'
expression = 'sqrt(polar_x^2 + polar_y^2 + polar_z^2)'
execute_on = 'initial timestep_end'
[]
[wE]
type = WallEnergyDensity
variable = wE
execute_on = 'initial timestep_end'
[]
[]
[Materials]
[Landau_P]
type = GenericConstantMaterial
prop_names = 'alpha1 alpha11 alpha12 alpha111 alpha112 alpha123 alpha1111 alpha1112 alpha1122 alpha1123'
prop_values = '${alpha1} -0.073 0.75 0.26 0.61 -3.7 0.0 0.0 0.0 0.0'
[]
[Landau_G]
type = GenericConstantMaterial
prop_names = 'G110 G11_G110 G12_G110 G44_G110 G44P_G110'
prop_values = '${G110} 0.6 0.0 0.3 0.3'
[]
[mat_C]
type = GenericConstantMaterial
prop_names = 'C11 C12 C44'
prop_values = '174.269 79.029 47.62'
[]
[mat_Q]
type = GenericConstantMaterial
prop_names = 'Q11 Q12 Q44'
prop_values = '0.089 -0.026 0.03375'
[]
[misfit]
type = GenericConstantRankTwoTensor
tensor_name = global_strain
tensor_values = '${um} 0 0 0 ${um} 0 0 0 0'
[]
[strain]
type = ComputeSmallStrain
displacements = 'u_x u_y u_z'
global_strain = global_strain
[]
[]
[Kernels]
[time_x]
type = TimeDerivative
variable = polar_x
[]
[time_y]
type = TimeDerivative
variable = polar_y
[]
[time_z]
type = TimeDerivative
variable = polar_z
[]
[bed_x]
type = BulkEnergyDerivativeEighth
variable = polar_x
component = 0
polar_x = Px_old
polar_y = Py_old
polar_z = Pz_old
[]
[bed_y]
type = BulkEnergyDerivativeEighth
variable = polar_y
component = 1
polar_x = Px_old
polar_y = Py_old
polar_z = Pz_old
[]
[bed_z]
type = BulkEnergyDerivativeEighth
variable = polar_z
component = 2
polar_x = Px_old
polar_y = Py_old
polar_z = Pz_old
[]
[walled_x]
type = WallEnergyDerivative
variable = polar_x
component = 0
[]
[walled_y]
type = WallEnergyDerivative
variable = polar_y
component = 1
[]
[walled_z]
type = WallEnergyDerivative
variable = polar_z
component = 2
[]
[electrostr_x]
type = CubicParentElasticPDerivative
variable = polar_x
component = 0
polar_x = Px_old
polar_y = Py_old
polar_z = Pz_old
[]
[electrostr_y]
type = CubicParentElasticPDerivative
variable = polar_y
component = 1
polar_x = Px_old
polar_y = Py_old
polar_z = Pz_old
[]
[electrostr_z]
type = CubicParentElasticPDerivative
variable = polar_z
component = 2
polar_x = Px_old
polar_y = Py_old
polar_z = Pz_old
[]
[]
[BCs]
[Periodic]
[xyz]
auto_direction = 'x y z'
variable = 'polar_x polar_y polar_z'
[]
[]
[]
[Postprocessors]
[Fbulk]
type = BulkEnergyEighth
execute_on = 'initial timestep_end'
[]
[Fwall]
type = WallEnergy
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-pc_type -sub_pc_type -ksp_type -ksp_rtol -ksp_gmres_restart'
petsc_options_value = 'bjacobi ilu gmres 1e-6 100'
[]
[]
[Executioner]
type = Transient
scheme = implicit-euler
solve_type = LINEAR
l_max_its = 300
dt = ${dt_polar}
end_time = 1e9
[]
[Outputs]
print_linear_residuals = false
[exo]
type = Exodus
file_base = PTO_3D_multi_exo
[]
[]
(test/tests/userobjects/terminator_full.i)
TC = 25.0
um = -0.01
l0 = 1.0
Lx = 8.0
tf = 2.0
dx = 0.2
nx = ${fparse int(Lx/dx + 0.5)}
ny = ${fparse int(tf/dx + 0.5)}
lam = 8.0
ftol = 1.0e-2
tmin = 1.0
P_seed = 0.3
Px_seed = 0.01
alpha1 = ${fparse 3.8e-4*(TC - 479.0)}
G110 = ${fparse l0*l0*abs(alpha1)}
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = ${nx}
ny = ${ny}
xmin = 0.0
xmax = ${Lx}
ymin = 0.0
ymax = ${tf}
elem_type = QUAD4
[]
[]
[GlobalParams]
polar_x = polar_x
polar_y = polar_y
polar_z = polar_z
[]
[Functions]
[ic_Py]
type = ParsedFunction
expression = '${P_seed}*cos(2*pi*x/${lam})'
[]
[ic_Px]
type = ParsedFunction
expression = '${Px_seed}*sin(2*pi*x/${lam})'
[]
[]
[Variables]
[polar_x]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = FunctionIC
function = ic_Px
[]
[]
[polar_y]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = FunctionIC
function = ic_Py
[]
[]
[polar_z]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = ConstantIC
value = 0.0
[]
[]
[u_x]
order = FIRST
family = LAGRANGE
[]
[u_y]
order = FIRST
family = LAGRANGE
[]
[]
[AuxVariables]
[Pmag]
order = FIRST
family = LAGRANGE
[]
[wE]
order = CONSTANT
family = MONOMIAL
[]
[strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[Pmag]
type = ParsedAux
variable = Pmag
coupled_variables = 'polar_x polar_y polar_z'
expression = 'sqrt(polar_x^2 + polar_y^2 + polar_z^2)'
execute_on = 'initial timestep_end'
[]
[wE]
type = WallEnergyDensity
variable = wE
execute_on = 'initial timestep_end'
[]
[strain_xx]
type = RankTwoAux
variable = strain_xx
rank_two_tensor = total_strain
index_i = 0
index_j = 0
execute_on = 'initial timestep_end'
[]
[strain_yy]
type = RankTwoAux
variable = strain_yy
rank_two_tensor = total_strain
index_i = 1
index_j = 1
execute_on = 'initial timestep_end'
[]
[]
[Materials]
[Landau_P]
type = GenericConstantMaterial
prop_names = 'alpha1 alpha11 alpha12 alpha111 alpha112 alpha123 alpha1111 alpha1112 alpha1122 alpha1123'
prop_values = '${alpha1} -0.073 0.75 0.26 0.61 -3.7 0.0 0.0 0.0 0.0'
[]
[Landau_G]
type = GenericConstantMaterial
prop_names = 'G110 G11_G110 G12_G110 G44_G110 G44P_G110'
prop_values = '${G110} 0.6 0.0 0.3 0.3'
[]
[mat_C]
type = GenericConstantMaterial
prop_names = 'C11 C12 C44'
prop_values = '174.269 79.029 47.62'
[]
[mat_Q]
type = GenericConstantMaterial
prop_names = 'Q11 Q12 Q44'
prop_values = '0.089 -0.026 0.03375'
[]
[elasticity_tensor]
type = ComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '174.269 79.029 79.029 174.269 79.029 174.269 47.62 47.62 47.62'
[]
[misfit]
type = GenericConstantRankTwoTensor
tensor_name = global_strain
tensor_values = '${um} 0 0 0 0 0 0 0 ${um}'
[]
[strain]
type = ComputeSmallStrain
displacements = 'u_x u_y'
eigenstrain_names = 'ferro'
global_strain = global_strain
[]
[ferro]
type = ComputeCubicParentElectrostrictiveStrain
eigenstrain_name = ferro
[]
[stress]
type = ComputeLinearElasticStress
[]
[]
[Kernels]
[time_x]
type = TimeDerivative
variable = polar_x
[]
[time_y]
type = TimeDerivative
variable = polar_y
[]
[time_z]
type = TimeDerivative
variable = polar_z
[]
[div_x]
type = StressDivergenceTensors
variable = u_x
displacements = 'u_x u_y'
component = 0
[]
[div_y]
type = StressDivergenceTensors
variable = u_y
displacements = 'u_x u_y'
component = 1
[]
[bed_x]
type = BulkEnergyDerivativeEighth
variable = polar_x
component = 0
[]
[bed_y]
type = BulkEnergyDerivativeEighth
variable = polar_y
component = 1
[]
[bed_z]
type = BulkEnergyDerivativeEighth
variable = polar_z
component = 2
[]
[walled_x]
type = WallEnergyDerivative
variable = polar_x
component = 0
[]
[walled_y]
type = WallEnergyDerivative
variable = polar_y
component = 1
[]
[walled_z]
type = WallEnergyDerivative
variable = polar_z
component = 2
[]
[electrostr_x]
type = CubicParentElasticPDerivative
variable = polar_x
component = 0
displacements = 'u_x u_y'
[]
[electrostr_y]
type = CubicParentElasticPDerivative
variable = polar_y
component = 1
displacements = 'u_x u_y'
[]
[electrostr_z]
type = CubicParentElasticPDerivative
variable = polar_z
component = 2
displacements = 'u_x u_y'
[]
[]
[BCs]
[Periodic]
[x]
auto_direction = 'x'
variable = 'polar_x polar_y polar_z u_x u_y'
[]
[]
[clamp_x]
type = DirichletBC
variable = u_x
boundary = 'bottom'
value = 0
[]
[clamp_y]
type = DirichletBC
variable = u_y
boundary = 'bottom'
value = 0
[]
[]
[Postprocessors]
[Fbulk]
type = BulkEnergyEighth
execute_on = 'initial timestep_end'
[]
[Fwall]
type = WallEnergy
execute_on = 'initial timestep_end'
[]
[Felastic]
type = CubicParentElasticEnergy
execute_on = 'initial timestep_end'
[]
[Ftotal]
type = LinearCombinationPostprocessor
pp_names = 'Fbulk Fwall Felastic'
pp_coefs = '1 1 1'
execute_on = 'timestep_end'
[]
[t]
type = TimePostprocessor
execute_on = 'timestep_end'
[]
[perc_change]
type = ChangeOverTimePostprocessor
postprocessor = Ftotal
compute_relative_change = true
take_absolute_value = true
execute_on = 'timestep_end'
[]
[]
[UserObjects]
[kill]
type = Terminator
expression = 'perc_change <= ${ftol} & t >= ${tmin}'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-pc_type -sub_pc_type -ksp_type -ksp_rtol -ksp_gmres_restart'
petsc_options_value = 'bjacobi ilu gmres 1e-6 100'
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
l_max_its = 200
end_time = 100.0
[TimeStepper]
type = IterationAdaptiveDT
dt = 0.5
growth_factor = 1.3
cutback_factor = 0.8
optimal_iterations = 8
linear_iteration_ratio = 1000
[]
dtmax = 5.0
num_steps = 10
[]
[Outputs]
print_linear_residuals = false
[exo]
type = Exodus
[]
[]
(test/tests/polar-elastic-electric/PTO_3D_E_multi_polar.i)
TC = 25.0
um = -0.01
l0 = 1.0
L = 4.0
dx = 1.0
nx = ${fparse int(L/dx + 0.5)}
eps_r = 10.0
eps0 = 0.0088542
dt_polar = 0.5
alpha1 = ${fparse 3.8e-4*(TC - 479.0)}
G110 = ${fparse l0*l0*abs(alpha1)}
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = ${nx}
ny = ${nx}
nz = ${nx}
xmin = 0.0
xmax = ${L}
ymin = 0.0
ymax = ${L}
zmin = 0.0
zmax = ${L}
elem_type = HEX8
[]
[pin]
type = ExtraNodesetGenerator
input = gen
new_boundary = 'pin_node'
coord = '2.0 2.0 2.0'
use_closest_node = true
[]
[]
[GlobalParams]
polar_x = polar_x
polar_y = polar_y
polar_z = polar_z
potential_E_int = potential_E_int
[]
[Variables]
[polar_x]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = RandomIC
min = -0.5
max = 0.5
seed = 1
[]
[]
[polar_y]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = RandomIC
min = -0.5
max = 0.5
seed = 2
[]
[]
[polar_z]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = RandomIC
min = -0.5
max = 0.5
seed = 3
[]
[]
[potential_E_int]
order = FIRST
family = LAGRANGE
[]
[]
[AuxVariables]
[u_x]
order = FIRST
family = LAGRANGE
[]
[u_y]
order = FIRST
family = LAGRANGE
[]
[u_z]
order = FIRST
family = LAGRANGE
[]
[Px_old]
order = FIRST
family = LAGRANGE
[]
[Py_old]
order = FIRST
family = LAGRANGE
[]
[Pz_old]
order = FIRST
family = LAGRANGE
[]
[Pmag]
order = FIRST
family = LAGRANGE
[]
[wE]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[Px_old]
type = ParsedAux
variable = Px_old
coupled_variables = 'polar_x'
expression = 'polar_x'
execute_on = 'initial timestep_begin'
[]
[Py_old]
type = ParsedAux
variable = Py_old
coupled_variables = 'polar_y'
expression = 'polar_y'
execute_on = 'initial timestep_begin'
[]
[Pz_old]
type = ParsedAux
variable = Pz_old
coupled_variables = 'polar_z'
expression = 'polar_z'
execute_on = 'initial timestep_begin'
[]
[Pmag]
type = ParsedAux
variable = Pmag
coupled_variables = 'polar_x polar_y polar_z'
expression = 'sqrt(polar_x^2 + polar_y^2 + polar_z^2)'
execute_on = 'initial timestep_end'
[]
[wE]
type = WallEnergyDensity
variable = wE
execute_on = 'initial timestep_end'
[]
[]
[Materials]
[Landau_P]
type = GenericConstantMaterial
prop_names = 'alpha1 alpha11 alpha12 alpha111 alpha112 alpha123 alpha1111 alpha1112 alpha1122 alpha1123'
prop_values = '${alpha1} -0.073 0.75 0.26 0.61 -3.7 0.0 0.0 0.0 0.0'
[]
[Landau_G]
type = GenericConstantMaterial
prop_names = 'G110 G11_G110 G12_G110 G44_G110 G44P_G110'
prop_values = '${G110} 0.6 0.0 0.3 0.3'
[]
[mat_C]
type = GenericConstantMaterial
prop_names = 'C11 C12 C44'
prop_values = '174.269 79.029 47.62'
[]
[mat_Q]
type = GenericConstantMaterial
prop_names = 'Q11 Q12 Q44'
prop_values = '0.089 -0.026 0.03375'
[]
[permittivity]
type = GenericConstantMaterial
prop_names = 'permittivity'
prop_values = '${fparse eps_r*eps0}'
[]
[misfit]
type = GenericConstantRankTwoTensor
tensor_name = global_strain
tensor_values = '${um} 0 0 0 ${um} 0 0 0 0'
[]
[strain]
type = ComputeSmallStrain
displacements = 'u_x u_y u_z'
global_strain = global_strain
[]
[]
[Kernels]
[time_x]
type = TimeDerivative
variable = polar_x
[]
[time_y]
type = TimeDerivative
variable = polar_y
[]
[time_z]
type = TimeDerivative
variable = polar_z
[]
[poisson]
type = Electrostatics
variable = potential_E_int
[]
[divP]
type = PolarElectricEStrong
variable = potential_E_int
[]
[Ephi_x]
type = PolarElectricPStrong
variable = polar_x
component = 0
[]
[Ephi_y]
type = PolarElectricPStrong
variable = polar_y
component = 1
[]
[Ephi_z]
type = PolarElectricPStrong
variable = polar_z
component = 2
[]
[bed_x]
type = BulkEnergyDerivativeEighth
variable = polar_x
component = 0
polar_x = Px_old
polar_y = Py_old
polar_z = Pz_old
[]
[bed_y]
type = BulkEnergyDerivativeEighth
variable = polar_y
component = 1
polar_x = Px_old
polar_y = Py_old
polar_z = Pz_old
[]
[bed_z]
type = BulkEnergyDerivativeEighth
variable = polar_z
component = 2
polar_x = Px_old
polar_y = Py_old
polar_z = Pz_old
[]
[walled_x]
type = WallEnergyDerivative
variable = polar_x
component = 0
[]
[walled_y]
type = WallEnergyDerivative
variable = polar_y
component = 1
[]
[walled_z]
type = WallEnergyDerivative
variable = polar_z
component = 2
[]
[electrostr_x]
type = CubicParentElasticPDerivative
variable = polar_x
component = 0
polar_x = Px_old
polar_y = Py_old
polar_z = Pz_old
[]
[electrostr_y]
type = CubicParentElasticPDerivative
variable = polar_y
component = 1
polar_x = Px_old
polar_y = Py_old
polar_z = Pz_old
[]
[electrostr_z]
type = CubicParentElasticPDerivative
variable = polar_z
component = 2
polar_x = Px_old
polar_y = Py_old
polar_z = Pz_old
[]
[]
[BCs]
[Periodic]
[xyz]
auto_direction = 'x y z'
variable = 'polar_x polar_y polar_z potential_E_int'
[]
[]
[phi_pin]
type = DirichletBC
variable = potential_E_int
boundary = 'pin_node'
value = 0
[]
[]
[Postprocessors]
[Fbulk]
type = BulkEnergyEighth
execute_on = 'initial timestep_end'
[]
[Fwall]
type = WallEnergy
execute_on = 'initial timestep_end'
[]
[Felec]
type = ElectrostaticEnergy
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-pc_type -sub_pc_type -ksp_type -ksp_rtol -ksp_gmres_restart'
petsc_options_value = 'bjacobi ilu gmres 1e-6 100'
[]
[]
[Executioner]
type = Transient
scheme = implicit-euler
solve_type = LINEAR
l_max_its = 300
dt = ${dt_polar}
end_time = 1e9
[]
[Outputs]
print_linear_residuals = false
[exo]
type = Exodus
file_base = PTO_3D_E_multi_exo
[]
[]
(test/tests/action/PTO_2D_E_action.i)
TC = 25.0
um = -0.01
l0 = 1.0
Lx = 8.0
tf = 2.0
nx = 40
ny = 10
lam = 8.0
P_seed = 0.3
Px_seed = 0.01
eps_r = 10.0
eps0 = 0.0088542
alpha1 = ${fparse 3.8e-4*(TC - 479.0)}
G110 = ${fparse l0*l0*abs(alpha1)}
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = ${nx}
ny = ${ny}
xmin = 0.0
xmax = ${Lx}
ymin = 0.0
ymax = ${tf}
elem_type = QUAD4
[]
[pin]
type = ExtraNodesetGenerator
input = gen
new_boundary = 'pin_node'
coord = '8.0 0.0 0.0'
use_closest_node = true
[]
[]
[GlobalParams]
displacements = 'u_x u_y'
global_strain = global_strain
[]
[Functions]
[ic_Py]
type = ParsedFunction
expression = '${P_seed}*cos(2*pi*x/${lam})'
[]
[ic_Px]
type = ParsedFunction
expression = '${Px_seed}*sin(2*pi*x/${lam})'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = SMALL
add_variables = true
eigenstrain_names = 'ferro'
generate_output = 'strain_xx strain_yy'
[]
[]
[Ferret/CubicParentFEPhaseField]
electrostatics = true
elastic = true
alpha_ijkl = 'alpha1 alpha11 alpha12 alpha111 alpha112 alpha123 alpha1111 alpha1112 alpha1122 alpha1123'
alpha_ijkl_val = '${alpha1} -0.073 0.75 0.26 0.61 -3.7 0.0 0.0 0.0 0.0'
G_ij = 'G110 G11_G110 G12_G110 G44_G110 G44P_G110'
G_ij_val = '${G110} 0.6 0.0 0.3 0.3'
Q_ij = 'Q11 Q12 Q44'
Q_ij_val = '0.089 -0.026 0.03375'
C_ij = 'C11 C12 C44'
C_ij_val = '174.269 79.029 47.62'
permittivity_val = '${fparse eps_r*eps0}'
[]
[ICs]
[Px]
type = FunctionIC
variable = polar_x
function = ic_Px
[]
[Py]
type = FunctionIC
variable = polar_y
function = ic_Py
[]
[Pz]
type = ConstantIC
variable = polar_z
value = 0.0
[]
[]
[AuxVariables]
[Pmag]
order = FIRST
family = LAGRANGE
[]
[wE]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[Pmag]
type = ParsedAux
variable = Pmag
coupled_variables = 'polar_x polar_y polar_z'
expression = 'sqrt(polar_x^2 + polar_y^2 + polar_z^2)'
execute_on = 'initial timestep_end'
[]
[wE]
type = WallEnergyDensity
variable = wE
polar_x = polar_x
polar_y = polar_y
polar_z = polar_z
execute_on = 'initial timestep_end'
[]
[]
[Materials]
[misfit]
type = GenericConstantRankTwoTensor
tensor_name = global_strain
tensor_values = '${um} 0 0 0 0 0 0 0 ${um}'
[]
[]
[BCs]
[Periodic]
[x]
auto_direction = 'x'
variable = 'polar_x polar_y polar_z potential_E_int u_x u_y'
[]
[]
[phi_pin]
type = DirichletBC
variable = potential_E_int
boundary = 'pin_node'
value = 0
[]
[clamp_x]
type = DirichletBC
variable = u_x
boundary = 'bottom'
value = 0
[]
[clamp_y]
type = DirichletBC
variable = u_y
boundary = 'bottom'
value = 0
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-pc_type -sub_pc_type -ksp_type -ksp_rtol -ksp_gmres_restart'
petsc_options_value = 'bjacobi ilu gmres 1e-6 100'
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
l_max_its = 200
end_time = 5.0
[TimeStepper]
type = IterationAdaptiveDT
dt = 0.5
growth_factor = 1.3
cutback_factor = 0.8
optimal_iterations = 8
linear_iteration_ratio = 1000
[]
dtmax = 5.0
num_steps = 3
[]
[Outputs]
print_linear_residuals = false
[exo]
type = Exodus
[]
[]
(test/tests/action/PTO_2D_action.i)
TC = 25.0
um = -0.01
l0 = 1.0
Lx = 8.0
tf = 2.0
nx = 40
ny = 10
lam = 8.0
P_seed = 0.3
Px_seed = 0.01
alpha1 = ${fparse 3.8e-4*(TC - 479.0)}
G110 = ${fparse l0*l0*abs(alpha1)}
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = ${nx}
ny = ${ny}
xmin = 0.0
xmax = ${Lx}
ymin = 0.0
ymax = ${tf}
elem_type = QUAD4
[]
[]
[GlobalParams]
displacements = 'u_x u_y'
global_strain = global_strain
[]
[Functions]
[ic_Py]
type = ParsedFunction
expression = '${P_seed}*cos(2*pi*x/${lam})'
[]
[ic_Px]
type = ParsedFunction
expression = '${Px_seed}*sin(2*pi*x/${lam})'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = SMALL
add_variables = true
eigenstrain_names = 'ferro'
generate_output = 'strain_xx strain_yy'
[]
[]
[Ferret/CubicParentFEPhaseField]
electrostatics = false
elastic = true
alpha_ijkl = 'alpha1 alpha11 alpha12 alpha111 alpha112 alpha123 alpha1111 alpha1112 alpha1122 alpha1123'
alpha_ijkl_val = '${alpha1} -0.073 0.75 0.26 0.61 -3.7 0.0 0.0 0.0 0.0'
G_ij = 'G110 G11_G110 G12_G110 G44_G110 G44P_G110'
G_ij_val = '${G110} 0.6 0.0 0.3 0.3'
Q_ij = 'Q11 Q12 Q44'
Q_ij_val = '0.089 -0.026 0.03375'
C_ij = 'C11 C12 C44'
C_ij_val = '174.269 79.029 47.62'
[]
[ICs]
[Px]
type = FunctionIC
variable = polar_x
function = ic_Px
[]
[Py]
type = FunctionIC
variable = polar_y
function = ic_Py
[]
[Pz]
type = ConstantIC
variable = polar_z
value = 0.0
[]
[]
[AuxVariables]
[Pmag]
order = FIRST
family = LAGRANGE
[]
[wE]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[Pmag]
type = ParsedAux
variable = Pmag
coupled_variables = 'polar_x polar_y polar_z'
expression = 'sqrt(polar_x^2 + polar_y^2 + polar_z^2)'
execute_on = 'initial timestep_end'
[]
[wE]
type = WallEnergyDensity
variable = wE
polar_x = polar_x
polar_y = polar_y
polar_z = polar_z
execute_on = 'initial timestep_end'
[]
[]
[Materials]
[misfit]
type = GenericConstantRankTwoTensor
tensor_name = global_strain
tensor_values = '${um} 0 0 0 0 0 0 0 ${um}'
[]
[]
[BCs]
[Periodic]
[x]
auto_direction = 'x'
variable = 'polar_x polar_y polar_z u_x u_y'
[]
[]
[clamp_x]
type = DirichletBC
variable = u_x
boundary = 'bottom'
value = 0
[]
[clamp_y]
type = DirichletBC
variable = u_y
boundary = 'bottom'
value = 0
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-pc_type -sub_pc_type -ksp_type -ksp_rtol -ksp_gmres_restart'
petsc_options_value = 'bjacobi ilu gmres 1e-6 100'
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
l_max_its = 200
end_time = 5.0
[TimeStepper]
type = IterationAdaptiveDT
dt = 0.5
growth_factor = 1.3
cutback_factor = 0.8
optimal_iterations = 8
linear_iteration_ratio = 1000
[]
dtmax = 5.0
num_steps = 3
[]
[Outputs]
print_linear_residuals = false
[exo]
type = Exodus
[]
[]
(test/tests/ics/PTO_3D_fluct.i)
TC = 25.0
um = -0.01
l0 = 1.0
L = 4.0
nx = 4
alpha1 = ${fparse 3.8e-4*(TC - 479.0)}
G110 = ${fparse l0*l0*abs(alpha1)}
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = ${nx}
ny = ${nx}
nz = ${nx}
xmin = 0.0
xmax = ${L}
ymin = 0.0
ymax = ${L}
zmin = 0.0
zmax = ${L}
elem_type = HEX8
[]
[pin]
type = ExtraNodesetGenerator
input = gen
new_boundary = 'pin_node'
coord = '2.0 2.0 2.0'
use_closest_node = true
[]
[]
[GlobalParams]
polar_x = polar_x
polar_y = polar_y
polar_z = polar_z
[]
[Variables]
[polar_x]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = FluctuationsIC
epsilon = 1.0e-5
q1 = '354 1005 645'
q2 = '715 1065 1132'
q3 = '391 305 1106'
q4 = '1053 1116 627'
h = 0.22
[]
[]
[polar_y]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = FluctuationsIC
epsilon = 1.0e-5
q1 = '354 850 10'
q2 = '715 28 5'
q3 = '391 305 1106'
q4 = '653 1116 627'
h = 0.15
[]
[]
[polar_z]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = FluctuationsIC
epsilon = 1.0e-5
q1 = '860 165 645'
q2 = '715 665 1332'
q3 = '361 15 706'
q4 = '253 1116 627'
h = 0.05
[]
[]
[u_x]
order = FIRST
family = LAGRANGE
[]
[u_y]
order = FIRST
family = LAGRANGE
[]
[u_z]
order = FIRST
family = LAGRANGE
[]
[]
[AuxVariables]
[Pmag]
order = FIRST
family = LAGRANGE
[]
[wE]
order = CONSTANT
family = MONOMIAL
[]
[strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[Pmag]
type = ParsedAux
variable = Pmag
coupled_variables = 'polar_x polar_y polar_z'
expression = 'sqrt(polar_x^2 + polar_y^2 + polar_z^2)'
execute_on = 'initial timestep_end'
[]
[wE]
type = WallEnergyDensity
variable = wE
execute_on = 'initial timestep_end'
[]
[strain_xx]
type = RankTwoAux
variable = strain_xx
rank_two_tensor = total_strain
index_i = 0
index_j = 0
execute_on = 'initial timestep_end'
[]
[strain_zz]
type = RankTwoAux
variable = strain_zz
rank_two_tensor = total_strain
index_i = 2
index_j = 2
execute_on = 'initial timestep_end'
[]
[]
[Materials]
[Landau_P]
type = GenericConstantMaterial
prop_names = 'alpha1 alpha11 alpha12 alpha111 alpha112 alpha123 alpha1111 alpha1112 alpha1122 alpha1123'
prop_values = '${alpha1} -0.073 0.75 0.26 0.61 -3.7 0.0 0.0 0.0 0.0'
[]
[Landau_G]
type = GenericConstantMaterial
prop_names = 'G110 G11_G110 G12_G110 G44_G110 G44P_G110'
prop_values = '${G110} 0.6 0.0 0.3 0.3'
[]
[mat_C]
type = GenericConstantMaterial
prop_names = 'C11 C12 C44'
prop_values = '174.269 79.029 47.62'
[]
[mat_Q]
type = GenericConstantMaterial
prop_names = 'Q11 Q12 Q44'
prop_values = '0.089 -0.026 0.03375'
[]
[elasticity_tensor]
type = ComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '174.269 79.029 79.029 174.269 79.029 174.269 47.62 47.62 47.62'
[]
[misfit]
type = GenericConstantRankTwoTensor
tensor_name = global_strain
tensor_values = '${um} 0 0 0 ${um} 0 0 0 0'
[]
[strain]
type = ComputeSmallStrain
displacements = 'u_x u_y u_z'
eigenstrain_names = 'ferro'
global_strain = global_strain
[]
[ferro]
type = ComputeCubicParentElectrostrictiveStrain
eigenstrain_name = ferro
[]
[stress]
type = ComputeLinearElasticStress
[]
[]
[Kernels]
[time_x]
type = TimeDerivative
variable = polar_x
[]
[time_y]
type = TimeDerivative
variable = polar_y
[]
[time_z]
type = TimeDerivative
variable = polar_z
[]
[div_x]
type = StressDivergenceTensors
variable = u_x
displacements = 'u_x u_y u_z'
component = 0
[]
[div_y]
type = StressDivergenceTensors
variable = u_y
displacements = 'u_x u_y u_z'
component = 1
[]
[div_z]
type = StressDivergenceTensors
variable = u_z
displacements = 'u_x u_y u_z'
component = 2
[]
[bed_x]
type = BulkEnergyDerivativeEighth
variable = polar_x
component = 0
[]
[bed_y]
type = BulkEnergyDerivativeEighth
variable = polar_y
component = 1
[]
[bed_z]
type = BulkEnergyDerivativeEighth
variable = polar_z
component = 2
[]
[walled_x]
type = WallEnergyDerivative
variable = polar_x
component = 0
[]
[walled_y]
type = WallEnergyDerivative
variable = polar_y
component = 1
[]
[walled_z]
type = WallEnergyDerivative
variable = polar_z
component = 2
[]
[electrostr_x]
type = CubicParentElasticPDerivative
variable = polar_x
component = 0
displacements = 'u_x u_y u_z'
[]
[electrostr_y]
type = CubicParentElasticPDerivative
variable = polar_y
component = 1
displacements = 'u_x u_y u_z'
[]
[electrostr_z]
type = CubicParentElasticPDerivative
variable = polar_z
component = 2
displacements = 'u_x u_y u_z'
[]
[]
[BCs]
[Periodic]
[xyz]
auto_direction = 'x y z'
variable = 'polar_x polar_y polar_z u_x u_y u_z'
[]
[]
[pin_ux]
type = DirichletBC
variable = u_x
boundary = 'pin_node'
value = 0
[]
[pin_uy]
type = DirichletBC
variable = u_y
boundary = 'pin_node'
value = 0
[]
[pin_uz]
type = DirichletBC
variable = u_z
boundary = 'pin_node'
value = 0
[]
[]
[Postprocessors]
[Fbulk]
type = BulkEnergyEighth
execute_on = 'initial timestep_end'
[]
[Fwall]
type = WallEnergy
execute_on = 'initial timestep_end'
[]
[Felastic]
type = CubicParentElasticEnergy
execute_on = 'initial timestep_end'
[]
[Ftotal]
type = LinearCombinationPostprocessor
pp_names = 'Fbulk Fwall Felastic'
pp_coefs = '1 1 1'
execute_on = 'timestep_end'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
petsc_options_iname = '-pc_type -sub_pc_type -ksp_type -ksp_rtol -ksp_gmres_restart'
petsc_options_value = 'bjacobi ilu gmres 1e-6 100'
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
l_max_its = 200
end_time = 5.0
[TimeStepper]
type = IterationAdaptiveDT
dt = 0.5
growth_factor = 1.3
cutback_factor = 0.8
optimal_iterations = 8
linear_iteration_ratio = 1000
[]
dtmax = 5.0
num_steps = 3
[]
[Outputs]
print_linear_residuals = false
[exo]
type = Exodus
[]
[]