- componentAn integer corresponding to the direction in order parameter space this kernel acts in (e.g. for unrotated functionals 0 for q_x, 1 for q_y, 2 for q_z).
C++ Type:unsigned int
Controllable:No
Description:An integer corresponding to the direction in order parameter space this kernel acts in (e.g. for unrotated functionals 0 for q_x, 1 for q_y, 2 for q_z).
- 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 residual object operates on
C++ Type:NonlinearVariableName
Unit:(no unit assumed)
Controllable:No
Description:The name of the variable that this residual object operates on
CubicParentElasticPDerivative
The CubicParentElasticPDerivative has not been documented. The content listed below should be used as a starting point for documenting the class, which includes the typical automatic documentation associated with a MooseObject; however, what is contained is ultimately determined by what is necessary to make the documentation clear for users.
Calculates a residual contribution due to the variation w.r.t polarization of the electrostrictive coupling energy. Note: for cubic parent phase only.
Overview
Example Input File Syntax
Input Parameters
- base_nameMaterial property base name
C++ Type:std::string
Controllable:No
Description:Material property base name
- 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
- displacementsThe displacement variables. Optional; when given, the P<-u Jacobian block is assembled (needs the 'elasticity_tensor' material property).
C++ Type:std::vector<VariableName>
Unit:(no unit assumed)
Controllable:No
Description:The displacement variables. Optional; when given, the P<-u Jacobian block is assembled (needs the 'elasticity_tensor' material property).
- global_strainThe SCALAR mean strain, if it is being solved for. Optional; when given, the P<->eps_bar blocks are assembled.
C++ Type:std::vector<VariableName>
Unit:(no unit assumed)
Controllable:No
Description:The SCALAR mean strain, if it is being solved for. Optional; when given, the P<->eps_bar blocks are assembled.
- 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
- absolute_value_vector_tagsThe tags for the vectors this residual object should fill with the absolute value of the residual contribution
C++ Type:std::vector<TagName>
Controllable:No
Description:The tags for the vectors this residual object should fill with the absolute value of the residual contribution
- extra_matrix_tagsThe extra tags for the matrices this Kernel should fill
C++ Type:std::vector<TagName>
Controllable:No
Description:The extra tags for the matrices this Kernel should fill
- extra_vector_tagsThe extra tags for the vectors this Kernel should fill
C++ Type:std::vector<TagName>
Controllable:No
Description:The extra tags for the vectors this Kernel should fill
- matrix_onlyFalseWhether this object is only doing assembly to matrices (no vectors)
Default:False
C++ Type:bool
Controllable:No
Description:Whether this object is only doing assembly to matrices (no vectors)
- matrix_tagssystemThe tag for the matrices this Kernel should fill
Default:system
C++ Type:MultiMooseEnum
Options:nontime, system
Controllable:No
Description:The tag for the matrices this Kernel should fill
- vector_tagsnontimeThe tag for the vectors this Kernel should fill
Default:nontime
C++ Type:MultiMooseEnum
Options:nontime, time
Controllable:No
Description:The tag for the vectors this Kernel should fill
Contribution To Tagged Field Data Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- diag_save_inThe name of auxiliary variables to save this Kernel's diagonal Jacobian contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)
C++ Type:std::vector<AuxVariableName>
Unit:(no unit assumed)
Controllable:No
Description:The name of auxiliary variables to save this Kernel's diagonal Jacobian contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:Yes
Description:Set the enabled status of the MooseObject.
- implicitTrueDetermines whether this object is calculated using an implicit or explicit form
Default:True
C++ Type:bool
Controllable:No
Description:Determines whether this object is calculated using an implicit or explicit form
- save_inThe name of auxiliary variables to save this Kernel's residual contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)
C++ Type:std::vector<AuxVariableName>
Unit:(no unit assumed)
Controllable:No
Description:The name of auxiliary variables to save this Kernel's residual contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)
- 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/electrooptics/BTO_monodomain_T298K_REFnoEO.i)
- (test/tests/film/PTO_film_substrate_full.i)
- (test/tests/film/PTO_film_substrate_multi_polar.i)
- (test/tests/polar-elastic/PTO_3D_multi_polar.i)
- (test/tests/film/PTO_film_clamped_full.i)
- (test/tests/auxkernels/surface_charge.i)
- (test/tests/domain_wall/test_BTO_domain_wall.i)
- (test/tests/pertsev/BTO_pertsev_polar.i)
- (test/tests/polar-elastic/PTO_2D_full.i)
- (test/tests/polar-elastic-electric/PTO_3D_E_multi_polar.i)
- (test/tests/dispersion/perturbBTO_PzEz.i)
- (test/tests/dispersion/perturbBTO_PyEz.i)
- (test/tests/bulk/BTO_bulk_relax.i)
- (test/tests/electrostatics/PTO_STO_2D_E_full.i)
- (test/tests/userobjects/terminator_multi_polar.i)
- (test/tests/film/PTO_film_clamped_multi_polar.i)
- (test/tests/polar-elastic-electric/PTO_2D_E_multi_polar.i)
- (test/tests/userobjects/terminator_full.i)
- (test/tests/pertsev/STO_pertsev_polar.i)
- (test/tests/ics/PTO_3D_fluct.i)
- (test/tests/polar-elastic-electric/PTO_2D_E_full.i)
- (test/tests/pertsev/PTO_pertsev_polar.i)
- (test/tests/polar-elastic/PTO_2D_multi_polar.i)
- (tutorial/ferroelectric_domain_wall.i)
- (test/tests/polar-elastic/PTO_3D_full.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/electrooptics/BTO_monodomain_T298K_REFnoEO.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 2
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
elem_type = HEX8
[]
[./cnode]
input = gen
type = ExtraNodesetGenerator
coord = '-0.5 -0.5 -0.5'
new_boundary = 100
[../]
[]
[GlobalParams]
len_scale = 1.0
polar_x = polar_x
polar_y = polar_y
polar_z = polar_z
potential_E_int = potential_E_int
displacements = 'u_x u_y u_z'
[]
[Functions]
[./stripe1]
type = ParsedFunction
expression = 0.01*cos(0.08975979010256552*(x))
[../]
[]
[Variables]
[./global_strain]
order = SIXTH
family = SCALAR
[../]
[./polar_x]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
min = -0.01e-4
max = 0.01e-4
[../]
[../]
[./polar_y]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
min = 0.01
max = 0.02
[../]
[../]
[./polar_z]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
min = -0.01e-4
max = 0.01e-4
[../]
[../]
[./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]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./stress_xx_elastic]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy_elastic]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy_elastic]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xz_elastic]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz_elastic]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz_elastic]
order = CONSTANT
family = MONOMIAL
[../]
[./e00]
order = CONSTANT
family = MONOMIAL
[../]
[./e01]
order = CONSTANT
family = MONOMIAL
[../]
[./e10]
order = CONSTANT
family = MONOMIAL
[../]
[./e11]
order = CONSTANT
family = MONOMIAL
[../]
[./e12]
order = CONSTANT
family = MONOMIAL
[../]
[./e22]
order = CONSTANT
family = MONOMIAL
[../]
[./dpn_1]
order = CONSTANT
family = MONOMIAL
[../]
[./dpn_2]
order = CONSTANT
family = MONOMIAL
[../]
[./dpn_3]
order = CONSTANT
family = MONOMIAL
[../]
[./den_1]
order = CONSTANT
family = MONOMIAL
[../]
[./den_2]
order = CONSTANT
family = MONOMIAL
[../]
[./den_3]
order = CONSTANT
family = MONOMIAL
[../]
[./n_1]
order = CONSTANT
family = MONOMIAL
[../]
[./n_2]
order = CONSTANT
family = MONOMIAL
[../]
[./n_3]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./disp_x]
type = GlobalDisplacementAux
variable = disp_x
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 0
use_displaced_mesh = false
[../]
[./disp_y]
type = GlobalDisplacementAux
variable = disp_y
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 1
use_displaced_mesh = false
[../]
[./disp_z]
type = GlobalDisplacementAux
variable = disp_z
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 2
use_displaced_mesh = false
[../]
[./e00]
type = RankTwoAux
variable = e00
rank_two_tensor = total_strain
index_i = 0
index_j = 0
[../]
[./e01]
type = RankTwoAux
variable = e01
rank_two_tensor = total_strain
index_i = 0
index_j = 1
[../]
[./e10]
type = RankTwoAux
variable = e10
rank_two_tensor = total_strain
index_i = 1
index_j = 0
[../]
[./e12]
type = RankTwoAux
variable = e12
rank_two_tensor = total_strain
index_i = 1
index_j = 2
[../]
[./e11]
type = RankTwoAux
variable = e11
rank_two_tensor = total_strain
index_i = 1
index_j = 1
[../]
[./e22]
type = RankTwoAux
variable = e22
rank_two_tensor = total_strain
index_i = 2
index_j = 2
[../]
[./dn_p1]
type = PolarOpticChangeInRefractiveIndex
component = 0
variable = dpn_1
execute_on = 'timestep_end'
[../]
[./dn_p2]
type = PolarOpticChangeInRefractiveIndex
component = 1
variable = dpn_2
execute_on = 'timestep_end'
[../]
[./dn_p3]
type = PolarOpticChangeInRefractiveIndex
component = 2
variable = dpn_3
execute_on = 'timestep_end'
[../]
[./dn_e1]
type = ElastoChangeInRefractiveIndex
component = 0
variable = den_1
u_x = u_x
u_y = u_y
u_z = u_z
execute_on = 'timestep_end'
[../]
[./dn_e2]
type = ElastoChangeInRefractiveIndex
component = 1
variable = den_2
u_x = u_x
u_y = u_y
u_z = u_z
execute_on = 'timestep_end'
[../]
[./dn_e3]
type = ElastoChangeInRefractiveIndex
component = 2
variable = den_3
u_x = u_x
u_y = u_y
u_z = u_z
execute_on = 'timestep_end'
[../]
[./n_1_c]
type = ReworkedRefractiveIndex
variable = n_1
elasto = false
electro = false
polar = true
component = 0
var1 = dpn_1
execute_on = 'timestep_end'
[../]
[./n_2_c]
type = ReworkedRefractiveIndex
variable = n_2
elasto = false
electro = false
polar = true
component = 1
var1 = dpn_2
execute_on = 'timestep_end'
[../]
[./n_3_c]
type = ReworkedRefractiveIndex
variable = n_3
elasto = false
electro = false
polar = true
component = 2
var1 = dpn_3
execute_on = 'timestep_end'
[../]
[]
[ScalarKernels]
[./global_strain]
type = GlobalStrain
variable = global_strain
global_strain_uo = global_strain_uo
use_displaced_mesh = false
[../]
[]
[Materials]
[./Landau_P]
type = GenericConstantMaterial
prop_names = 'alpha1 alpha11 alpha12 alpha111 alpha112 alpha123 alpha1111 alpha1112 alpha1122 alpha1123'
prop_values = '-0.027721 -0.64755 0.323 8.004 4.47 4.91 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 = '0.5 0.51 -0.02 0.02 0.0'
[../]
[./mat_C]
type = GenericConstantMaterial
prop_names = 'C11 C12 C44'
prop_values = '275.0 179.0 54.3'
[../]
[./mat_Q]
type = GenericConstantMaterial
prop_names = 'Q11 Q12 Q44'
prop_values = '0.11 -0.045 0.029'
[../]
[./ferro]
type = ComputeCubicParentElectrostrictiveStrain
eigenstrain_name = ferro
[../]
[./elasticity_tensor_1]
type = ComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '275.0 179.0 179.0 275.0 179.0 275.0 54.3 54.3 54.3'
[../]
[./strain_1]
type = ComputeSmallStrain
global_strain = global_strain
eigenstrain_names = 'ferro'
[../]
[./stress_1]
type = ComputeLinearElasticStress
[../]
[./global_strain]
type = ComputeGlobalStrain
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
[../]
[./ref_index]
type = GenericConstantMaterial
prop_names = 'n1 n2 n3 n4 n5 n6'
prop_values = '2.4272 2.4272 2.4272 0.0 0.0 0.0'
[../]
[./po_tensor]
type = GenericConstantMaterial
prop_names = 'g1111 g1122 g1212'
prop_values = '0.15 0.038 0.07'
[../]
[./eo_tensor]
type = GenericConstantMaterial
prop_names = 'p1111 p1122 p1212'
prop_values = '0.37 0.11 -0.30'
[../]
[./eps]
type = GenericConstantMaterial
prop_names = 'permittivity'
prop_values = '0.08854187'
[../]
[]
[Kernels]
[./SolidMechanics]
use_displaced_mesh = false
[../]
[./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_polar_coupled_x]
type = CubicParentElasticPDerivative
displacements = 'u_x u_y u_z'
variable = polar_x
component = 0
[../]
[./electrostr_polar_coupled_y]
type = CubicParentElasticPDerivative
displacements = 'u_x u_y u_z'
variable = polar_y
component = 1
[../]
[./electrostr_polar_coupled_z]
type = CubicParentElasticPDerivative
displacements = 'u_x u_y u_z'
variable = polar_z
component = 2
[../]
[./polar_x_electric_E]
type = PolarElectricEStrong
variable = potential_E_int
[../]
[./FE_E_int]
type = Electrostatics
variable = potential_E_int
[../]
[./polar_electric_px]
type = PolarElectricPStrong
variable = polar_x
component = 0
[../]
[./polar_electric_py]
type = PolarElectricPStrong
variable = polar_y
component = 1
[../]
[./polar_electric_pz]
type = PolarElectricPStrong
variable = polar_z
component = 2
[../]
[./polar_x_time]
type = TimeDerivativeScaled
variable=polar_x
time_scale = 1.0
[../]
[./polar_y_time]
type = TimeDerivativeScaled
variable=polar_y
time_scale = 1.0
[../]
[./polar_z_time]
type = TimeDerivativeScaled
variable = polar_z
time_scale = 1.0
[../]
[]
[BCs]
[./Periodic]
[./xyz]
auto_direction = 'x y z'
variable = 'u_x u_y u_z polar_x polar_y polar_z'
[../]
[../]
[./boundary_grounding]
type = DirichletBC
boundary = '0 1 2 3 4 5'
variable = potential_E_int
value = 0.0
[../]
[./centerfix_x]
type = DirichletBC
boundary = 100
variable = u_x
value = 0
[../]
[./centerfix_y]
type = DirichletBC
boundary = 100
variable = u_y
value = 0
[../]
[./centerfix_z]
type = DirichletBC
boundary = 100
variable = u_z
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'
use_displaced_mesh = false
[../]
[./Felec]
type = ElectrostaticEnergy
execute_on = 'initial timestep_end'
[../]
[./Ftotal]
type = LinearCombinationPostprocessor
pp_names = 'Fbulk Fwall Felastic Felec'
pp_coefs = ' 1 1 1 1'
execute_on = 'initial timestep_end'
[../]
[]
[UserObjects]
[./global_strain_uo]
type = GlobalStrainUserObject
use_displaced_mesh = false
execute_on = 'Initial Linear Nonlinear'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart -snes_atol -snes_rtol -ksp_rtol -pc_type -build_twosided'
petsc_options_value = ' 160 1e-10 1e-8 1e-6 bjacobi allreduce'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
scheme = 'implicit-euler'
dtmin = 1e-13
dtmax = 3.0
l_max_its = 200
[./TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 8
cutback_factor = 0.75
linear_iteration_ratio = 1000
dt = 0.3
[../]
verbose = true
num_steps = 5
[]
[Outputs]
print_linear_residuals = false
perf_graph = false
[./out]
type = Exodus
file_base = test_bire_no_EO
elemental_as_nodal = true
[../]
[]
(test/tests/film/PTO_film_substrate_full.i)
TC = 25.0
l0 = 1.0
L = 4.0
dx = 1.0
nx = ${fparse int(L/dx + 0.5)}
h_film = 4.0
h_sub = 2.0
nz = ${fparse int((h_film + h_sub)/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 = ${nz}
xmin = 0.0
xmax = ${L}
ymin = 0.0
ymax = ${L}
zmin = ${fparse -h_sub}
zmax = ${h_film}
elem_type = HEX8
[]
[subdomains]
type = SubdomainBoundingBoxGenerator
input = gen
block_id = 1
bottom_left = '0.0 0.0 ${fparse -h_sub}'
top_right = '${L} ${L} 0.0'
location = INSIDE
[]
[film_interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomains
primary_block = 0
paired_block = 1
new_boundary = 'film_interface'
[]
[]
[GlobalParams]
polar_x = polar_x
polar_y = polar_y
polar_z = polar_z
displacements = 'u_x u_y u_z'
[]
[Variables]
[polar_x]
order = FIRST
family = LAGRANGE
block = 0
[InitialCondition]
type = RandomIC
min = -0.5
max = 0.5
seed = 1
[]
[]
[polar_y]
order = FIRST
family = LAGRANGE
block = 0
[InitialCondition]
type = RandomIC
min = -0.5
max = 0.5
seed = 2
[]
[]
[polar_z]
order = FIRST
family = LAGRANGE
block = 0
[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
block = 0
[]
[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)'
block = 0
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'
block = 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'
block = 0
[]
[mat_C]
type = GenericConstantMaterial
prop_names = 'C11 C12 C44'
prop_values = '174.269 79.029 47.62'
block = 0
[]
[mat_Q]
type = GenericConstantMaterial
prop_names = 'Q11 Q12 Q44'
prop_values = '0.089 -0.026 0.03375'
block = 0
[]
[elasticity_tensor_film]
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
[]
[ferro]
type = ComputeCubicParentElectrostrictiveStrain
eigenstrain_name = ferro
block = 0
[]
[strain_film]
type = ComputeSmallStrain
eigenstrain_names = 'ferro'
block = 0
[]
[stress_film]
type = ComputeLinearElasticStress
block = 0
[]
[elasticity_tensor_sub]
type = ComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '318.0 103.0 103.0 318.0 103.0 318.0 124.0 124.0 124.0'
block = 1
[]
[strain_sub]
type = ComputeSmallStrain
block = 1
[]
[stress_sub]
type = ComputeLinearElasticStress
block = 1
[]
[]
[Kernels]
[div_x]
type = StressDivergenceTensors
variable = u_x
component = 0
[]
[div_y]
type = StressDivergenceTensors
variable = u_y
component = 1
[]
[div_z]
type = StressDivergenceTensors
variable = u_z
component = 2
[]
[time_x]
type = TimeDerivative
variable = polar_x
block = 0
[]
[time_y]
type = TimeDerivative
variable = polar_y
block = 0
[]
[time_z]
type = TimeDerivative
variable = polar_z
block = 0
[]
[bed_x]
type = BulkEnergyDerivativeEighth
variable = polar_x
component = 0
block = 0
[]
[bed_y]
type = BulkEnergyDerivativeEighth
variable = polar_y
component = 1
block = 0
[]
[bed_z]
type = BulkEnergyDerivativeEighth
variable = polar_z
component = 2
block = 0
[]
[walled_x]
type = WallEnergyDerivative
variable = polar_x
component = 0
block = 0
[]
[walled_y]
type = WallEnergyDerivative
variable = polar_y
component = 1
block = 0
[]
[walled_z]
type = WallEnergyDerivative
variable = polar_z
component = 2
block = 0
[]
[electrostr_x]
type = CubicParentElasticPDerivative
variable = polar_x
component = 0
block = 0
[]
[electrostr_y]
type = CubicParentElasticPDerivative
variable = polar_y
component = 1
block = 0
[]
[electrostr_z]
type = CubicParentElasticPDerivative
variable = polar_z
component = 2
block = 0
[]
[]
[BCs]
[Periodic]
[xy]
auto_direction = 'x y'
variable = 'u_x u_y u_z polar_x polar_y polar_z'
[]
[]
[sub_fix_x]
type = DirichletBC
variable = u_x
boundary = 'back'
value = 0
[]
[sub_fix_y]
type = DirichletBC
variable = u_y
boundary = 'back'
value = 0
[]
[sub_fix_z]
type = DirichletBC
variable = u_z
boundary = 'back'
value = 0
[]
[]
[Postprocessors]
[Fbulk]
type = BulkEnergyEighth
block = 0
execute_on = 'initial timestep_end'
[]
[Fwall]
type = WallEnergy
block = 0
execute_on = 'initial timestep_end'
[]
[Felastic]
type = CubicParentElasticEnergy
block = 0
execute_on = 'initial timestep_end'
[]
[Ftotal]
type = LinearCombinationPostprocessor
pp_names = 'Fbulk Fwall Felastic'
pp_coefs = '1 1 1'
execute_on = 'timestep_end'
[]
[exx_film]
type = ElementAverageValue
variable = strain_xx
block = 0
execute_on = 'initial timestep_end'
[]
[ezz_film]
type = ElementAverageValue
variable = strain_zz
block = 0
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
[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
file_base = PTO_film_substrate_full_exo
[]
[]
(test/tests/film/PTO_film_substrate_multi_polar.i)
TC = 25.0
l0 = 1.0
L = 4.0
dx = 1.0
nx = ${fparse int(L/dx + 0.5)}
h_film = 4.0
h_sub = 2.0
nz = ${fparse int((h_film + h_sub)/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 = ${nz}
xmin = 0.0
xmax = ${L}
ymin = 0.0
ymax = ${L}
zmin = ${fparse -h_sub}
zmax = ${h_film}
elem_type = HEX8
[]
[subdomains]
type = SubdomainBoundingBoxGenerator
input = gen
block_id = 1
bottom_left = '0.0 0.0 ${fparse -h_sub}'
top_right = '${L} ${L} 0.0'
location = INSIDE
[]
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[GlobalParams]
polar_x = polar_x
polar_y = polar_y
polar_z = polar_z
displacements = 'u_x u_y u_z'
[]
[Variables]
[polar_x]
order = FIRST
family = LAGRANGE
block = 0
[InitialCondition]
type = RandomIC
min = -0.5
max = 0.5
seed = 1
[]
[]
[polar_y]
order = FIRST
family = LAGRANGE
block = 0
[InitialCondition]
type = RandomIC
min = -0.5
max = 0.5
seed = 2
[]
[]
[polar_z]
order = FIRST
family = LAGRANGE
block = 0
[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
block = 0
[]
[Py_old]
order = FIRST
family = LAGRANGE
block = 0
[]
[Pz_old]
order = FIRST
family = LAGRANGE
block = 0
[]
[Pmag]
order = FIRST
family = LAGRANGE
block = 0
[]
[]
[AuxKernels]
[Px_old]
type = ParsedAux
variable = Px_old
coupled_variables = 'polar_x'
expression = 'polar_x'
block = 0
execute_on = 'initial timestep_begin'
[]
[Py_old]
type = ParsedAux
variable = Py_old
coupled_variables = 'polar_y'
expression = 'polar_y'
block = 0
execute_on = 'initial timestep_begin'
[]
[Pz_old]
type = ParsedAux
variable = Pz_old
coupled_variables = 'polar_z'
expression = 'polar_z'
block = 0
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)'
block = 0
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'
block = 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'
block = 0
[]
[mat_C]
type = GenericConstantMaterial
prop_names = 'C11 C12 C44'
prop_values = '174.269 79.029 47.62'
block = 0
[]
[mat_Q]
type = GenericConstantMaterial
prop_names = 'Q11 Q12 Q44'
prop_values = '0.089 -0.026 0.03375'
block = 0
[]
[elasticity_tensor_film]
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
[]
[strain]
type = ComputeSmallStrain
block = 0
[]
[]
[Kernels]
[time_x]
type = TimeDerivative
variable = polar_x
block = 0
[]
[time_y]
type = TimeDerivative
variable = polar_y
block = 0
[]
[time_z]
type = TimeDerivative
variable = polar_z
block = 0
[]
[bed_x]
type = BulkEnergyDerivativeEighth
variable = polar_x
component = 0
block = 0
polar_x = Px_old
polar_y = Py_old
polar_z = Pz_old
[]
[bed_y]
type = BulkEnergyDerivativeEighth
variable = polar_y
component = 1
block = 0
polar_x = Px_old
polar_y = Py_old
polar_z = Pz_old
[]
[bed_z]
type = BulkEnergyDerivativeEighth
variable = polar_z
component = 2
block = 0
polar_x = Px_old
polar_y = Py_old
polar_z = Pz_old
[]
[walled_x]
type = WallEnergyDerivative
variable = polar_x
component = 0
block = 0
[]
[walled_y]
type = WallEnergyDerivative
variable = polar_y
component = 1
block = 0
[]
[walled_z]
type = WallEnergyDerivative
variable = polar_z
component = 2
block = 0
[]
[electrostr_x]
type = CubicParentElasticPDerivative
variable = polar_x
component = 0
block = 0
polar_x = Px_old
polar_y = Py_old
polar_z = Pz_old
[]
[electrostr_y]
type = CubicParentElasticPDerivative
variable = polar_y
component = 1
block = 0
polar_x = Px_old
polar_y = Py_old
polar_z = Pz_old
[]
[electrostr_z]
type = CubicParentElasticPDerivative
variable = polar_z
component = 2
block = 0
polar_x = Px_old
polar_y = Py_old
polar_z = Pz_old
[]
[]
[BCs]
[Periodic]
[xy]
auto_direction = 'x y'
variable = 'polar_x polar_y polar_z'
[]
[]
[]
[Postprocessors]
[Fbulk]
type = BulkEnergyEighth
block = 0
execute_on = 'initial timestep_end'
[]
[Fwall]
type = WallEnergy
block = 0
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_substrate_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/film/PTO_film_clamped_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
[]
[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'
[]
[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'
[]
[exx_avg]
type = ElementAverageValue
variable = strain_xx
execute_on = 'initial timestep_end'
[]
[ezz_avg]
type = ElementAverageValue
variable = strain_zz
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
[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
file_base = PTO_film_clamped_full_exo
[]
[]
(test/tests/auxkernels/surface_charge.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 4
ny = 4
nz = 8
xmin = -1.0
xmax = 1.0
ymin = -1.0
ymax = 1.0
zmin = -2.0
zmax = 2.0
elem_type = HEX8
[]
[./cnode]
input = gen
type = ExtraNodesetGenerator
coord = '-1.0 -1.0 -2.0'
new_boundary = 100
[../]
[subdomains]
type = SubdomainBoundingBoxGenerator
input = cnode
bottom_left = '-1.0 -1.0 -2.0'
block_id = 1
top_right = '1.0 1.0 0'
location = INSIDE
[]
[film_interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomains
primary_block = 0
paired_block = 1
new_boundary = 52
[]
[film_surface]
type = SideSetsFromNormalsGenerator
input = film_interface
normals = '0 0 1'
fixed_normal = true
new_boundary = '107'
[]
[substrate_bottom]
type = SideSetsFromNormalsGenerator
input = film_surface
normals = '0 0 -1'
fixed_normal = true
new_boundary = '108'
[]
[]
[GlobalParams]
len_scale = 1.0
polar_x = polar_x
polar_y = polar_y
polar_z = polar_z
potential_E_int = potential_E_int
displacements = 'u_x u_y u_z'
[]
[Variables]
[./global_strain]
order = SIXTH
family = SCALAR
[../]
[./polar_x]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
min = -1e-2
max = 1e-2
[../]
block = '0'
[../]
[./polar_y]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
min = -1e-2
max = 1e-2
[../]
block = '0'
[../]
[./polar_z]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
min = -1e-2
max = 1e-2
[../]
block = '0'
[../]
[./potential_E_int]
order = FIRST
family = LAGRANGE
block = '0 1'
[../]
[./u_x]
order = FIRST
family = LAGRANGE
block = '0 1'
[../]
[./u_y]
order = FIRST
family = LAGRANGE
block = '0 1'
[../]
[./u_z]
order = FIRST
family = LAGRANGE
block = '0 1'
[../]
[]
[AuxVariables]
[./disp_x]
block = '0 1'
[../]
[./disp_y]
block = '0 1'
[../]
[./disp_z]
block = '0 1'
[../]
[./e00]
order = CONSTANT
family = MONOMIAL
[../]
[./e01]
order = CONSTANT
family = MONOMIAL
[../]
[./e10]
order = CONSTANT
family = MONOMIAL
[../]
[./e11]
order = CONSTANT
family = MONOMIAL
[../]
[./e12]
order = CONSTANT
family = MONOMIAL
[../]
[./e22]
order = CONSTANT
family = MONOMIAL
[../]
[./s00]
order = CONSTANT
family = MONOMIAL
[../]
[./s01]
order = CONSTANT
family = MONOMIAL
[../]
[./s10]
order = CONSTANT
family = MONOMIAL
[../]
[./s11]
order = CONSTANT
family = MONOMIAL
[../]
[./s12]
order = CONSTANT
family = MONOMIAL
[../]
[./s22]
order = CONSTANT
family = MONOMIAL
[../]
[./divP]
order = CONSTANT
family = MONOMIAL
block = '0'
[../]
[./surfP]
order = CONSTANT
family = MONOMIAL
[../]
## P.n on the film/substrate interface (52), the remaining piece of
## the closed surface of block 0. It needs its OWN variable: a face
## value is written into the element dof, so two boundaries sharing
## an element cannot share a CONSTANT MONOMIAL variable.
[./surfP_52]
order = CONSTANT
family = MONOMIAL
block = '0'
## This variable exists only to feed the divergence-theorem assertion
## in [UserObjects], so keep it out of the Exodus file. That makes the
## whole check strictly additive and leaves the gold untouched.
outputs = none
[../]
[]
[AuxKernels]
[./disp_x]
type = GlobalDisplacementAux
variable = disp_x
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 0
use_displaced_mesh = false
[../]
[./disp_y]
type = GlobalDisplacementAux
variable = disp_y
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 1
use_displaced_mesh = false
[../]
[./disp_z]
type = GlobalDisplacementAux
variable = disp_z
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 2
use_displaced_mesh = false
[../]
[./e00]
type = RankTwoAux
variable = e00
rank_two_tensor = total_strain
index_i = 0
index_j = 0
[../]
[./e01]
type = RankTwoAux
variable = e01
rank_two_tensor = total_strain
index_i = 0
index_j = 1
[../]
[./e10]
type = RankTwoAux
variable = e10
rank_two_tensor = total_strain
index_i = 1
index_j = 0
[../]
[./e12]
type = RankTwoAux
variable = e12
rank_two_tensor = total_strain
index_i = 1
index_j = 2
[../]
[./e11]
type = RankTwoAux
variable = e11
rank_two_tensor = total_strain
index_i = 1
index_j = 1
[../]
[./e22]
type = RankTwoAux
variable = e22
rank_two_tensor = total_strain
index_i = 2
index_j = 2
[../]
[./s00]
type = RankTwoAux
variable = s00
rank_two_tensor = stress
index_i = 0
index_j = 0
[../]
[./s01]
type = RankTwoAux
variable = s01
rank_two_tensor = stress
index_i = 0
index_j = 1
[../]
[./s10]
type = RankTwoAux
variable = s10
rank_two_tensor = stress
index_i = 1
index_j = 0
[../]
[./s12]
type = RankTwoAux
variable = s12
rank_two_tensor = stress
index_i = 1
index_j = 2
[../]
[./s11]
type = RankTwoAux
variable = s11
rank_two_tensor = stress
index_i = 1
index_j = 1
[../]
[./s22]
type = RankTwoAux
variable = s22
rank_two_tensor = stress
index_i = 2
index_j = 2
[../]
[./divP]
type = DivP
variable = divP
[../]
[./surfP]
type = SurfaceChargeP
variable = surfP
boundary = '107'
[../]
[./surfP_52]
type = SurfaceChargeP
variable = surfP_52
boundary = '52'
[../]
[]
[ScalarKernels]
[./global_strain]
type = GlobalStrain
variable = global_strain
global_strain_uo = global_strain_uo
use_displaced_mesh = false
[../]
[]
[Materials]
[./Landau_P_FE]
type = GenericConstantMaterial
prop_names = 'alpha1 alpha11 alpha12 alpha111 alpha112 alpha123 alpha1111 alpha1112 alpha1122 alpha1123'
prop_values = '-0.1722883 -0.073 0.75 0.26 0.61 -3.67 0.0 0.0 0.0 0.0'
block = '0'
[../]
[./Landau_P_substr]
type = GenericConstantMaterial
prop_names = 'alpha1 alpha11 alpha12 alpha111 alpha112 alpha123 alpha1111 alpha1112 alpha1122 alpha1123'
prop_values = '10.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0'
block = '1'
[../]
[./Landau_G_FE]
type = GenericConstantMaterial
prop_names = 'G110 G11_G110 G12_G110 G44_G110 G44P_G110'
prop_values = '0.173 0.6 0.0 0.3 0.3'
block = '0'
[../]
[./mat_C_FE]
type = GenericConstantMaterial
prop_names = 'C11 C12 C44'
prop_values = '175.0 79.4 111.1'
block = '0'
[../]
[./mat_C_sub]
type = GenericConstantMaterial
prop_names = 'C11 C12 C44'
prop_values = '220.0 34.4 161.1'
block = '1'
[../]
[./mat_Q]
type = GenericConstantMaterial
prop_names = 'Q11 Q12 Q44'
prop_values = '0.089 -0.026 0.03375'
block = '0 1'
[../]
[./ferro]
type = ComputeCubicParentElectrostrictiveStrain
eigenstrain_name = ferro
block = '0'
[../]
[./eigen_strain]
type = ComputeEigenstrain
eigen_base = '1.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0'
eigenstrain_name = eigenstrain
prefactor = 0.0
block = '1'
[../]
[./elasticity_tensor_1]
type = ComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '175.0 79.4 79.4 175.0 79.4 175.0 111.1 111.1 111.1'
[../]
[./strain_film]
type = ComputeSmallStrain
global_strain = global_strain
eigenstrain_names = 'ferro'
block = '0'
[../]
[./strain_substrate]
type = ComputeSmallStrain
global_strain = global_strain
eigenstrain_names = 'eigenstrain'
block = '1'
[../]
[./stress_1]
type = ComputeLinearElasticStress
[../]
[./global_strain]
type = ComputeGlobalStrain
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
[../]
[./permitivitty_1]
type = GenericConstantMaterial
prop_names = 'permittivity'
prop_values = '0.08854187'
[../]
[]
[Kernels]
[./div_x]
type = StressDivergenceTensors
variable = u_x
component = 0
use_displaced_mesh = false
[../]
[./div_y]
type = StressDivergenceTensors
variable = u_y
component = 1
use_displaced_mesh = false
[../]
[./div_z]
type = StressDivergenceTensors
variable = u_z
component = 2
use_displaced_mesh = false
[../]
[./bed_x]
type = BulkEnergyDerivativeEighth
variable = polar_x
component = 0
block = '0'
[../]
[./bed_y]
type = BulkEnergyDerivativeEighth
variable = polar_y
component = 1
block = '0'
[../]
[./bed_z]
type = BulkEnergyDerivativeEighth
variable = polar_z
component = 2
block = '0'
[../]
[./walled_x]
type = WallEnergyDerivative
variable = polar_x
component = 0
block = '0'
[../]
[./walled_y]
type = WallEnergyDerivative
variable = polar_y
component = 1
block = '0'
[../]
[./walled_z]
type = WallEnergyDerivative
variable = polar_z
component = 2
block = '0'
[../]
[./electrostr_polar_coupled_x]
type = CubicParentElasticPDerivative
variable = polar_x
component = 0
displacements = 'u_x u_y u_z'
block = '0'
[../]
[./electrostr_polar_coupled_y]
type = CubicParentElasticPDerivative
variable = polar_y
component = 1
displacements = 'u_x u_y u_z'
block = '0'
[../]
[./electrostr_polar_coupled_z]
type = CubicParentElasticPDerivative
variable = polar_z
component = 2
displacements = 'u_x u_y u_z'
block = '0'
[../]
[./polar_x_electric_E]
type = PolarElectricEStrong
variable = potential_E_int
block = '0'
[../]
[./FE_E_int]
type = Electrostatics
variable = potential_E_int
block = '0 1'
[../]
[./polar_electric_px]
type = PolarElectricPStrong
variable = polar_x
component = 0
block = '0'
[../]
[./polar_electric_py]
type = PolarElectricPStrong
variable = polar_y
component = 1
block = '0'
[../]
[./polar_electric_pz]
type = PolarElectricPStrong
variable = polar_z
component = 2
block = '0'
[../]
[./polar_x_time]
type = TimeDerivativeScaled
variable=polar_x
time_scale = 1.0
block = '0'
[../]
[./polar_y_time]
type = TimeDerivativeScaled
variable=polar_y
time_scale = 1.0
block = '0'
[../]
[./polar_z_time]
type = TimeDerivativeScaled
variable = polar_z
time_scale = 1.0
block = '0'
[../]
[./u_x_time]
type = TimeDerivativeScaled
variable = u_x
time_scale = 1.0
[../]
[./u_y_time]
type = TimeDerivativeScaled
variable = u_y
time_scale = 1.0
[../]
[./u_z_time]
type = TimeDerivativeScaled
variable = u_z
time_scale = 1.0
[../]
[]
[BCs]
[./Periodic]
[./xy]
auto_direction = 'x y'
variable = 'u_x u_y u_z polar_x polar_y polar_z potential_E_int'
[../]
[../]
[./boundary_interface_grounding]
type = DirichletBC
boundary = '52'
variable = potential_E_int
value = 0.0
[../]
[./centerfix_x]
type = DirichletBC
boundary = '108'
variable = u_x
value = 0
[../]
[./centerfix_y]
type = DirichletBC
boundary = '108'
variable = u_y
value = 0
[../]
[./centerfix_z]
type = DirichletBC
boundary = '108'
variable = u_z
value = 0
[../]
[]
[Postprocessors]
[./Fbulk]
type = BulkEnergyEighth
execute_on = 'timestep_end'
block = '0'
[../]
[./Fwall]
type = WallEnergy
execute_on = 'timestep_end'
block = '0'
[../]
[./Felastic]
type = CubicParentElasticEnergy
execute_on = 'timestep_end'
block = '0'
[../]
[./Felec]
type = ElectrostaticEnergy
execute_on = 'timestep_end'
block = '0'
[../]
[./Ftotal]
type = LinearCombinationPostprocessor
pp_names = 'Fbulk Fwall Felastic Felec'
pp_coefs = '0.160218 0.160218 0.160218 0.160218'
execute_on = 'timestep_end'
[../]
###############################################
##
## Gold-independent correctness check on the bound-charge
## capability: the divergence theorem
##
## int_V div(P) dV == oint_dV P.n dS
##
## over the FILM (block 0, z in [0,2]). The closed boundary of
## block 0 is the free surface 107 (z=+2), the film/substrate
## interface 52 (z=0), and the four lateral faces, which cancel
## pairwise under the x/y periodic BCs.
##
## NOTE: boundary 108 is the SUBSTRATE bottom (z=-2) and lies on
## block 1, where P is not defined. It is NOT part of this
## surface -- adding it is an error, not a refinement.
##
## Sign convention: DivP returns div(P) and SurfaceChargeP returns
## P.n, so the identity carries no minus sign. (The bound charges
## themselves are rho_b = -div(P) and sigma_b = +P.n.)
##
## Verified 2026-09-22 on the full closed surface: residual ~1e-18,
## i.e. ~1e-17 relative to the sum of the absolute face contributions.
## The 1e-6 tolerance below is loose because the lateral faces are
## omitted here; they cancel only to solver tolerance (~1e-8), not to
## round-off. Restricting sidesets to block 0 so they could be
## included would break Periodic/auto_direction, which is not worth it.
##
## outputs = none on purpose: this check must not perturb the Exodus
## gold file, so it adds no global variables to the output.
##
###############################################
[./volDivP]
type = ElementIntegralVariablePostprocessor
variable = divP
block = '0'
execute_on = 'timestep_end'
outputs = none
[../]
[./surfInt_107]
type = SideIntegralVariablePostprocessor
variable = surfP
boundary = '107'
execute_on = 'timestep_end'
outputs = none
[../]
[./surfInt_52]
type = SideIntegralVariablePostprocessor
variable = surfP_52
boundary = '52'
execute_on = 'timestep_end'
outputs = none
[../]
[./closedSurfP]
type = LinearCombinationPostprocessor
pp_names = 'surfInt_107 surfInt_52'
pp_coefs = '1 1'
execute_on = 'timestep_end'
outputs = none
[../]
[./divThmResidual]
type = LinearCombinationPostprocessor
pp_names = 'closedSurfP volDivP'
pp_coefs = '1 -1'
execute_on = 'timestep_end'
outputs = none
[../]
[]
[UserObjects]
[./global_strain_uo]
type = GlobalATiO3MaterialRVEUserObject
use_displaced_mesh = false
execute_on = 'Initial Linear Nonlinear'
applied_stress_tensor = '0.0 0.0 0.0 0.0 0.0 0.0'
block = '0'
[../]
###############################################
##
## Assert the divergence theorem every step. Unlike the Exodiff
## this does not care what the solution IS, only that DivP and
## SurfaceChargeP are consistent, so it survives a regold.
## error_level = ERROR is required: fail_mode = HARD on its own
## stops the run but still exits 0, which a test would not catch.
##
###############################################
[./divthm_assert]
type = Terminator
expression = 'abs(divThmResidual) > 1.0e-6'
fail_mode = HARD
error_level = ERROR
execute_on = 'TIMESTEP_END'
message = 'Divergence theorem violated: oint P.n dS != int div(P) dV over block 0. DivP/SurfaceChargeP are inconsistent.'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart -snes_atol -snes_rtol -ksp_rtol -pc_type -build_twosided'
petsc_options_value = ' 80 1e-8 1e-5 1e-5 bjacobi allreduce'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
scheme = 'bdf2'
dtmin = 1e-13
dtmax = 0.6
l_max_its = 200
[./TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 6
growth_factor = 1.2
cutback_factor = 0.75
linear_iteration_ratio = 1000
dt = 0.6
[../]
verbose = true
nl_max_its = 20
num_steps = 6
[]
[Outputs]
print_linear_residuals = false
perf_graph = false
[./out]
type = Exodus
file_base = out_surface_charge
elemental_as_nodal = true
time_step_interval = 1
[../]
[]
(test/tests/domain_wall/test_BTO_domain_wall.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 2
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
elem_type = HEX8
[]
[./cnode]
input = gen
type = ExtraNodesetGenerator
coord = '-0.5 -0.5 -0.5'
new_boundary = 100
[../]
[]
[GlobalParams]
len_scale = 1.0
polar_x = polar_x
polar_y = polar_y
polar_z = polar_z
potential_E_int = potential_E_int
displacements = 'u_x u_y u_z'
[]
[Functions]
[./stripe1]
type = ParsedFunction
expression = 0.01*cos(0.08975979010256552*(x))
[../]
[]
[Variables]
[./global_strain]
order = SIXTH
family = SCALAR
[../]
[./polar_x]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
min = -0.01e-4
max = 0.01e-4
[../]
[../]
[./polar_y]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
min = -0.01e-4
max = 0.01e-4
[../]
[../]
[./polar_z]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
min = -0.01e-4
max = 0.01e-4
[../]
[../]
[./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]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./e00]
order = CONSTANT
family = MONOMIAL
[../]
[./e01]
order = CONSTANT
family = MONOMIAL
[../]
[./e10]
order = CONSTANT
family = MONOMIAL
[../]
[./e11]
order = CONSTANT
family = MONOMIAL
[../]
[./e12]
order = CONSTANT
family = MONOMIAL
[../]
[./e22]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./disp_x]
type = GlobalDisplacementAux
variable = disp_x
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 0
use_displaced_mesh = false
[../]
[./disp_y]
type = GlobalDisplacementAux
variable = disp_y
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 1
use_displaced_mesh = false
[../]
[./disp_z]
type = GlobalDisplacementAux
variable = disp_z
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 2
use_displaced_mesh = false
[../]
[./e00]
type = RankTwoAux
variable = e00
rank_two_tensor = total_strain
index_i = 0
index_j = 0
[../]
[./e01]
type = RankTwoAux
variable = e01
rank_two_tensor = total_strain
index_i = 0
index_j = 1
[../]
[./e10]
type = RankTwoAux
variable = e10
rank_two_tensor = total_strain
index_i = 1
index_j = 0
[../]
[./e12]
type = RankTwoAux
variable = e12
rank_two_tensor = total_strain
index_i = 1
index_j = 2
[../]
[./e11]
type = RankTwoAux
variable = e11
rank_two_tensor = total_strain
index_i = 1
index_j = 1
[../]
[./e22]
type = RankTwoAux
variable = e22
rank_two_tensor = total_strain
index_i = 2
index_j = 2
[../]
[]
[ScalarKernels]
[./global_strain]
type = GlobalStrain
variable = global_strain
global_strain_uo = global_strain_uo
use_displaced_mesh = false
[../]
[]
[Materials]
[./Landau_P]
type = GenericConstantMaterial
prop_names = 'alpha1 alpha11 alpha12 alpha111 alpha112 alpha123 alpha1111 alpha1112 alpha1122 alpha1123'
prop_values = '-0.027721 -0.64755 0.323 8.004 4.47 4.91 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 = '0.5 0.51 -0.02 0.02 0.0'
[../]
[./mat_C]
type = GenericConstantMaterial
prop_names = 'C11 C12 C44'
prop_values = '275.0 179.0 54.3'
[../]
[./mat_Q]
type = GenericConstantMaterial
prop_names = 'Q11 Q12 Q44'
prop_values = '0.11 -0.045 0.029'
[../]
[./ferro]
type = ComputeCubicParentElectrostrictiveStrain
eigenstrain_name = ferro
[../]
[./elasticity_tensor_1]
type = ComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '275.0 179.0 179.0 275.0 179.0 275.0 54.3 54.3 54.3'
[../]
[./strain_1]
type = ComputeSmallStrain
global_strain = global_strain
eigenstrain_names = 'ferro'
[../]
[./stress_1]
type = ComputeLinearElasticStress
[../]
[./global_strain]
type = ComputeGlobalStrain
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
[../]
[./permitivitty_1]
type = GenericConstantMaterial
prop_names = 'permittivity'
prop_values = '0.08854187'
[../]
[]
[Kernels]
[./SolidMechanics]
use_displaced_mesh = false
[../]
[./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
[../]
[./wall2ed_x]
type = Wall2EnergyDerivative
variable = polar_x
component = 0
[../]
[./wall2ed_y]
type = Wall2EnergyDerivative
variable = polar_y
component = 1
[../]
[./wall2ed_z]
type = Wall2EnergyDerivative
variable = polar_z
component = 2
[../]
[./electrostr_polar_coupled_x]
type = CubicParentElasticPDerivative
displacements = 'u_x u_y u_z'
variable = polar_x
component = 0
[../]
[./electrostr_polar_coupled_y]
type = CubicParentElasticPDerivative
displacements = 'u_x u_y u_z'
variable = polar_y
component = 1
[../]
[./electrostr_polar_coupled_z]
type = CubicParentElasticPDerivative
displacements = 'u_x u_y u_z'
variable = polar_z
component = 2
[../]
[./polar_x_electric_E]
type = PolarElectricEStrong
variable = potential_E_int
[../]
[./FE_E_int]
type = Electrostatics
variable = potential_E_int
[../]
[./polar_electric_px]
type = PolarElectricPStrong
variable = polar_x
component = 0
[../]
[./polar_electric_py]
type = PolarElectricPStrong
variable = polar_y
component = 1
[../]
[./polar_electric_pz]
type = PolarElectricPStrong
variable = polar_z
component = 2
[../]
[./polar_x_time]
type = TimeDerivativeScaled
variable=polar_x
time_scale = 1.0
[../]
[./polar_y_time]
type = TimeDerivativeScaled
variable=polar_y
time_scale = 1.0
[../]
[./polar_z_time]
type = TimeDerivativeScaled
variable = polar_z
time_scale = 1.0
[../]
[]
[BCs]
[./Periodic]
[./xyz]
auto_direction = 'x y z'
variable = 'u_x u_y u_z polar_x polar_y polar_z'
[../]
[../]
[./boundary_grounding]
type = DirichletBC
boundary = '0 1 2 3 4 5'
variable = potential_E_int
value = 0.0
[../]
[./centerfix_x]
type = DirichletBC
boundary = 100
variable = u_x
value = 0
[../]
[./centerfix_y]
type = DirichletBC
boundary = 100
variable = u_y
value = 0
[../]
[./centerfix_z]
type = DirichletBC
boundary = 100
variable = u_z
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'
use_displaced_mesh = false
[../]
[./Felec]
type = ElectrostaticEnergy
execute_on = 'initial timestep_end'
[../]
[./Ftotal]
type = LinearCombinationPostprocessor
pp_names = 'Fbulk Fwall Felastic Felec'
pp_coefs = ' 1 1 1 1'
execute_on = 'initial timestep_end'
[../]
[]
[UserObjects]
[./global_strain_uo]
type = GlobalStrainUserObject
use_displaced_mesh = false
execute_on = 'Initial Linear Nonlinear'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart -snes_atol -snes_rtol -ksp_rtol -pc_type -build_twosided'
petsc_options_value = ' 160 1e-8 1e-8 1e-8 bjacobi allreduce'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
scheme = 'implicit-euler'
dtmin = 1e-13
dtmax = 3.0
l_max_its = 200
[./TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 8
cutback_factor = 0.75
linear_iteration_ratio = 1000
dt = 0.3
[../]
verbose = true
num_steps = 4
[]
[Outputs]
print_linear_residuals = false
perf_graph = false
[./out]
type = Exodus
file_base = test
elemental_as_nodal = true
[../]
[]
(test/tests/pertsev/BTO_pertsev_polar.i)
TC = 25.0
um = -0.002
C11 = 175.549
C12 = 84.639
C44 = 108.225
umzz = ${fparse -2.0*C12/C11*um}
alpha1 = ${fparse 3.3e-4*(TC - 110.0)}
alpha11 = ${fparse 3.6e-3*(TC - 175.0)}
alpha123 = ${fparse 7.6e-2*(TC - 120.0) + 44.0}
G110 = 1.0
Lx = 2.0
Ly = 2.0
tf = 2.0
nx = 2
ny = 2
nz = 8
dt_polar = 0.05
p0x = 0.0
p0y = 0.0
p0z = 0.0
noise = 0.01
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = ${nx}
ny = ${ny}
nz = ${nz}
xmin = 0.0
xmax = ${Lx}
ymin = 0.0
ymax = ${Ly}
zmin = 0.0
zmax = ${tf}
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 = ${fparse p0x - noise}
max = ${fparse p0x + noise}
seed = 51
[]
[]
[polar_y]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = RandomIC
min = ${fparse p0y - noise}
max = ${fparse p0y + noise}
seed = 46
[]
[]
[polar_z]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = RandomIC
min = ${fparse p0z - noise}
max = ${fparse p0z + noise}
seed = 124
[]
[]
[]
[AuxVariables]
[u_x]
order = FIRST
family = LAGRANGE
[]
[u_y]
order = FIRST
family = LAGRANGE
[]
[u_z]
order = FIRST
family = LAGRANGE
[]
[Pmag]
order = FIRST
family = LAGRANGE
[]
[]
[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'
[]
[]
[Materials]
[Landau_P]
type = GenericConstantMaterial
prop_names = 'alpha1 alpha11 alpha12 alpha111 alpha112 alpha123 alpha1111 alpha1112 alpha1122 alpha1123'
prop_values = '${alpha1} ${alpha11} 0.49 6.6 2.9 ${alpha123} 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.51 -0.02 0.02 0.0'
[]
[mat_C]
type = GenericConstantMaterial
prop_names = 'C11 C12 C44'
prop_values = '${C11} ${C12} ${C44}'
[]
[mat_Q]
type = GenericConstantMaterial
prop_names = 'Q11 Q12 Q44'
prop_values = '0.11 -0.043 0.0295'
[]
[misfit]
type = GenericConstantRankTwoTensor
tensor_name = global_strain
tensor_values = '${um} 0 0 0 ${um} 0 0 0 ${umzz}'
[]
[strain]
type = ComputeSmallStrain
displacements = 'u_x u_y u_z'
global_strain = global_strain
[]
[]
[Kernels]
[bed_x]
type = BulkEnergyDerivativeEighth
variable = polar_x
component = 0
[]
[walled_x]
type = WallEnergyDerivative
variable = polar_x
component = 0
[]
[electrostr_x]
type = CubicParentElasticPDerivative
variable = polar_x
component = 0
[]
[time_x]
type = TimeDerivative
variable = polar_x
[]
[bed_y]
type = BulkEnergyDerivativeEighth
variable = polar_y
component = 1
[]
[walled_y]
type = WallEnergyDerivative
variable = polar_y
component = 1
[]
[electrostr_y]
type = CubicParentElasticPDerivative
variable = polar_y
component = 1
[]
[time_y]
type = TimeDerivative
variable = polar_y
[]
[bed_z]
type = BulkEnergyDerivativeEighth
variable = polar_z
component = 2
[]
[walled_z]
type = WallEnergyDerivative
variable = polar_z
component = 2
[]
[electrostr_z]
type = CubicParentElasticPDerivative
variable = polar_z
component = 2
[]
[time_z]
type = TimeDerivative
variable = polar_z
[]
[]
[BCs]
[Periodic]
[xy]
auto_direction = 'x y'
variable = 'polar_x polar_y polar_z'
[]
[]
[]
[Postprocessors]
[Fbulk]
type = BulkEnergyEighth
execute_on = 'initial timestep_end'
[]
[Fwall]
type = WallEnergy
execute_on = 'initial timestep_end'
[]
[Px]
type = ElementAverageValue
variable = polar_x
execute_on = 'initial timestep_end'
[]
[Py]
type = ElementAverageValue
variable = polar_y
execute_on = 'initial timestep_end'
[]
[Pz]
type = ElementAverageValue
variable = polar_z
execute_on = 'initial timestep_end'
[]
[Pmag_max]
type = ElementExtremeValue
variable = Pmag
value_type = max
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
solve_type = LINEAR
[TimeIntegrator]
type = ActuallyExplicitEuler
solve_type = lumped
use_constant_mass = true
[]
dt = ${dt_polar}
end_time = 1e9
[]
[Outputs]
print_linear_residuals = false
[]
(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_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/dispersion/perturbBTO_PzEz.i)
freq = 1778279410.0389228
amplitude = 0.001
[Mesh]
file = out_PzEz.e
[]
[GlobalParams]
len_scale = 1.0
polar_x = polar_x
polar_y = polar_y
polar_z = polar_z
potential_E_int = potential_E_int
displacements = 'u_x u_y u_z'
[]
[Functions]
[./bc_func_1]
type = ParsedFunction
expression = 'amplitude*sin(freq*t)'
symbol_names = 'freq amplitude'
symbol_values = '${freq} ${amplitude}'
[../]
[]
[Variables]
[./global_strain]
order = SIXTH
family = SCALAR
[../]
[./polar_x]
order = FIRST
family = LAGRANGE
initial_from_file_var = polar_x
[../]
[./polar_y]
order = FIRST
family = LAGRANGE
initial_from_file_var = polar_y
[../]
[./polar_z]
order = FIRST
family = LAGRANGE
initial_from_file_var = polar_z
[../]
[./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]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./stress_xx_elastic]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy_elastic]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy_elastic]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xz_elastic]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz_elastic]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz_elastic]
order = CONSTANT
family = MONOMIAL
[../]
[./e00]
order = CONSTANT
family = MONOMIAL
[../]
[./e01]
order = CONSTANT
family = MONOMIAL
[../]
[./e10]
order = CONSTANT
family = MONOMIAL
[../]
[./e11]
order = CONSTANT
family = MONOMIAL
[../]
[./e12]
order = CONSTANT
family = MONOMIAL
[../]
[./e22]
order = CONSTANT
family = MONOMIAL
[../]
[./Ez]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./disp_x]
type = GlobalDisplacementAux
variable = disp_x
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 0
use_displaced_mesh = false
[../]
[./disp_y]
type = GlobalDisplacementAux
variable = disp_y
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 1
use_displaced_mesh = false
[../]
[./disp_z]
type = GlobalDisplacementAux
variable = disp_z
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 2
use_displaced_mesh = false
[../]
[./e00]
type = RankTwoAux
variable = e00
rank_two_tensor = total_strain
index_i = 0
index_j = 0
[../]
[./e01]
type = RankTwoAux
variable = e01
rank_two_tensor = total_strain
index_i = 0
index_j = 1
[../]
[./e10]
type = RankTwoAux
variable = e10
rank_two_tensor = total_strain
index_i = 1
index_j = 0
[../]
[./e12]
type = RankTwoAux
variable = e12
rank_two_tensor = total_strain
index_i = 1
index_j = 2
[../]
[./e11]
type = RankTwoAux
variable = e11
rank_two_tensor = total_strain
index_i = 1
index_j = 1
[../]
[./e22]
type = RankTwoAux
variable = e22
rank_two_tensor = total_strain
index_i = 2
index_j = 2
[../]
[./cEy]
type = QuasistaticFieldAux
component = 2
potential_int = potential_E_int
variable = Ez
[../]
[]
[ScalarKernels]
[./global_strain]
type = GlobalStrain
variable = global_strain
global_strain_uo = global_strain_uo
use_displaced_mesh = false
[../]
[]
[Materials]
[./Landau_P]
type = GenericConstantMaterial
prop_names = 'alpha1 alpha11 alpha12 alpha111 alpha112 alpha123 alpha1111 alpha1112 alpha1122 alpha1123'
prop_values = '-0.027721 -0.64755 0.323 8.004 4.47 4.91 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 = '0.5 0.51 -0.02 0.02 0.0'
[../]
[./mat_C]
type = GenericConstantMaterial
prop_names = 'C11 C12 C44'
prop_values = '275.0 179.0 54.3'
[../]
[./mat_Q]
type = GenericConstantMaterial
prop_names = 'Q11 Q12 Q44'
prop_values = '0.11 -0.045 0.029'
[../]
[./ferro]
type = ComputeCubicParentElectrostrictiveStrain
eigenstrain_name = ferro
[../]
[./elasticity_tensor_1]
type = ComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '275.0 179.0 179.0 275.0 179.0 275.0 54.3 54.3 54.3'
[../]
[./strain_1]
type = ComputeSmallStrain
global_strain = global_strain
eigenstrain_names = 'ferro'
[../]
[./stress_1]
type = ComputeLinearElasticStress
[../]
[./global_strain]
type = ComputeGlobalStrain
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
[../]
[./permitivitty_1]
type = GenericConstantMaterial
prop_names = 'permittivity'
prop_values = '0.08854187'
[../]
[]
[Kernels]
[./SolidMechanics]
use_displaced_mesh = false
[../]
[./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_polar_coupled_x]
type = CubicParentElasticPDerivative
displacements = 'u_x u_y u_z'
variable = polar_x
component = 0
[../]
[./electrostr_polar_coupled_y]
type = CubicParentElasticPDerivative
displacements = 'u_x u_y u_z'
variable = polar_y
component = 1
[../]
[./electrostr_polar_coupled_z]
type = CubicParentElasticPDerivative
displacements = 'u_x u_y u_z'
variable = polar_z
component = 2
[../]
[./polar_x_electric_E]
type = PolarElectricEStrong
variable = potential_E_int
[../]
[./FE_E_int]
type = Electrostatics
variable = potential_E_int
[../]
[./polar_electric_px]
type = PolarElectricPStrong
variable = polar_x
component = 0
[../]
[./polar_electric_py]
type = PolarElectricPStrong
variable = polar_y
component = 1
[../]
[./polar_electric_pz]
type = PolarElectricPStrong
variable = polar_z
component = 2
[../]
[./polar_x_time]
type = TimeDerivativeScaled
variable = polar_x
time_scale = 1e-12
[../]
[./polar_y_time]
type = TimeDerivativeScaled
variable = polar_y
time_scale = 1e-12
[../]
[./polar_z_time]
type = TimeDerivativeScaled
variable = polar_z
time_scale = 1e-12
[../]
[]
[BCs]
[./Periodic]
[./xyz]
auto_direction = 'x y z'
variable = 'u_x u_y u_z polar_x polar_y polar_z'
[../]
[../]
[./front_pot]
type = FunctionDirichletBC
variable = potential_E_int
boundary = 'front'
function = bc_func_1
[../]
[./boundary_grounding]
type = DirichletBC
boundary = 'back'
variable = potential_E_int
value = 0.0
[../]
[./centerfix_x]
type = DirichletBC
boundary = 100
variable = u_x
value = 0
[../]
[./centerfix_y]
type = DirichletBC
boundary = 100
variable = u_y
value = 0
[../]
[./centerfix_z]
type = DirichletBC
boundary = 100
variable = u_z
value = 0
[../]
[]
[Postprocessors]
[./avePz]
type = ElementAverageValue
variable = polar_z
execute_on = 'initial timestep_end'
[../]
[./Ea]
type = ElementAverageValue
variable = Ez
execute_on = 'initial timestep_end'
[../]
[./Fbulk]
type = BulkEnergyEighth
execute_on = 'initial timestep_end'
[../]
[./Fwall]
type = WallEnergy
execute_on = 'initial timestep_end'
[../]
[./Felastic]
type = CubicParentElasticEnergy
execute_on = 'initial timestep_end'
use_displaced_mesh = false
[../]
[./Felec]
type = ElectrostaticEnergy
execute_on = 'initial timestep_end'
[../]
[./Ftotal]
type = LinearCombinationPostprocessor
pp_names = 'Fbulk Fwall Felastic Felec'
pp_coefs = ' 1 1 1 1'
execute_on = 'initial timestep_end'
[../]
[./perc_change]
type = ChangeOverTimePostprocessor
compute_relative_change = true
take_absolute_value = true
postprocessor = Ftotal
execute_on = 'initial timestep_end'
[../]
[]
[UserObjects]
[./global_strain_uo]
type = GlobalStrainUserObject
use_displaced_mesh = false
execute_on = 'Initial Linear Nonlinear'
applied_stress_tensor = '0.0 0.0 0.0 0.0 0.0 0.0'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart -snes_atol -snes_rtol -ksp_rtol -pc_type -build_twosided'
petsc_options_value = ' 160 1e-10 1e-8 1e-8 bjacobi allreduce'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
scheme = 'implicit-euler'
dtmin = 1e-16
dt = 3.5332947520558994e-11
dtmax = 1e-10
verbose = true
num_steps = 5
[]
[Outputs]
print_linear_residuals = false
perf_graph = false
[./out]
type = Exodus
file_base = out_perturbBTO_PzEz0
elemental_as_nodal = true
[../]
[./outCSV]
type = CSV
new_row_tolerance = 1e-16
file_base = out_perturbBTO_PzEz0
[../]
[]
(test/tests/dispersion/perturbBTO_PyEz.i)
freq = 177827941.00389227
amplitude = 1e-3
[Mesh]
file = out_PyEz.e
[]
[GlobalParams]
len_scale = 1.0
polar_x = polar_x
polar_y = polar_y
polar_z = polar_z
potential_E_int = potential_E_int
displacements = 'u_x u_y u_z'
[]
[Functions]
[./bc_func_1]
type = ParsedFunction
expression = 'amplitude*sin(freq*t)'
symbol_names = 'freq amplitude'
symbol_values = '${freq} ${amplitude}'
[../]
[]
[Variables]
[./global_strain]
order = SIXTH
family = SCALAR
[../]
[./polar_x]
order = FIRST
family = LAGRANGE
initial_from_file_var = polar_x
[../]
[./polar_y]
order = FIRST
family = LAGRANGE
initial_from_file_var = polar_y
[../]
[./polar_z]
order = FIRST
family = LAGRANGE
initial_from_file_var = polar_z
[../]
[./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]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./stress_xx_elastic]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy_elastic]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy_elastic]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xz_elastic]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz_elastic]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz_elastic]
order = CONSTANT
family = MONOMIAL
[../]
[./e00]
order = CONSTANT
family = MONOMIAL
[../]
[./e01]
order = CONSTANT
family = MONOMIAL
[../]
[./e10]
order = CONSTANT
family = MONOMIAL
[../]
[./e11]
order = CONSTANT
family = MONOMIAL
[../]
[./e12]
order = CONSTANT
family = MONOMIAL
[../]
[./e22]
order = CONSTANT
family = MONOMIAL
[../]
[./Ez]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./disp_x]
type = GlobalDisplacementAux
variable = disp_x
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 0
use_displaced_mesh = false
[../]
[./disp_y]
type = GlobalDisplacementAux
variable = disp_y
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 1
use_displaced_mesh = false
[../]
[./disp_z]
type = GlobalDisplacementAux
variable = disp_z
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 2
use_displaced_mesh = false
[../]
[./e00]
type = RankTwoAux
variable = e00
rank_two_tensor = total_strain
index_i = 0
index_j = 0
[../]
[./e01]
type = RankTwoAux
variable = e01
rank_two_tensor = total_strain
index_i = 0
index_j = 1
[../]
[./e10]
type = RankTwoAux
variable = e10
rank_two_tensor = total_strain
index_i = 1
index_j = 0
[../]
[./e12]
type = RankTwoAux
variable = e12
rank_two_tensor = total_strain
index_i = 1
index_j = 2
[../]
[./e11]
type = RankTwoAux
variable = e11
rank_two_tensor = total_strain
index_i = 1
index_j = 1
[../]
[./e22]
type = RankTwoAux
variable = e22
rank_two_tensor = total_strain
index_i = 2
index_j = 2
[../]
[./cEy]
type = QuasistaticFieldAux
component = 2
potential_int = potential_E_int
variable = Ez
[../]
[]
[ScalarKernels]
[./global_strain]
type = GlobalStrain
variable = global_strain
global_strain_uo = global_strain_uo
use_displaced_mesh = false
[../]
[]
[Materials]
[./Landau_P]
type = GenericConstantMaterial
prop_names = 'alpha1 alpha11 alpha12 alpha111 alpha112 alpha123 alpha1111 alpha1112 alpha1122 alpha1123'
prop_values = '-0.027721 -0.64755 0.323 8.004 4.47 4.91 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 = '0.5 0.51 -0.02 0.02 0.0'
[../]
[./mat_C]
type = GenericConstantMaterial
prop_names = 'C11 C12 C44'
prop_values = '275.0 179.0 54.3'
[../]
[./mat_Q]
type = GenericConstantMaterial
prop_names = 'Q11 Q12 Q44'
prop_values = '0.11 -0.045 0.029'
[../]
[./ferro]
type = ComputeCubicParentElectrostrictiveStrain
eigenstrain_name = ferro
[../]
[./elasticity_tensor_1]
type = ComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '275.0 179.0 179.0 275.0 179.0 275.0 54.3 54.3 54.3'
[../]
[./strain_1]
type = ComputeSmallStrain
global_strain = global_strain
eigenstrain_names = 'ferro'
[../]
[./stress_1]
type = ComputeLinearElasticStress
[../]
[./global_strain]
type = ComputeGlobalStrain
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
[../]
[./permitivitty_1]
type = GenericConstantMaterial
prop_names = 'permittivity'
prop_values = '0.08854187'
[../]
[]
[Kernels]
[./SolidMechanics]
use_displaced_mesh = false
[../]
[./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_polar_coupled_x]
type = CubicParentElasticPDerivative
displacements = 'u_x u_y u_z'
variable = polar_x
component = 0
[../]
[./electrostr_polar_coupled_y]
type = CubicParentElasticPDerivative
displacements = 'u_x u_y u_z'
variable = polar_y
component = 1
[../]
[./electrostr_polar_coupled_z]
type = CubicParentElasticPDerivative
displacements = 'u_x u_y u_z'
variable = polar_z
component = 2
[../]
[./polar_x_electric_E]
type = PolarElectricEStrong
variable = potential_E_int
[../]
[./FE_E_int]
type = Electrostatics
variable = potential_E_int
[../]
[./polar_electric_px]
type = PolarElectricPStrong
variable = polar_x
component = 0
[../]
[./polar_electric_py]
type = PolarElectricPStrong
variable = polar_y
component = 1
[../]
[./polar_electric_pz]
type = PolarElectricPStrong
variable = polar_z
component = 2
[../]
[./polar_x_time]
type = TimeDerivativeScaled
variable = polar_x
time_scale = 1e-12
[../]
[./polar_y_time]
type = TimeDerivativeScaled
variable = polar_y
time_scale = 1e-12
[../]
[./polar_z_time]
type = TimeDerivativeScaled
variable = polar_z
time_scale = 1e-12
[../]
[]
[BCs]
[./Periodic]
[./xyz]
auto_direction = 'x y z'
variable = 'u_x u_y u_z polar_x polar_y polar_z'
[../]
[../]
[./front_pot]
type = FunctionDirichletBC
variable = potential_E_int
boundary = 'front'
function = bc_func_1
[../]
[./boundary_grounding]
type = DirichletBC
boundary = 'left right top bottom back'
variable = potential_E_int
value = 0.0
[../]
[./centerfix_x]
type = DirichletBC
boundary = 100
variable = u_x
value = 0
[../]
[./centerfix_y]
type = DirichletBC
boundary = 100
variable = u_y
value = 0
[../]
[./centerfix_z]
type = DirichletBC
boundary = 100
variable = u_z
value = 0
[../]
[]
[Postprocessors]
[./avePz]
type = ElementAverageValue
variable = polar_z
execute_on = 'initial timestep_end'
[../]
[./Ea]
type = ElementAverageValue
variable = Ez
execute_on = 'initial timestep_end'
[../]
[./Fbulk]
type = BulkEnergyEighth
execute_on = 'initial timestep_end'
[../]
[./Fwall]
type = WallEnergy
execute_on = 'initial timestep_end'
[../]
[./Felastic]
type = CubicParentElasticEnergy
execute_on = 'initial timestep_end'
use_displaced_mesh = false
[../]
[./Felec]
type = ElectrostaticEnergy
execute_on = 'initial timestep_end'
[../]
[./Ftotal]
type = LinearCombinationPostprocessor
pp_names = 'Fbulk Fwall Felastic Felec'
pp_coefs = ' 1 1 1 1'
execute_on = 'initial timestep_end'
[../]
[./perc_change]
type = ChangeOverTimePostprocessor
compute_relative_change = true
take_absolute_value = true
postprocessor = Ftotal
execute_on = 'initial timestep_end'
[../]
[]
[UserObjects]
[./global_strain_uo]
type = GlobalStrainUserObject
use_displaced_mesh = false
execute_on = 'Initial Linear Nonlinear'
applied_stress_tensor = '0.0 0.0 0.0 0.0 0.0 0.0'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart -snes_atol -snes_rtol -ksp_rtol -pc_type -build_twosided'
petsc_options_value = ' 160 1e-10 1e-8 1e-6 bjacobi allreduce'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
scheme = 'implicit-euler'
dtmin = 1e-16
dt = 3.5332947520558995e-10
dtmax = 1e-10
verbose = true
num_steps = 5
[]
[Outputs]
print_linear_residuals = false
perf_graph = false
[./out]
type = Exodus
file_base = out_perturbBTO_PyEz0
elemental_as_nodal = true
[../]
[./outCSV]
type = CSV
new_row_tolerance = 1e-16
file_base = out_perturbBTO_PyEz0
[../]
[]
(test/tests/bulk/BTO_bulk_relax.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 2
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
elem_type = HEX8
[]
[./cnode]
input = gen
type = ExtraNodesetGenerator
coord = '0.0 0.0 0.0'
new_boundary = 100
[../]
[]
[GlobalParams]
len_scale = 1.0
polar_x = polar_x
polar_y = polar_y
polar_z = polar_z
potential_E_int = potential_E_int
displacements = 'u_x u_y u_z'
[]
[Variables]
[./global_strain]
order = SIXTH
family = SCALAR
[../]
[./polar_x]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0.0
[../]
[../]
[./polar_y]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0.0
[../]
[../]
[./polar_z]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0.05
[../]
[../]
[./potential_E_int]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0.0
[../]
[../]
[./u_x]
order = FIRST
family = LAGRANGE
[../]
[./u_y]
order = FIRST
family = LAGRANGE
[../]
[./u_z]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[./disp_z]
order = FIRST
family = LAGRANGE
[../]
[./e00]
order = CONSTANT
family = MONOMIAL
[../]
[./e11]
order = CONSTANT
family = MONOMIAL
[../]
[./e22]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./SolidMechanics]
displacements = 'u_x u_y u_z'
use_displaced_mesh = false
[../]
[./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_polar_coupled_x]
type = CubicParentElasticPDerivative
variable = polar_x
component = 0
use_displaced_mesh = false
[../]
[./electrostr_polar_coupled_y]
type = CubicParentElasticPDerivative
variable = polar_y
component = 1
use_displaced_mesh = false
[../]
[./electrostr_polar_coupled_z]
type = CubicParentElasticPDerivative
variable = polar_z
component = 2
use_displaced_mesh = false
[../]
[./polar_x_electric_E]
type = PolarElectricEStrong
variable = potential_E_int
[../]
[./FE_E_int]
type = Electrostatics
variable = potential_E_int
[../]
[./polar_electric_px]
type = PolarElectricPStrong
variable = polar_x
component = 0
[../]
[./polar_electric_py]
type = PolarElectricPStrong
variable = polar_y
component = 1
[../]
[./polar_electric_pz]
type = PolarElectricPStrong
variable = polar_z
component = 2
[../]
[./polar_x_time]
type = TimeDerivativeScaled
variable = polar_x
time_scale = 1.0
[../]
[./polar_y_time]
type = TimeDerivativeScaled
variable = polar_y
time_scale = 1.0
[../]
[./polar_z_time]
type = TimeDerivativeScaled
variable = polar_z
time_scale = 1.0
[../]
[]
[ScalarKernels]
[./global_strain]
type = GlobalStrain
variable = global_strain
global_strain_uo = global_strain_uo
use_displaced_mesh = false
[../]
[]
[AuxKernels]
[./disp_x]
type = GlobalDisplacementAux
variable = disp_x
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 0
use_displaced_mesh = false
[../]
[./disp_y]
type = GlobalDisplacementAux
variable = disp_y
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 1
use_displaced_mesh = false
[../]
[./disp_z]
type = GlobalDisplacementAux
variable = disp_z
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 2
use_displaced_mesh = false
[../]
[./e00]
type = RankTwoAux
variable = e00
rank_two_tensor = total_strain
index_i = 0
index_j = 0
execute_on = 'timestep_end'
[../]
[./e11]
type = RankTwoAux
variable = e11
rank_two_tensor = total_strain
index_i = 1
index_j = 1
execute_on = 'timestep_end'
[../]
[./e22]
type = RankTwoAux
variable = e22
rank_two_tensor = total_strain
index_i = 2
index_j = 2
execute_on = 'timestep_end'
[../]
[]
[Materials]
[./Landau_P]
type = GenericConstantMaterial
prop_names = 'alpha1 alpha11 alpha12 alpha111 alpha112 alpha123 alpha1111 alpha1112 alpha1122 alpha1123'
prop_values = '-0.027721 -0.64755 0.323 8.004 4.47 4.91 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 = '0.5 0.51 -0.02 0.02 0.0'
[../]
[./mat_C]
type = GenericConstantMaterial
prop_names = 'C11 C12 C44'
prop_values = '275.0 179.0 54.3'
[../]
[./mat_Q]
type = GenericConstantMaterial
prop_names = 'Q11 Q12 Q44'
prop_values = '0.11 -0.045 0.029'
[../]
[./ferro]
type = ComputeCubicParentElectrostrictiveStrain
eigenstrain_name = ferro
[../]
[./elasticity_tensor_1]
type = ComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '275.0 179.0 179.0 275.0 179.0 275.0 54.3 54.3 54.3'
[../]
[./strain_1]
type = ComputeSmallStrain
global_strain = global_strain
eigenstrain_names = 'ferro'
[../]
[./stress_1]
type = ComputeLinearElasticStress
[../]
[./global_strain]
type = ComputeGlobalStrain
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
[../]
[./permitivitty_bulk]
type = GenericConstantMaterial
prop_names = 'permittivity'
prop_values = '0.08854187'
[../]
[]
[BCs]
[./Periodic]
[./xyz]
auto_direction = 'x y z'
variable = 'u_x u_y u_z polar_x polar_y polar_z potential_E_int'
[../]
[../]
[./centerfix_x]
type = DirichletBC
boundary = 100
variable = u_x
value = 0
[../]
[./centerfix_y]
type = DirichletBC
boundary = 100
variable = u_y
value = 0
[../]
[./centerfix_z]
type = DirichletBC
boundary = 100
variable = u_z
value = 0
[../]
[./centerfix_phi]
type = DirichletBC
boundary = 100
variable = potential_E_int
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'
use_displaced_mesh = false
[../]
[./Felec]
type = ElectrostaticEnergy
execute_on = 'initial timestep_end'
[../]
[./Ftotal]
type = LinearCombinationPostprocessor
pp_names = 'Fbulk Fwall Felastic Felec'
pp_coefs = ' 1 1 1 1'
execute_on = 'initial timestep_end'
[../]
[./e00_avg]
type = ElementAverageValue
variable = e00
execute_on = 'initial timestep_end'
[../]
[./e11_avg]
type = ElementAverageValue
variable = e11
execute_on = 'initial timestep_end'
[../]
[./e22_avg]
type = ElementAverageValue
variable = e22
execute_on = 'initial timestep_end'
[../]
[./Pz_avg]
type = ElementAverageValue
variable = polar_z
execute_on = 'initial timestep_end'
[../]
[]
[UserObjects]
[./global_strain_uo]
type = GlobalStrainUserObject
applied_stress_tensor = '0 0 0 0 0 0'
use_displaced_mesh = false
execute_on = 'Initial Linear Nonlinear'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
petsc_options_iname = '-ksp_gmres_restart -snes_atol -snes_rtol -ksp_rtol -pc_type -build_twosided'
petsc_options_value = ' 160 1e-10 1e-8 1e-6 bjacobi allreduce'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
scheme = 'implicit-euler'
dtmin = 1e-13
dtmax = 3.0
l_max_its = 200
[./TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 8
cutback_factor = 0.75
linear_iteration_ratio = 1000
dt = 0.3
[../]
num_steps = 40
[]
[Outputs]
print_linear_residuals = false
perf_graph = false
[./out]
type = Exodus
file_base = BTO_bulk_relax_out
elemental_as_nodal = true
[../]
[./csv]
type = CSV
file_base = BTO_bulk_relax_out
[../]
[]
(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/userobjects/terminator_multi_polar.i)
TC = 25.0
um = -0.002
C11 = 175.549
C12 = 84.639
C44 = 108.225
umzz = ${fparse -2.0*C12/C11*um}
alpha1 = ${fparse 3.3e-4*(TC - 110.0)}
alpha11 = ${fparse 3.6e-3*(TC - 175.0)}
alpha123 = ${fparse 7.6e-2*(TC - 120.0) + 44.0}
G110 = 1.0
Lx = 2.0
Ly = 2.0
tf = 2.0
nx = 2
ny = 2
nz = 8
dt_polar = 0.05
p0x = 0.0
p0y = 0.0
p0z = 0.0
noise = 0.01
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = ${nx}
ny = ${ny}
nz = ${nz}
xmin = 0.0
xmax = ${Lx}
ymin = 0.0
ymax = ${Ly}
zmin = 0.0
zmax = ${tf}
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 = ${fparse p0x - noise}
max = ${fparse p0x + noise}
seed = 51
[]
[]
[polar_y]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = RandomIC
min = ${fparse p0y - noise}
max = ${fparse p0y + noise}
seed = 46
[]
[]
[polar_z]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = RandomIC
min = ${fparse p0z - noise}
max = ${fparse p0z + noise}
seed = 124
[]
[]
[]
[AuxVariables]
[u_x]
order = FIRST
family = LAGRANGE
[]
[u_y]
order = FIRST
family = LAGRANGE
[]
[u_z]
order = FIRST
family = LAGRANGE
[]
[Pmag]
order = FIRST
family = LAGRANGE
[]
[]
[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'
[]
[]
[Materials]
[Landau_P]
type = GenericConstantMaterial
prop_names = 'alpha1 alpha11 alpha12 alpha111 alpha112 alpha123 alpha1111 alpha1112 alpha1122 alpha1123'
prop_values = '${alpha1} ${alpha11} 0.49 6.6 2.9 ${alpha123} 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.51 -0.02 0.02 0.0'
[]
[mat_C]
type = GenericConstantMaterial
prop_names = 'C11 C12 C44'
prop_values = '${C11} ${C12} ${C44}'
[]
[mat_Q]
type = GenericConstantMaterial
prop_names = 'Q11 Q12 Q44'
prop_values = '0.11 -0.043 0.0295'
[]
[misfit]
type = GenericConstantRankTwoTensor
tensor_name = global_strain
tensor_values = '${um} 0 0 0 ${um} 0 0 0 ${umzz}'
[]
[strain]
type = ComputeSmallStrain
displacements = 'u_x u_y u_z'
global_strain = global_strain
[]
[]
[Kernels]
[bed_x]
type = BulkEnergyDerivativeEighth
variable = polar_x
component = 0
[]
[walled_x]
type = WallEnergyDerivative
variable = polar_x
component = 0
[]
[electrostr_x]
type = CubicParentElasticPDerivative
variable = polar_x
component = 0
[]
[time_x]
type = TimeDerivative
variable = polar_x
[]
[bed_y]
type = BulkEnergyDerivativeEighth
variable = polar_y
component = 1
[]
[walled_y]
type = WallEnergyDerivative
variable = polar_y
component = 1
[]
[electrostr_y]
type = CubicParentElasticPDerivative
variable = polar_y
component = 1
[]
[time_y]
type = TimeDerivative
variable = polar_y
[]
[bed_z]
type = BulkEnergyDerivativeEighth
variable = polar_z
component = 2
[]
[walled_z]
type = WallEnergyDerivative
variable = polar_z
component = 2
[]
[electrostr_z]
type = CubicParentElasticPDerivative
variable = polar_z
component = 2
[]
[time_z]
type = TimeDerivative
variable = polar_z
[]
[]
[BCs]
[Periodic]
[xy]
auto_direction = 'x y'
variable = 'polar_x polar_y polar_z'
[]
[]
[]
[Postprocessors]
[Fbulk]
type = BulkEnergyEighth
execute_on = 'initial timestep_end'
[]
[Fwall]
type = WallEnergy
execute_on = 'initial timestep_end'
[]
[Px]
type = ElementAverageValue
variable = polar_x
execute_on = 'initial timestep_end'
[]
[Py]
type = ElementAverageValue
variable = polar_y
execute_on = 'initial timestep_end'
[]
[Pz]
type = ElementAverageValue
variable = polar_z
execute_on = 'initial timestep_end'
[]
[Pmag_max]
type = ElementExtremeValue
variable = Pmag
value_type = max
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
solve_type = LINEAR
[TimeIntegrator]
type = ActuallyExplicitEuler
solve_type = lumped
use_constant_mass = true
[]
dt = ${dt_polar}
end_time = 1e9
[]
[Outputs]
print_linear_residuals = false
[]
(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/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/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/pertsev/STO_pertsev_polar.i)
um = 0
nx = 1
ny = 1
nz = 1
dt_polar = 0.1
alpha1 = 0.0393222495738
alpha11 = 1.69629782974
alpha12 = 4.44268479218
beta1 = -2.42984938579e-06
beta11 = 1.69e-07
beta12 = 3.88e-07
t1111 = 0.000299792012938
t1122 = -2.28639273072e-05
t1212 = -0.000629824117823
C11 = 336
C12 = 107
C44 = 127
Q11 = 0.0457466385977
Q12 = -0.0134813276811
Q44 = 0.00957174265355
R11 = 8.7e-06
R12 = -7.8e-06
R44 = -9.2e-06
p0x = 0
p0y = 0
p0z = 0.15
a0x = 0
a0y = 0
a0z = 7
ts_A = 1e-4
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = ${nx}
ny = ${ny}
nz = ${nz}
xmin = 0
xmax = 1
ymin = 0
ymax = 1
zmin = 0
zmax = 1
elem_type = HEX8
[]
[]
[GlobalParams]
displacements = 'u_x u_y u_z'
polar_x = polar_x
polar_y = polar_y
polar_z = polar_z
antiphase_A_x = antiphase_A_x
antiphase_A_y = antiphase_A_y
antiphase_A_z = antiphase_A_z
[]
[Variables]
[polar_x]
[InitialCondition]
type = ConstantIC
value = ${p0x}
[]
[]
[polar_y]
[InitialCondition]
type = ConstantIC
value = ${p0y}
[]
[]
[polar_z]
[InitialCondition]
type = ConstantIC
value = ${p0z}
[]
[]
[antiphase_A_x]
[InitialCondition]
type = ConstantIC
value = ${a0x}
[]
[]
[antiphase_A_y]
[InitialCondition]
type = ConstantIC
value = ${a0y}
[]
[]
[antiphase_A_z]
[InitialCondition]
type = ConstantIC
value = ${a0z}
[]
[]
[]
[AuxVariables]
[u_x] [] [u_y] [] [u_z] []
[]
[Materials]
[Landau_P]
type = GenericConstantMaterial
prop_names = 'alpha1 alpha11 alpha12 alpha111 alpha112 alpha123 alpha1111 alpha1112 alpha1122 alpha1123'
prop_values = '${alpha1} ${alpha11} ${alpha12} 0 0 0 0 0 0 0'
[]
[Landau_A]
type = GenericConstantMaterial
prop_names = 'beta1 beta11 beta12 beta111 beta112 beta123 beta1111 beta1112 beta1122 beta1123'
prop_values = '${beta1} ${beta11} ${beta12} 0 0 0 0 0 0 0'
[]
[P_A_couple]
type = GenericConstantMaterial
prop_names = 't1111 t1122 t1212 t42111111 t24111111 t42111122 t24112222 t42112233 t24112233 t42112211 t24111122 t42111212 t42123312 t24121112 t24121233 t6211111111 t2611111111 t6211111122 t2611222222 t4411111111 t4411112222'
prop_values = '${t1111} ${t1122} ${t1212} 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0'
[]
[mat_C]
type = GenericConstantMaterial
prop_names = 'C11 C12 C44'
prop_values = '${C11} ${C12} ${C44}'
[]
[mat_Q]
type = GenericConstantMaterial
prop_names = 'Q11 Q12 Q44'
prop_values = '${Q11} ${Q12} ${Q44}'
[]
[mat_R]
type = GenericConstantMaterial
prop_names = 'R11 R12 R44'
prop_values = '${R11} ${R12} ${R44}'
[]
[misfit]
type = GenericConstantRankTwoTensor
tensor_name = global_strain
tensor_values = '${um} 0 0 0 ${um} 0 0 0 0'
[]
[elasticity_tensor]
type = ComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '${C11} ${C12} ${C12} ${C11} ${C12} ${C11} ${C44} ${C44} ${C44}'
[]
[strain]
type = ComputeSmallStrain
displacements = 'u_x u_y u_z'
global_strain = global_strain
[]
[]
[Kernels]
[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
[]
[electrostr_x]
type = CubicParentElasticPDerivative
variable = polar_x
component = 0
[]
[electrostr_y]
type = CubicParentElasticPDerivative
variable = polar_y
component = 1
[]
[electrostr_z]
type = CubicParentElasticPDerivative
variable = polar_z
component = 2
[]
[roto_polar_coupled_x]
type = RotoPolarCoupledEnergyPolarDerivativeAlt
variable = polar_x
component = 0
[]
[roto_polar_coupled_y]
type = RotoPolarCoupledEnergyPolarDerivativeAlt
variable = polar_y
component = 1
[]
[roto_polar_coupled_z]
type = RotoPolarCoupledEnergyPolarDerivativeAlt
variable = polar_z
component = 2
[]
[rbed_x]
type = RotoBulkEnergyDerivativeEighthAlt
variable = antiphase_A_x
component = 0
[]
[rbed_y]
type = RotoBulkEnergyDerivativeEighthAlt
variable = antiphase_A_y
component = 1
[]
[rbed_z]
type = RotoBulkEnergyDerivativeEighthAlt
variable = antiphase_A_z
component = 2
[]
[rotostr_x]
type = CubicParentElasticADerivative
variable = antiphase_A_x
component = 0
[]
[rotostr_y]
type = CubicParentElasticADerivative
variable = antiphase_A_y
component = 1
[]
[rotostr_z]
type = CubicParentElasticADerivative
variable = antiphase_A_z
component = 2
[]
[roto_dis_coupled_x]
type = RotoPolarCoupledEnergyDistortDerivativeAlt
variable = antiphase_A_x
component = 0
[]
[roto_dis_coupled_y]
type = RotoPolarCoupledEnergyDistortDerivativeAlt
variable = antiphase_A_y
component = 1
[]
[roto_dis_coupled_z]
type = RotoPolarCoupledEnergyDistortDerivativeAlt
variable = antiphase_A_z
component = 2
[]
[time_px]
type = TimeDerivative
variable = polar_x
[]
[time_py]
type = TimeDerivative
variable = polar_y
[]
[time_pz]
type = TimeDerivative
variable = polar_z
[]
[time_ax]
type = TimeDerivativeScaled
variable = antiphase_A_x
time_scale = ${ts_A}
[]
[time_ay]
type = TimeDerivativeScaled
variable = antiphase_A_y
time_scale = ${ts_A}
[]
[time_az]
type = TimeDerivativeScaled
variable = antiphase_A_z
time_scale = ${ts_A}
[]
[]
[Postprocessors]
[Px]
type = ElementAverageValue
variable = polar_x
[]
[Py]
type = ElementAverageValue
variable = polar_y
[]
[Pz]
type = ElementAverageValue
variable = polar_z
[]
[Ax]
type = ElementAverageValue
variable = antiphase_A_x
[]
[Ay]
type = ElementAverageValue
variable = antiphase_A_y
[]
[Az]
type = ElementAverageValue
variable = antiphase_A_z
[]
[dPx]
type = AverageVariableChange
variable = polar_x
change_over = time_step
norm = L1
[]
[dPy]
type = AverageVariableChange
variable = polar_y
change_over = time_step
norm = L1
[]
[dPz]
type = AverageVariableChange
variable = polar_z
change_over = time_step
norm = L1
[]
[dAx]
type = AverageVariableChange
variable = antiphase_A_x
change_over = time_step
norm = L1
[]
[dAy]
type = AverageVariableChange
variable = antiphase_A_y
change_over = time_step
norm = L1
[]
[dAz]
type = AverageVariableChange
variable = antiphase_A_z
change_over = time_step
norm = L1
[]
[drift]
type = LinearCombinationPostprocessor
pp_names = 'dPx dPy dPz dAx dAy dAz'
pp_coefs = '${fparse 10.0/dt_polar} ${fparse 10.0/dt_polar} ${fparse 10.0/dt_polar} ${fparse 0.1/dt_polar} ${fparse 0.1/dt_polar} ${fparse 0.1/dt_polar}'
[]
[Fbulk]
type = BulkEnergyEighth
[]
[Froto]
type = RotoBulkEnergyEighth
[]
[Fcouple]
type = RotoPolarCoupledEnergyEighth
[]
[]
[Executioner]
type = Transient
solve_type = LINEAR
[TimeIntegrator]
type = ActuallyExplicitEuler
solve_type = lumped
use_constant_mass = true
[]
dt = ${dt_polar}
end_time = 1e9
[]
[Outputs]
console = false
[]
(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
[]
[]
(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/pertsev/PTO_pertsev_polar.i)
TC = 25.0
um = -0.002
C11 = 174.6032
C12 = 79.3651
C44 = 111.1111
umzz = ${fparse -2.0*C12/C11*um}
alpha1 = ${fparse 3.8e-4*(TC - 479.0)}
alpha11 = -0.073
alpha123 = -3.7
G110 = 1.0
Lx = 2.0
Ly = 2.0
tf = 2.0
nx = 2
ny = 2
nz = 8
dt_polar = 0.05
p0x = 0.0
p0y = 0.0
p0z = 0.0
noise = 0.01
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = ${nx}
ny = ${ny}
nz = ${nz}
xmin = 0.0
xmax = ${Lx}
ymin = 0.0
ymax = ${Ly}
zmin = 0.0
zmax = ${tf}
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 = ${fparse p0x - noise}
max = ${fparse p0x + noise}
seed = 51
[]
[]
[polar_y]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = RandomIC
min = ${fparse p0y - noise}
max = ${fparse p0y + noise}
seed = 46
[]
[]
[polar_z]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = RandomIC
min = ${fparse p0z - noise}
max = ${fparse p0z + noise}
seed = 124
[]
[]
[]
[AuxVariables]
[u_x]
order = FIRST
family = LAGRANGE
[]
[u_y]
order = FIRST
family = LAGRANGE
[]
[u_z]
order = FIRST
family = LAGRANGE
[]
[Pmag]
order = FIRST
family = LAGRANGE
[]
[]
[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'
[]
[]
[Materials]
[Landau_P]
type = GenericConstantMaterial
prop_names = 'alpha1 alpha11 alpha12 alpha111 alpha112 alpha123 alpha1111 alpha1112 alpha1122 alpha1123'
prop_values = '${alpha1} ${alpha11} 0.75 0.26 0.61 ${alpha123} 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.51 -0.02 0.02 0.0'
[]
[mat_C]
type = GenericConstantMaterial
prop_names = 'C11 C12 C44'
prop_values = '${C11} ${C12} ${C44}'
[]
[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 ${umzz}'
[]
[strain]
type = ComputeSmallStrain
displacements = 'u_x u_y u_z'
global_strain = global_strain
[]
[]
[Kernels]
[bed_x]
type = BulkEnergyDerivativeEighth
variable = polar_x
component = 0
[]
[walled_x]
type = WallEnergyDerivative
variable = polar_x
component = 0
[]
[electrostr_x]
type = CubicParentElasticPDerivative
variable = polar_x
component = 0
[]
[time_x]
type = TimeDerivative
variable = polar_x
[]
[bed_y]
type = BulkEnergyDerivativeEighth
variable = polar_y
component = 1
[]
[walled_y]
type = WallEnergyDerivative
variable = polar_y
component = 1
[]
[electrostr_y]
type = CubicParentElasticPDerivative
variable = polar_y
component = 1
[]
[time_y]
type = TimeDerivative
variable = polar_y
[]
[bed_z]
type = BulkEnergyDerivativeEighth
variable = polar_z
component = 2
[]
[walled_z]
type = WallEnergyDerivative
variable = polar_z
component = 2
[]
[electrostr_z]
type = CubicParentElasticPDerivative
variable = polar_z
component = 2
[]
[time_z]
type = TimeDerivative
variable = polar_z
[]
[]
[BCs]
[Periodic]
[xy]
auto_direction = 'x y'
variable = 'polar_x polar_y polar_z'
[]
[]
[]
[Postprocessors]
[Fbulk]
type = BulkEnergyEighth
execute_on = 'initial timestep_end'
[]
[Fwall]
type = WallEnergy
execute_on = 'initial timestep_end'
[]
[Px]
type = ElementAverageValue
variable = polar_x
execute_on = 'initial timestep_end'
[]
[Py]
type = ElementAverageValue
variable = polar_y
execute_on = 'initial timestep_end'
[]
[Pz]
type = ElementAverageValue
variable = polar_z
execute_on = 'initial timestep_end'
[]
[Pmag_max]
type = ElementExtremeValue
variable = Pmag
value_type = max
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
solve_type = LINEAR
[TimeIntegrator]
type = ActuallyExplicitEuler
solve_type = lumped
use_constant_mass = true
[]
dt = ${dt_polar}
end_time = 1e9
[]
[Outputs]
print_linear_residuals = false
[]
(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
[]
[]
(tutorial/ferroelectric_domain_wall.i)
###############################################################
##
## Ferroelectric 180-degree domain wall in BaTiO3.
##
## This input is the NON-FLEXOELECTRIC, UNROTATED reduction of the
## flexoelectric domain-wall model. Two systematic changes were made
## relative to that model:
##
## 1. RotatedCubicParentNVFlexoelectricFullPDerivative ->
## CubicParentElasticPDerivative. The "Full" kernel carried BOTH the
## electrostrictive and the flexoelectric parts of dF/dP (which is why
## there was no separate elastic P-derivative Kernel). Every gradient-
## test term in it carries a flexocoupling factor mu, so as mu -> 0 it
## reduces exactly to the elastic P-derivative. Verified numerically:
## running the flexo input with mu11 = mu12 = mu44 = 0 reproduces this
## input's elastic energy to 4e-8 relative and total energy to 1.2e-8.
##
## 2. All Rotated* objects -> their unrotated counterparts, and the twist
## angle / euler angles removed. Nothing here is rotated, so the crystal
## axes and the simulation axes coincide.
##
## The flexoelectric eigenstrain, the flexocoupling constants mu_ij and the
## elastic compliances s_ij are gone with them. NOTE that the flexo
## eigenstrain entered the CompositeEigenstrain with weight -1, so dropping
## it is not a no-op.
##
## GRADIENT COEFFICIENT CONVENTION -- read before editing the G block.
## The unrotated WallEnergyDerivative/WallEnergy take G110 together with the
## RATIOS G11/G110 etc. The Rotated variants took bare G11/G12/G44. Matching
## the two residuals term-by-term at twist = 0 gives
## G110 = G11, G11_G110 = 1, G12_G110 = G12/G11, G44_G110 = G44/G11
## and, crucially, G44P_G110 = 0: the Rotated kernel carries NO antisymmetric
## G44' term. Other unrotated Ferret inputs ship a nonzero G44P_G110
## (surface_charge.i uses 0.3), so copying a G block from one of those would
## silently add physics this model never had.
##
## Units in Ferret are nm, kg, seconds and attocoulombs.
##
## CAVEAT: the Terminator below stops on the ENERGY RATE, which is blind to
## small polarization components -- it can fire while a component orders of
## magnitude below the dominant one is still evolving. If you care about such
## a component, disable it and use a fixed end_time instead.
##
###############################################################
## Gradient (wall) energy coefficients.
## The unrotated WallEnergyDerivative/WallEnergy take G110 together with the
## ratios G11/G110 etc., NOT the bare G11/G12/G44 that the Rotated variants use.
## Matching the two residuals term-by-term at twist = 0 gives
## G110 = G11, G11_G110 = 1, G12_G110 = G12/G11, G44_G110 = G44/G11
## and, crucially, G44P_G110 = 0: the Rotated kernel carries NO antisymmetric
## G44' term, so copying a G-block from another unrotated input (surface_charge.i
## ships G44P_G110 = 0.3) would silently add physics this model never had.
## Here G11 = 0.5, G12 = -0.02, G44 = 0.02.
G110 = 0.5
G11_G110 = 1.0
G12_G110 = -0.04
G44_G110 = 0.04
G44P_G110 = 0.0
L = 0.25
n_xy = 1
Z = 110.0
n_z = 440.0
period = 0.028559933214452663
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = ${n_z}
ny = ${n_xy}
nz = ${n_xy}
xmin = -${Z}
xmax = ${Z}
ymin = -${L}
ymax = ${L}
zmin = -${L}
zmax = ${L}
elem_type = HEX8
[]
[./cnode]
input = gen
type = ExtraNodesetGenerator
coord = '-${Z} -${L} -${L}'
new_boundary = 100
[../]
[]
[GlobalParams]
#len_scale = 1.0
polar_x = polar_x
polar_y = polar_y
polar_z = polar_z
displacements = 'u_x u_y u_z'
potential_E_int = potential_E_int
[]
[Functions]
[./DW_func]
type = ParsedFunction
symbol_names = 'A p'
symbol_values = '0.2 ${period}'
expression = 'A*cos(p*x)'
[../]
[]
[Variables]
[./u_x]
[../]
[./u_y]
[../]
[./u_z]
[../]
[./global_strain]
order = SIXTH
family = SCALAR
[../]
[./polar_x]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
min = -1e-5
max = 1e-5
seed = 1
[../]
block = '0'
[../]
[./polar_y]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
min = -1e-5
max = 1e-5
seed = 2
[../]
block = '0'
[../]
[./polar_z]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = DW_func
[../]
block = '0'
[../]
[./potential_E_int]
order = FIRST
family = LAGRANGE
block = '0'
[../]
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[./all_FE]
strain = SMALL
add_variables = true
incremental = false
eigenstrain_names = 'total_eigenstrain'
global_strain = global_strain
generate_output = 'strain_xx strain_yy strain_zz strain_yz strain_xz strain_xy'
block = '0'
[../]
[]
# GlobalStrain action for generating the objects associated with the global
# strain calculation and associated displacement visualization
[./GlobalStrain]
[./global_strain]
scalar_global_strain = global_strain
displacements = 'u_x u_y u_z'
auxiliary_displacements = 'disp_x disp_y disp_z'
global_displacements = 'ug_x ug_y ug_z'
[../]
[../]
[]
[]
[Kernels]
### Operators for the polar field: ###
[./bed_x]
type = BulkEnergyDerivativeEighth
variable = polar_x
component = 0
block = '0'
[../]
[./bed_y]
type = BulkEnergyDerivativeEighth
variable = polar_y
component = 1
block = '0'
[../]
[./bed_z]
type = BulkEnergyDerivativeEighth
variable = polar_z
component = 2
block = '0'
[../]
[./walled_x]
type = WallEnergyDerivative
variable = polar_x
component = 0
block = '0'
[../]
[./walled_y]
type = WallEnergyDerivative
variable = polar_y
component = 1
block = '0'
[../]
[./walled_z]
type = WallEnergyDerivative
variable = polar_z
component = 2
block = '0'
[../]
[./elastic_polar_coupled_x]
type = CubicParentElasticPDerivative
variable = polar_x
component = 0
block = '0'
[../]
[./elastic_polar_coupled_y]
type = CubicParentElasticPDerivative
variable = polar_y
component = 1
block = '0'
[../]
[./elastic_polar_coupled_z]
type = CubicParentElasticPDerivative
variable = polar_z
component = 2
block = '0'
[../]
[./polar_x_electric_E]
type = PolarElectricEStrong
variable = potential_E_int
block = '0'
[../]
[./FE_E_int]
type = Electrostatics
variable = potential_E_int
block = '0'
[../]
[./polar_electric_px]
type = PolarElectricPStrong
variable = polar_x
component = 0
block = '0'
[../]
[./polar_electric_py]
type = PolarElectricPStrong
variable = polar_y
component = 1
block = '0'
[../]
[./polar_electric_pz]
type = PolarElectricPStrong
variable = polar_z
component = 2
block = '0'
[../]
[./polar_x_time]
type = TimeDerivativeScaled
variable=polar_x
time_scale = 1.0
block = '0'
[../]
[./polar_y_time]
type = TimeDerivativeScaled
variable=polar_y
time_scale = 1.0
block = '0'
[../]
[./polar_z_time]
type = TimeDerivativeScaled
variable = polar_z
time_scale = 1.0
block = '0'
[../]
[]
[Materials]
[./eigen_strain]
type = ComputeEigenstrain
#xx yy zz (xy yz xz)
eigen_base = '0.0 0.0 0.0 0.0 0.0 0.0'
eigenstrain_name = 'epitaxy'
block = '0'
[../]
[./Landau_P]
type = GenericConstantMaterial
prop_names = 'alpha1 alpha11 alpha12 alpha111 alpha112 alpha123 alpha1111 alpha1112 alpha1122 alpha1123'
prop_values = '-0.03635 -0.2097 0.7974 1.294 -1.95 -2.5 38.63 25.29 16.37 13.67'
block = '0'
[../]
[./Landau0_G_FE]
type = GenericConstantMaterial
prop_names = 'G110 G11_G110 G12_G110 G44_G110 G44P_G110'
prop_values = '${G110} ${G11_G110} ${G12_G110} ${G44_G110} ${G44P_G110}'
block = '0'
[../]
[./mat_C]
type = GenericConstantMaterial
prop_names = 'C11 C12 C44'
prop_values = '178.0 96.4 122.0'
block = '0'
[../]
[./mat_Q] #this is slightly different from Phys Rev B 89, 174111 (2014) ?
type = GenericConstantMaterial
prop_names = 'Q11 Q12 Q44'
prop_values = '0.10 -0.045 0.029' #0.059/4?
block = '0'
[../]
[./elasticity_tensor_1]
type = ComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '178.0 96.4 96.4 178.0 96.4 178.0 122.0 122.0 122.0'
block = '0'
[../]
[./film_eigenstrain]
type = CompositeEigenstrain
## NOTE: 'flexo' carried weight2 = -1, so dropping it is not a no-op.
tensors = 'ferro epitaxy'
weights = 'weight1 weight3'
eigenstrain_name = total_eigenstrain
coupled_variables = 'polar_x polar_y polar_z'
block = '0'
[../]
[./weight1]
type = DerivativeParsedMaterial
block = '0'
expression = '1'
property_name = weight1
coupled_variables = 'polar_x polar_y polar_z'
[../]
[./weight3]
type = DerivativeParsedMaterial
block = '0'
expression = '1'
property_name = weight3
[../]
[./stress_1]
type = ComputeLinearElasticStress
block = '0'
[../]
[./electrostrictive_eigenstrain]
type = ComputeCubicParentElectrostrictiveStrain
polar_x = polar_x
polar_y = polar_y
polar_z = polar_z
eigenstrain_name = 'ferro'
block = '0'
[../]
[./permitivitty]
###############################################
##
## BTO background permittivity 45 (used in flexo paper)
##
###############################################
type = GenericConstantMaterial
prop_names = 'permittivity'
prop_values = '0.39'
block = '0'
[../]
[]
[Postprocessors]
[./dt]
type = TimestepSize
[../]
[./FbP]
type = BulkEnergyEighth
execute_on = 'timestep_end'
block = '0'
[../]
[./FgP]
type = WallEnergy
execute_on = 'timestep_end'
block = '0'
[../]
[./Fele]
type = ElectrostaticEnergy
execute_on = 'timestep_end'
block = '0'
[../]
[./Fela]
type = CubicParentElasticEnergy
execute_on = 'timestep_end'
polar_x = polar_x
polar_y = polar_y
polar_z = polar_z
block = '0'
[../]
[./Ftot]
type = LinearCombinationPostprocessor
pp_names = 'FbP FgP Fela Fele'
pp_coefs = ' 1 1 1 1'
execute_on = 'timestep_end'
##########################################
#
# NOTE: Ferret output is in attojoules
#
##########################################
[../]
[./maxPy]
type = NodalExtremeValue
variable = polar_y
[../]
[./maxPx]
type = NodalExtremeValue
variable = polar_x
[../]
[./perc_change]
type = EnergyRatePostprocessor
postprocessor = Ftot
execute_on = 'timestep_end'
dt = dt
[../]
[]
[BCs]
[./Periodic]
[./x]
auto_direction = 'x y z'
variable = 'u_x u_y u_z polar_x polar_y polar_z potential_E_int'
[../]
[../]
# fix center point location
[./centerfix_x]
type = DirichletBC
boundary = 100
variable = u_x
value = 0
[../]
[./centerfix_y]
type = DirichletBC
boundary = 100
variable = u_y
value = 0
[../]
[./centerfix_z]
type = DirichletBC
boundary = 100
variable = u_z
value = 0
[../]
[]
[UserObjects]
[./kill]
type = Terminator
expression = 'perc_change <= 5.0e-7'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
#petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart -snes_atol -snes_rtol -ksp_rtol -pc_type'
petsc_options_value = ' 121 1e-8 1e-6 1e-5 bjacobi'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
scheme = 'bdf2'
dtmin = 1e-13
dtmax = 10.0
[./TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 25 #usually 10
linear_iteration_ratio = 100
dt = 0.1
growth_factor = 1.1
[../]
[]
[Outputs]
print_linear_residuals = false
perf_graph_live = false
[./out]
type = Exodus
execute_on = 'INITIAL FINAL'
file_base = out_ferroelectric_domain_wall
elemental_as_nodal = true
[../]
[./csv]
type = CSV
file_base = out_ferroelectric_domain_wall
[../]
[]
(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
[]
[]