- mag_xThe x component of the constrained magnetization
C++ Type:std::vector<VariableName>
Controllable:No
Description:The x component of the constrained magnetization
- mag_yThe y component of the constrained magnetization
C++ Type:std::vector<VariableName>
Controllable:No
Description:The y component of the constrained magnetization
MagneticExcessLLBEnergy
Overview
Useful tracker of the Landau-Lifshitz-Bloch implementation where,
is computed in the simulation box (volume ). This Postprocessor
tracks the deviations of the normalized magnetization vector from unity. The energy here is arbitrary (and unitless) but can be cast into real units by using the prefactor energy
scale
included in the object input parameters.
Example Input File Syntax
Input Parameters
- blockThe list of blocks (ids or names) that this object will be applied
C++ Type:std::vector<SubdomainName>
Controllable:No
Description:The list of blocks (ids or names) that this object will be applied
- energy_scale1the energy scale, useful for transition between eV and J
Default:1
C++ Type:double
Controllable:No
Description:the energy scale, useful for transition between eV and J
- execute_onTIMESTEP_ENDThe list of flag(s) indicating when this object should be executed, the available options include NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM, ALWAYS.
Default:TIMESTEP_END
C++ Type:ExecFlagEnum
Options:NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM, ALWAYS, TRANSFER
Controllable:No
Description:The list of flag(s) indicating when this object should be executed, the available options include NONE, INITIAL, LINEAR, NONLINEAR, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM, ALWAYS.
- mag_zThe z component of the constrained magnetization
C++ Type:std::vector<VariableName>
Controllable:No
Description:The z component of the constrained magnetization
- prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
C++ Type:MaterialPropertyName
Controllable:No
Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
Optional Parameters
- allow_duplicate_execution_on_initialFalseIn the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).
Default:False
C++ Type:bool
Controllable:No
Description:In the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:Yes
Description:Set the enabled status of the MooseObject.
- execution_order_group0Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.
Default:0
C++ Type:int
Controllable:No
Description:Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.
- force_postauxFalseForces the UserObject to be executed in POSTAUX
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in POSTAUX
- force_preauxFalseForces the UserObject to be executed in PREAUX
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in PREAUX
- force_preicFalseForces the UserObject to be executed in PREIC during initial setup
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in PREIC during initial setup
- 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
- outputsVector of output names where you would like to restrict the output of variables(s) associated with this object
C++ Type:std::vector<OutputName>
Controllable:No
Description:Vector of output names where you would like to restrict the output of variables(s) associated with this object
- 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
Input Files
- (test/tests/magnets/mag_brick.i)
- (test/tests/magnets/slab_PML_small.i)
- (tutorial/BFO_P0A0_mRD.i)
- (tutorial/ringdown.i)
- (test/tests/magnets/magnetostatic_brick.i)
- (tutorial/BFOspw_P111A111-P111bA111b_m1_H111_alp0a0f7DW.i)
- (test/tests/msca/BFO_P0A0_mRD.i)
- (tutorial/BFO_mag_wall_rd.i)
- (test/tests/magnets/Sstate_gen-Py_OOMF.i)
- (test/tests/magnets/ringdown.i)
- (tutorial/BFO_P111_TO_P111b_switch_m1_a1.i)
(test/tests/magnets/mag_brick.i)
[Mesh]
[./fmg]
type = FileMeshGenerator
file = exodus_dx2_x10_y10_z30_b100.e
[]
[central_interface]
type = SideSetsBetweenSubdomainsGenerator
input = fmg
master_block = '1'
paired_block = '2'
primary_block = '1'
new_boundary = '70'
[]
[]
[GlobalParams]
mag_x = mag_x
mag_y = mag_y
mag_z = mag_z
potential_H_int = potential_H_int
[]
[Materials]
[./constants]
type = GenericConstantMaterial
prop_names = ' alpha Ae Ms g0 mu0 nx ny nz '
prop_values = '0.01 0.013 1.2 221010.0 1256.64 0 1 1 '
[../]
[./a_long]
type = GenericFunctionMaterial
prop_names = 'alpha_long'
prop_values = 'bc_func_1'
[../]
[./aniso]
type = GenericConstantMaterial
prop_names = 'K1 K2'
prop_values = '20.0 0' # positive is unaxial
[../]
[./permitivitty_1]
type = GenericConstantMaterial
prop_names = 'permittivity' # dummy variable at the moment since we use the "electrostatics" kernel
prop_values = '1.0'
block = '1 2'
[../]
[]
[Functions]
###############################
## ##
## Define the function for ##
## alpha_long ##
## ##
## here is just a (large) ##
## constant ##
## ##
###############################
[./bc_func_1]
type = ParsedFunction
value = 'st'
vars = 'st'
vals = '1e3'
[../]
[]
[Variables]
[./mag_x]
order = FIRST
family = LAGRANGE
block = '1'
[./InitialCondition]
type = RandomConstrainedVectorFieldIC
phi = azimuth_phi
theta = polar_theta
M0s = 1.0 #amplitude of the RandomConstrainedVectorFieldIC
component = 0
[../]
[../]
[./mag_y]
order = FIRST
family = LAGRANGE
block = '1'
[./InitialCondition]
type = RandomConstrainedVectorFieldIC
phi = azimuth_phi
theta = polar_theta
M0s = 1.0
component = 1
[../]
[../]
[./mag_z]
order = FIRST
family = LAGRANGE
block = '1'
[./InitialCondition]
type = RandomConstrainedVectorFieldIC
phi = azimuth_phi
theta = polar_theta
M0s = 1.0
component = 2
[../]
[../]
[./potential_H_int]
order = FIRST
family = LAGRANGE
block = '1 2'
[../]
[]
[AuxVariables]
#--------------------------------------------#
# #
# field to seed IC that obeys constraint #
# #
#--------------------------------------------#
[./azimuth_phi]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
min = 0.3
max = 0.31
seed = 2
[../]
[../]
[./polar_theta]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
min = 1.4
max = 1.41
seed = 37
[../]
[../]
[./mag_s]
order = FIRST
family = LAGRANGE
block = '1'
[../]
[./H_x]
order = CONSTANT
family = MONOMIAL
block = '1 2'
[../]
[./H_y]
order = CONSTANT
family = MONOMIAL
block = '1 2'
[../]
[./H_z]
order = CONSTANT
family = MONOMIAL
block = '1 2'
[../]
[./azimuth_phi_mag_min1]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
min = 0.0
max = 0.00001
seed = 2
[../]
[../]
[./polar_theta_mag_min1]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
min = 0.0
max = 0.00001
seed = 37
[../]
[../]
[]
[AuxKernels]
#---------------------------------------#
# #
# compute magnitude of m #
# #
#---------------------------------------#
[./mag_mag]
type = VectorMag
variable = mag_s
vector_x = mag_x
vector_y = mag_y
vector_z = mag_z
block = '1'
execute_on = 'timestep_end final'
[../]
#---------------------------------------#
# #
# compute demag field grad*Phi #
# #
#---------------------------------------#
[./hxo]
type = DemagFieldAux
component = 0
variable = H_x
block = '1 2'
execute_on = 'timestep_end final'
[../]
[./hyo]
type = DemagFieldAux
component = 1
variable = H_y
block = '1 2'
execute_on = 'timestep_end final'
[../]
[./hzo]
type = DemagFieldAux
component = 2
variable = H_z
block = '1 2'
execute_on = 'timestep_end final'
[../]
[]
[Kernels]
#---------------------------------------#
# #
# Time dependence #
# #
#---------------------------------------#
[./mag_x_time]
type = TimeDerivative
variable = mag_x
block = '1'
[../]
[./mag_y_time]
type = TimeDerivative
variable = mag_y
block = '1'
[../]
[./mag_z_time]
type = TimeDerivative
variable = mag_z
block = '1'
[../]
#---------------------------------------#
# #
# Exchange stiffness #
# #
#---------------------------------------#
[./dllg_x_exch]
type = MasterExchangeCartLLG
variable = mag_x
component = 0
[../]
[./dllg_y_exch]
type = MasterExchangeCartLLG
variable = mag_y
component = 1
[../]
[./dllg_z_exch]
type = MasterExchangeCartLLG
variable = mag_z
component = 2
[../]
#---------------------------------------#
# #
# anisotropy #
# #
#---------------------------------------#
[./d_aM_x]
type = MasterAnisotropyCartLLG
variable = mag_x
component = 0
[../]
[./d_aM_y]
type = MasterAnisotropyCartLLG
variable = mag_y
component = 1
[../]
[./d_aM_z]
type = MasterAnisotropyCartLLG
variable = mag_z
component = 2
[../]
#---------------------------------------#
# #
# demagnetization field #
# #
#---------------------------------------#
[./d_HM_x]
type = MasterInteractionCartLLG
variable = mag_x
component = 0
[../]
[./d_HM_y]
type = MasterInteractionCartLLG
variable = mag_y
component = 1
[../]
[./d_HM_z]
type = MasterInteractionCartLLG
variable = mag_z
component = 2
[../]
#---------------------------------------#
# #
# Magnetostatic Poisson equation #
# #
#---------------------------------------#
[./int_pot_lap]
type = Electrostatics
variable = potential_H_int
block = '1 2'
[../]
[./int_bc_pot_lap]
type = MagHStrongCart
variable = potential_H_int
block = '1'
[../]
#---------------------------------------#
# #
# LLB constraint terms #
# #
#---------------------------------------#
[./llb_x]
type = MasterLongitudinalLLB
variable = mag_x
component = 0
mag_x = mag_x
mag_y = mag_y
mag_z = mag_z
[../]
[./llb_y]
type = MasterLongitudinalLLB
variable = mag_y
component = 1
mag_x = mag_x
mag_y = mag_y
mag_z = mag_z
[../]
[./llb_z]
type = MasterLongitudinalLLB
variable = mag_z
component = 2
mag_x = mag_x
mag_y = mag_y
mag_z = mag_z
[../]
[]
[BCs]
#---------------------------------------#
# #
# ground the magnetostatic potential #
# at boundaries of the bounding box #
# #
#---------------------------------------#
[./bc_int_pot_boundary]
type = DirichletBC
variable = potential_H_int
value = 0.0
boundary = '1 2 3 4 5 6'
[../]
#---------------------------------------#
# #
# enforce Neumann condition (m*n = 0) #
# at the boundary of the brick #
# #
# Note: I don't think this #
# does anything but we #
# leave it in regardless #
# #
#---------------------------------------#
[./bc_surface_mag_x]
type = NeumannBC
variable = mag_x
value = 0.0
boundary = '70'
[../]
[./bc_surface_mag_y]
type = NeumannBC
variable = mag_y
value = 0.0
boundary = '70'
[../]
[./bc_surface_mag_z]
type = NeumannBC
variable = mag_z
value = 0.0
boundary = '70'
[../]
[]
[Postprocessors]
#---------------------------------------#
# #
# track dt step size #
# #
#---------------------------------------#
[./dt]
type = TimestepSize
[../]
#---------------------------------------#
# #
# Average |M| and along other #
# directions #
# #
#---------------------------------------#
[./<M>]
type = ElementAverageValue
variable = mag_s
block = '1'
execute_on = 'initial timestep_end final'
[../]
[./<mx>]
type = ElementAverageValue
variable = mag_x
block = '1'
execute_on = 'initial timestep_end final'
[../]
[./<my>]
type = ElementAverageValue
variable = mag_y
block = '1'
execute_on = 'initial timestep_end final'
[../]
[./<mz>]
type = ElementAverageValue
variable = mag_z
block = '1'
execute_on = 'initial timestep_end final'
[../]
#---------------------------------------#
# #
# Calculate anisotropy energy of #
# the magnetic body #
# #
#---------------------------------------#
[./Fa]
type = MasterMagneticAnisotropyEnergy
execute_on = 'initial timestep_end final'
block = '1'
energy_scale = 6241.51 #converts results to eV
[../]
#---------------------------------------#
# #
# Calculate exchange energy of #
# the magnetic body #
# #
#---------------------------------------#
[./Fexch]
type = MasterMagneticExchangeEnergy
execute_on = 'timestep_end final'
block = '1'
energy_scale = 6241.51 #converts results to eV
[../]
#---------------------------------------#
# #
# Calculate demagnetization energy #
# of the magnetic body #
# #
#---------------------------------------#
[./Fdemag]
type = MagnetostaticEnergyCart
execute_on = 'timestep_end final'
block = '1'
energy_scale = 6241.51 #converts results to eV
[../]
#---------------------------------------#
# #
# Calculate excess energy from missed #
# LLB targets #
# #
#---------------------------------------#
[./Fllb]
type = MagneticExcessLLBEnergy
execute_on = 'timestep_end final'
block = '1'
mag_x = mag_x
mag_y = mag_y
mag_z = mag_z
[../]
#---------------------------------------#
# #
# add all the energy contributions #
# and calculate their percent change #
# #
#---------------------------------------#
[./Ftot]
type = LinearCombinationPostprocessor
pp_names = 'Fexch Fdemag Fa'
pp_coefs = ' 1.0 1.0 1.0'
execute_on = 'timestep_end final'
[../]
[./perc_change]
type = EnergyRatePostprocessor
postprocessor = Ftot
dt = dt
execute_on = 'timestep_end final'
[../]
[]
[UserObjects]
[./kill]
type = Terminator
expression = 'perc_change <= 1.0e-5'
[../]
[]
[Preconditioning]
#---------------------------------------#
# #
# Solver options #
# #
#---------------------------------------#
[./smp]
type = SMP
full = true
petsc_options_iname = ' -ksp_gmres_restart -snes_atol -snes_rtol -ksp_rtol -pc_type'
petsc_options_value = ' 121 1e-8 1e-8 1e-5 bjacobi'
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
[./TimeIntegrator]
type = ImplicitEuler
[../]
dtmin = 1e-12
dtmax = 1.0e-2 #10 ns
[./TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 10
linear_iteration_ratio = 100
dt = 1.0e-8 #10 fs
[../]
verbose = true
num_steps = 2
[]
[Outputs]
print_linear_residuals = false
[./out]
type = Exodus
file_base = out_mag_brick
elemental_as_nodal = true
interval = 1
[../]
[./outCSV]
type = CSV
file_base = out_mag_brick
[../]
[]
(test/tests/magnets/slab_PML_small.i)
[GlobalParams]
mag_x = mag_x
mag_y = mag_y
mag_z = mag_z
potential_H_int = potential_H_int
g0 = 1.0
Hscale = 0.004519239
mu0 = 1.256637e-06
y0pmlminus = -25
deltasyminus = 1.0e04
deltawyminus = 5
deltapyminus = 0.1
[]
alphadef = 0.02
[Mesh]
[./mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 25
ny = 43
nz = 5
xmin = -50
xmax = 50
ymin = -35
ymax = 50
zmin = -10
zmax = 10
[../]
[./infinite_domain]
type = SubdomainBoundingBoxGenerator
input = mesh
bottom_left = '-50 -35 -10'
top_right = '50 50 10'
block_id = 3
block_name = infinite_domain
[../]
[./vacuum_box]
type = SubdomainBoundingBoxGenerator
input = infinite_domain
bottom_left = '-50 -25 -10'
top_right = '50 50 10'
block_id = 2
block_name = vacuum
[../]
[./boundary1]
type = SideSetsBetweenSubdomainsGenerator
input = vacuum_box
new_boundary = id_boundary
paired_block = vacuum
primary_block = 3 #mesh #infinite_domain
[../]
[./brick]
type = SubdomainBoundingBoxGenerator
input = boundary1 #vacuum_box
bottom_left = '-10 -10 -1.5'
top_right = '10 10 1.5'
block_id = 1
block_name = brick
[../]
[../]
[Materials]
############################################################################
##
## material constants used.
##
##
############################################################################
[./constants]
type = GenericConstantMaterial
prop_names = ' alpha permittivity Ae Ms'
prop_values = '${alphadef} 1.0 1.3e-05 1.2'
block = '1'
[../]
#NOTE: g0 is g*mu0*Ms/2 as defined by Hertel
#alpha is chosen to be 1.0 as in the muMag paper
[./a_long]
type = GenericFunctionMaterial
prop_names = 'alpha_long'
prop_values = 'bc_func_1'
block = '1'
[../]
[./constantsv]
type = GenericConstantMaterial
prop_names = ' permittivity'
prop_values = '1.0'
block = '3 2'
[../]
[]
[Functions]
##############################
##
## Define the ramping function
## expression to be used
##
##############################
[./bc_func_1]
type = ParsedFunction
value = 'st'
vars = 'st'
vals = '1.e1' #3?
[../]
[]
[Variables]
[./mag_x]
order = FIRST
family = LAGRANGE
block = '1'
[./InitialCondition]
type = RandomConstrainedVectorFieldIC
phi = azimuth_phi
theta = polar_theta
M0s = 1.0 #amplitude of the RandomConstrainedVectorFieldIC
component = 0
[../]
[../]
[./mag_y]
order = FIRST
family = LAGRANGE
block = '1'
[./InitialCondition]
type = RandomConstrainedVectorFieldIC
phi = azimuth_phi
theta = polar_theta
M0s = 1.0
component = 1
[../]
[../]
[./mag_z]
order = FIRST
family = LAGRANGE
block= '1'
[./InitialCondition]
type = RandomConstrainedVectorFieldIC
phi = azimuth_phi
theta = polar_theta
M0s = 1.0
component = 2
[../]
[../]
[./potential_H_int]
order = FIRST
family = LAGRANGE
block = '1 2'
[../]
[./phi2]
order = FIRST
family = LAGRANGE
block = 3
[../]
[]
[AuxVariables]
#--------------------------------------------#
# #
# field to seed IC that obeys constraint #
# #
#--------------------------------------------#
[./azimuth_phi]
order = FIRST
family = LAGRANGE
block = '1'
[./InitialCondition]
type = RandomIC
min = 1.5708
max = 1.5709
seed = 2
[../]
[../]
[./polar_theta]
order = FIRST
family = LAGRANGE
block = '1'
[./InitialCondition]
type = RandomIC
min = 1.5708
max = 1.5709
seed = 37
[../]
[../]
[./mag_s]
order = FIRST
family = LAGRANGE
block = '1'
[../]
[./H_y]
order = FIRST
family = MONOMIAL
block = '1 2'
[../]
[./H_y_v]
order = FIRST
family = MONOMIAL
block = '3'
[../]
[]
[AuxKernels]
[./mag_mag]
type = VectorMag
variable = mag_s
vector_x = mag_x
vector_y = mag_y
vector_z = mag_z
execute_on = 'initial timestep_end final'
block = '1'
[../]
[./Hy_brick]
type = DemagFieldAux
variable = H_y
component = 1
block = '1 2'
[../]
[./Hy_id]
type = DemagFieldAuxPML
phi1 = phi2
variable = H_y_v
component = 1
block = '3'
[../]
[]
[Kernels]
#---------------------------------------#
# #
# Time dependence #
# #
#---------------------------------------#
[./mag_x_time]
type = TimeDerivative
variable = mag_x
block = '1'
[../]
[./mag_y_time]
type = TimeDerivative
variable = mag_y
block = '1'
[../]
[./mag_z_time]
type = TimeDerivative
variable = mag_z
block = '1'
[../]
#---------------------------------------#
# #
# Local magnetic exchange #
# #
#---------------------------------------#
[./dllg_x_exch]
type = MasterExchangeCartLLG
variable = mag_x
component = 0
mag_x = mag_x
mag_y = mag_y
mag_z = mag_z
block = '1'
[../]
[./dllg_y_exch]
type = MasterExchangeCartLLG
variable = mag_y
component = 1
mag_x = mag_x
mag_y = mag_y
mag_z = mag_z
block = '1'
[../]
[./dllg_z_exch]
type = MasterExchangeCartLLG
variable = mag_z
component = 2
mag_x = mag_x
mag_y = mag_y
mag_z = mag_z
block = '1'
[../]
#---------------------------------------#
# #
# demagnetization field #
# #
#---------------------------------------#
[./d_HM_x]
type = MasterInteractionCartLLG
variable = mag_x
component = 0
block = '1'
[../]
[./d_HM_y]
type = MasterInteractionCartLLG
variable = mag_y
component = 1
block = '1'
[../]
[./d_HM_z]
type = MasterInteractionCartLLG
variable = mag_z
component = 2
block = '1'
[../]
#---------------------------------------#
# #
# LLB constraint terms #
# #
#---------------------------------------#
[./llb1_x]
type = MasterLongitudinalLLB
variable = mag_x
component = 0
block = '1'
[../]
[./llb1_y]
type = MasterLongitudinalLLB
variable = mag_y
component = 1
block = '1'
[../]
[./llb1_z]
type = MasterLongitudinalLLB
variable = mag_z
component = 2
block = '1'
[../]
#---------------------------------------#
# #
# Magnetostatic Poisson equation #
# #
#---------------------------------------#
[./int_pot_lap]
type = Electrostatics
variable = potential_H_int
block = '1 2'
[../]
[./int_bc_pot_lap]
type = MagHStrongCart
variable = potential_H_int
block = '1'
[../]
[./infinite_domain]
type = MagneticPMLCart
variable = phi2
component = 1
block = '3'
[../]
[]
[InterfaceKernels]
[./PML_boundary]
type = InterfaceEquality
variable = potential_H_int
boundary = id_boundary
neighbor_var = potential_H_int
permittivity_neighbor = 1.
[../]
[]
[BCs]
[./vacuum_box]
type = DirichletBC
variable = phi2
value = 0.
boundary = 'bottom'
[../]
[./other_boundaries]
type = DirichletBC
variable = potential_H_int
value = 0.
boundary = 'left right front back top '
[../]
[./boundarydirichlet]
type = CoupledDirichletBC
variable = phi2
coupled_var = potential_H_int
boundary = id_boundary
[]
[]
[Postprocessors]
[./dt]
type = TimestepSize
[../]
#---------------------------------------#
# #
# Average M = |m| #
# #
#---------------------------------------#
[./M1]
type = ElementAverageValue
variable = mag_s
execute_on = 'initial timestep_end final'
block = '1'
[../]
[./<mx>]
type = ElementAverageValue
variable = mag_x
execute_on = 'initial timestep_end final'
block = '1'
[../]
[./<my>]
type = ElementAverageValue
variable = mag_y
execute_on = 'initial timestep_end final'
block = '1'
[../]
[./<mz>]
type = ElementAverageValue
variable = mag_z
execute_on = 'initial timestep_end final'
block = '1'
[../]
#---------------------------------------#
# #
# Calculate exchange energy of #
# the magnetic body #
# #
#---------------------------------------#
[./Fexch]
type = MasterMagneticExchangeEnergy
energy_scale = 0.001 #converts results to eV
execute_on = 'initial timestep_end final'
block = '1'
[../]
#---------------------------------------#
# #
# Calculate demagnetization energy #
# of the magnetic body #
# #
#---------------------------------------#
[./Fdemag]
type = MagnetostaticEnergyCart
energy_scale = 0.001 #converts results to eV
execute_on = 'initial timestep_begin timestep_end final'
block = '1'
[../]
#---------------------------------------#
# #
# Calculate excess energy from missed #
# LLB targets #
# #
#---------------------------------------#
[./Fllb1]
type = MagneticExcessLLBEnergy
mag_x = mag_x
mag_y = mag_y
mag_z = mag_z
execute_on = 'initial timestep_end final'
block = '1'
[../]
#---------------------------------------#
# #
# add all the energy contributions #
# and calculate their percent change #
# #
#---------------------------------------#
[./Ftot]
type = LinearCombinationPostprocessor
pp_names = 'Fexch Fdemag'
pp_coefs = ' 1.0 1.0'
execute_on = 'initial timestep_end final'
[../]
[./perc_change]
type = EnergyRatePostprocessor
postprocessor = Ftot
dt = dt
execute_on = 'timestep_end final'
[../]
[]
[UserObjects]
[./kill]
type = Terminator
expression = 'perc_change <= 1.0e-8'
[../]
[]
[Preconditioning]
#---------------------------------------#
# #
# Solver options #
# #
#---------------------------------------#
[./smp]
type = SMP #FDP
# petsc_options_iname = ' -pc_type -mat_fd_coloring_err -mat_fd_type'
# petsc_options_value = 'lu 1.e-06 ds'
full = true
petsc_options_iname = ' -ksp_gmres_restart -snes_atol -snes_rtol -ksp_rtol -pc_type -sub_pc_type '
petsc_options_value = ' 100 1e-12 1e-9 1e-8 bjacobi ilu'
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
automatic_scaling = true
[./TimeIntegrator]
type = NewmarkBeta
[../]
dtmin = 1.e-5
dtmax = 1.e-3
end_time = 2
[./TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 25 #usually 10
linear_iteration_ratio = 100
dt = 1e-4
growth_factor = 1.1
cutback_factor = 0.75
[../]
num_steps = 2
[../]
[Outputs]
print_linear_residuals = false
[pgraph]
type = PerfGraphOutput
execute_on = final
level = 2
[]
[./out]
type = Exodus
file_base = slab_PML_small_25_002
elemental_as_nodal = true
interval = 1
execute_on = 'initial timestep_end'
[../]
[./outCSV]
type = CSV
file_base = slab_PML_small_25_002
interval = 1
[../]
[]
(tutorial/BFO_P0A0_mRD.i)
Dedef = 3.7551
D0def = 0.003
K1def = -5.0068
K1cdef = -0.0550748
Ktdef = -0.00365997
alphadef = 0.1
[Mesh]
[fileload]
type = FileMeshGenerator
file = BFO_P0A0.e
use_for_exodus_restart = true
[]
[]
[GlobalParams]
mag1_x = mag1_x
mag1_y = mag1_y
mag1_z = mag1_z
mag2_x = mag2_x
mag2_y = mag2_y
mag2_z = mag2_z
antiphase_A_x = antiphase_A_x
antiphase_A_y = antiphase_A_y
antiphase_A_z = antiphase_A_z
polar_x = polar_x
polar_y = polar_y
polar_z = polar_z
[]
[Materials]
############################################################################
##
## material constants used.
##
##
############################################################################
[./constants]
type = GenericConstantMaterial
prop_names = ' alpha De D0 g0mu0Ms g0 K1 K1c Kt permittivity '
prop_values = '${alphadef} ${Dedef} ${D0def} 48291.9 48291.9 ${K1def} ${K1cdef} ${Ktdef} 1.0 '
[../]
[./a_long]
type = GenericFunctionMaterial
prop_names = 'alpha_long'
prop_values = 'bc_func_1'
[../]
[]
[Functions]
##############################
##
## Define the ramping function
## expression to be used
##
##############################
[./bc_func_1]
type = ParsedFunction
value = 'st'
vars = 'st'
vals = '1e3'
[../]
[]
[Variables]
[./mag1_x]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
min = -0.703126
max = -0.703125
[../]
[../]
[./mag1_y]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
min = -0.0079299
max = -0.0079298
[../]
[../]
[./mag1_z]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
min = 0.711033
max = 0.711034
[../]
[../]
[./mag2_x]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
min = 0.711033
max = 0.711034
[../]
[../]
[./mag2_y]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
min = -0.0079299
max = -0.0079298
[../]
[../]
[./mag2_z]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
min = -0.703126
max = -0.703125
[../]
[../]
[]
[Kernels]
[./mag1_x_time]
type = TimeDerivative
variable = mag1_x
[../]
[./mag1_y_time]
type = TimeDerivative
variable = mag1_y
[../]
[./mag1_z_time]
type = TimeDerivative
variable = mag1_z
[../]
[./mag2_x_time]
type = TimeDerivative
variable = mag2_x
[../]
[./mag2_y_time]
type = TimeDerivative
variable = mag2_y
[../]
[./mag2_z_time]
type = TimeDerivative
variable = mag2_z
[../]
[./afmex1_x]
type = AFMSublatticeSuperexchange
variable = mag1_x
mag_sub = 0
component = 0
[../]
[./afmex1_y]
type = AFMSublatticeSuperexchange
variable = mag1_y
mag_sub = 0
component = 1
[../]
[./afmex1_z]
type = AFMSublatticeSuperexchange
variable = mag1_z
mag_sub = 0
component = 2
[../]
[./afmex2_x]
type = AFMSublatticeSuperexchange
variable = mag2_x
mag_sub = 1
component = 0
[../]
[./afmex2_y]
type = AFMSublatticeSuperexchange
variable = mag2_y
mag_sub = 1
component = 1
[../]
[./afmex2_z]
type = AFMSublatticeSuperexchange
variable = mag2_z
mag_sub = 1
component = 2
[../]
[./afmdmi1_x]
type = AFMSublatticeDMInteraction
variable = mag1_x
mag_sub = 0
component = 0
[../]
[./afmdmi1_y]
type = AFMSublatticeDMInteraction
variable = mag1_y
mag_sub = 0
component = 1
[../]
[./afmdmi1_z]
type = AFMSublatticeDMInteraction
variable = mag1_z
mag_sub = 0
component = 2
[../]
[./afmdmi2_x]
type = AFMSublatticeDMInteraction
variable = mag2_x
mag_sub = 1
component = 0
[../]
[./afmdmi2_y]
type = AFMSublatticeDMInteraction
variable = mag2_y
mag_sub = 1
component = 1
[../]
[./afmdmi2_z]
type = AFMSublatticeDMInteraction
variable = mag2_z
mag_sub = 1
component = 2
[../]
[./afma1_x]
type = AFMEasyPlaneAnisotropy
variable = mag1_x
mag_sub = 0
component = 0
[../]
[./afma1_y]
type = AFMEasyPlaneAnisotropy
variable = mag1_y
mag_sub = 0
component = 1
[../]
[./afma1_z]
type = AFMEasyPlaneAnisotropy
variable = mag1_z
mag_sub = 0
component = 2
[../]
[./afma2_x]
type = AFMEasyPlaneAnisotropy
variable = mag2_x
mag_sub = 1
component = 0
[../]
[./afma2_y]
type = AFMEasyPlaneAnisotropy
variable = mag2_y
mag_sub = 1
component = 1
[../]
[./afma2_z]
type = AFMEasyPlaneAnisotropy
variable = mag2_z
mag_sub = 1
component = 2
[../]
[./afmsia1_x]
type = AFMSingleIonCubicSixthAnisotropy
variable = mag1_x
mag_sub = 0
component = 0
[../]
[./afmsia1_y]
type = AFMSingleIonCubicSixthAnisotropy
variable = mag1_y
mag_sub = 0
component = 1
[../]
[./afmsia1_z]
type = AFMSingleIonCubicSixthAnisotropy
variable = mag1_z
mag_sub = 0
component = 2
[../]
[./afmsia2_x]
type = AFMSingleIonCubicSixthAnisotropy
variable = mag2_x
mag_sub = 1
component = 0
[../]
[./afmsia2_y]
type = AFMSingleIonCubicSixthAnisotropy
variable = mag2_y
mag_sub = 1
component = 1
[../]
[./afmsia2_z]
type = AFMSingleIonCubicSixthAnisotropy
variable = mag2_z
mag_sub = 1
component = 2
[../]
[./llb1_x]
type = LongitudinalLLB
variable = mag1_x
mag_x = mag1_x
mag_y = mag1_y
mag_z = mag1_z
component = 0
[../]
[./llb1_y]
type = LongitudinalLLB
variable = mag1_y
mag_x = mag1_x
mag_y = mag1_y
mag_z = mag1_z
component = 1
[../]
[./llb1_z]
type = LongitudinalLLB
variable = mag1_z
mag_x = mag1_x
mag_y = mag1_y
mag_z = mag1_z
component = 2
[../]
[./llb2_x]
type = LongitudinalLLB
variable = mag2_x
mag_x = mag2_x
mag_y = mag2_y
mag_z = mag2_z
component = 0
[../]
[./llb2_y]
type = LongitudinalLLB
variable = mag2_y
mag_x = mag2_x
mag_y = mag2_y
mag_z = mag2_z
component = 1
[../]
[./llb2_z]
type = LongitudinalLLB
variable = mag2_z
mag_x = mag2_x
mag_y = mag2_y
mag_z = mag2_z
component = 2
[../]
[]
[AuxVariables]
[./mag1_s]
order = FIRST
family = LAGRANGE
[../]
[./mag2_s]
order = FIRST
family = LAGRANGE
[../]
[./Neel_L_x]
order = FIRST
family = LAGRANGE
[../]
[./Neel_L_y]
order = FIRST
family = LAGRANGE
[../]
[./Neel_L_z]
order = FIRST
family = LAGRANGE
[../]
[./SSMag_x]
order = FIRST
family = LAGRANGE
[../]
[./SSMag_y]
order = FIRST
family = LAGRANGE
[../]
[./SSMag_z]
order = FIRST
family = LAGRANGE
[../]
[./antiphase_A_x]
order = FIRST
family = LAGRANGE
initial_from_file_var = antiphase_A_x
initial_from_file_timestep = 'LATEST'
[../]
[./antiphase_A_y]
order = FIRST
family = LAGRANGE
initial_from_file_var = antiphase_A_y
initial_from_file_timestep = 'LATEST'
[../]
[./antiphase_A_z]
order = FIRST
family = LAGRANGE
initial_from_file_var = antiphase_A_z
initial_from_file_timestep = 'LATEST'
[../]
[./polar_x]
order = FIRST
family = LAGRANGE
initial_from_file_var = polar_x
initial_from_file_timestep = 'LATEST'
[../]
[./polar_y]
order = FIRST
family = LAGRANGE
initial_from_file_var = polar_y
initial_from_file_timestep = 'LATEST'
[../]
[./polar_z]
order = FIRST
family = LAGRANGE
initial_from_file_var = polar_z
initial_from_file_timestep = 'LATEST'
[../]
[./ph]
order = FIRST
family = LAGRANGE
[../]
[./th1]
order = FIRST
family = LAGRANGE
[../]
[./th2]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./mag1_mag]
type = VectorMag
variable = mag1_s
vector_x = mag1_x
vector_y = mag1_y
vector_z = mag1_z
execute_on = 'initial timestep_end final'
[../]
[./mag2_mag]
type = VectorMag
variable = mag2_s
vector_x = mag2_x
vector_y = mag2_y
vector_z = mag2_z
execute_on = 'initial timestep_end final'
[../]
[./Neel_Lx]
type = VectorDiffOrSum
variable = Neel_L_x
var1 = mag1_x
var2 = mag2_x
diffOrSum = 0
execute_on = 'initial timestep_end final'
[../]
[./Neel_Ly]
type = VectorDiffOrSum
variable = Neel_L_y
var1 = mag1_y
var2 = mag2_y
diffOrSum = 0
execute_on = 'initial timestep_end final'
[../]
[./Neel_Lz]
type = VectorDiffOrSum
variable = Neel_L_z
var1 = mag1_z
var2 = mag2_z
diffOrSum = 0
execute_on = 'initial timestep_end final'
[../]
[./smallSignalMag_x]
type = VectorDiffOrSum
variable = SSMag_x
var1 = mag1_x
var2 = mag2_x
diffOrSum = 1
execute_on = 'initial timestep_end final'
[../]
[./smallSignalMag_y]
type = VectorDiffOrSum
variable = SSMag_y
var1 = mag1_y
var2 = mag2_y
diffOrSum = 1
execute_on = 'initial timestep_end final'
[../]
[./smallSignalMag_z]
type = VectorDiffOrSum
variable = SSMag_z
var1 = mag1_z
var2 = mag2_z
diffOrSum = 1
execute_on = 'initial timestep_end final'
[../]
[./phc]
type = AngleBetweenTwoVectors
variable = ph
var1x = mag1_x
var1y = mag1_y
var1z = mag1_z
var2x = mag2_x
var2y = mag2_y
var2z = mag2_z
execute_on = 'initial timestep_end final'
[../]
[./th1c]
type = AngleBetweenTwoVectors
variable = th1
var1x = mag1_x
var1y = mag1_y
var1z = mag1_z
var2x = polar_x
var2y = polar_y
var2z = polar_z
execute_on = 'initial timestep_end final'
[../]
[./th2c]
type = AngleBetweenTwoVectors
variable = th2
var1x = mag2_x
var1y = mag2_y
var1z = mag2_z
var2x = polar_x
var2y = polar_y
var2z = polar_z
execute_on = 'initial timestep_end final'
[../]
[]
[BCs]
[./Periodic]
[./xyz]
auto_direction = 'x y z'
variable = 'mag1_x mag1_y mag1_z mag2_x mag2_y mag2_z'
[../]
[../]
[]
[Postprocessors]
[./dt]
type = TimestepSize
[../]
[./ph]
type = ElementAverageValue
execute_on = 'initial timestep_end final'
variable = ph
[../]
[./th1]
type = ElementAverageValue
execute_on = 'initial timestep_end final'
variable = th1
[../]
[./th2]
type = ElementAverageValue
execute_on = 'initial timestep_end final'
variable = th2
[../]
[./FafmSLexch]
type = AFMSublatticeSuperexchangeEnergy
execute_on = 'initial timestep_end final'
mag1_x = mag1_x
mag1_y = mag1_y
mag1_z = mag1_z
mag2_x = mag2_x
mag2_y = mag2_y
mag2_z = mag2_z
energy_scale = 1.0
[../]
[./FafmSLdmi]
type = AFMSublatticeDMInteractionEnergy
execute_on = 'initial timestep_end final'
energy_scale = 1.0
[../]
[./Fllb1]
type = MagneticExcessLLBEnergy
mag_x = mag1_x
mag_y = mag1_y
mag_z = mag1_z
execute_on = 'initial timestep_end final'
[../]
[./Fllb2]
type = MagneticExcessLLBEnergy
mag_x = mag2_x
mag_y = mag2_y
mag_z = mag2_z
execute_on = 'initial timestep_end final'
[../]
[./Fa1]
type = AFMEasyPlaneAnisotropyEnergy
execute_on = 'initial timestep_end final'
mag_x = mag1_x
mag_y = mag1_y
mag_z = mag1_z
energy_scale = 1.0
[../]
[./Fa2]
type = AFMEasyPlaneAnisotropyEnergy
execute_on = 'initial timestep_end final'
mag_x = mag2_x
mag_y = mag2_y
mag_z = mag2_z
energy_scale = 1.0
[../]
[./Fsia1]
type = AFMSingleIonCubicSixthAnisotropyEnergy
execute_on = 'initial timestep_end final'
mag_x = mag1_x
mag_y = mag1_y
mag_z = mag1_z
energy_scale = 1.0
[../]
[./Fsia2]
type = AFMSingleIonCubicSixthAnisotropyEnergy
execute_on = 'initial timestep_end final'
mag_x = mag2_x
mag_y = mag2_y
mag_z = mag2_z
energy_scale = 1.0
[../]
[./Ftot]
type = LinearCombinationPostprocessor
pp_names = 'FafmSLexch FafmSLdmi Fa1 Fa2 Fsia1 Fsia2'
pp_coefs = ' 1.0 1.0 1.0 1.0 1.0 1.0'
execute_on = 'initial timestep_end final'
[../]
[./FtotLLB]
type = LinearCombinationPostprocessor
pp_names = 'Fllb1 Fllb2'
pp_coefs = ' 1.0 1.0'
execute_on = 'initial timestep_end final'
[../]
[./perc_change]
type = EnergyRatePostprocessor
postprocessor = Ftot
dt = dt
execute_on = 'timestep_end final'
[../]
[./elapsed]
type = PerfGraphData
section_name = "Root" # for profiling the problem
data_type = total
[../]
[]
[UserObjects]
[./kill]
type = Terminator
expression = 'perc_change <= 1.0e-5'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
petsc_options_iname = ' -ksp_gmres_restart -snes_atol -snes_rtol -ksp_rtol -pc_type '
petsc_options_value = ' 526 1e-8 1e-8 1e-8 bjacobi'
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
[./TimeIntegrator]
type = NewmarkBeta
[../]
dtmin = 1e-18
dtmax = 1.0e-8
[./TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 10 #usually 10
linear_iteration_ratio = 100
dt = 1e-9
[../]
num_steps = 10000
[]
[Outputs]
print_linear_residuals = false
[./out]
type = Exodus
file_base = out_BFO_P0A0_mRD
elemental_as_nodal = true
interval = 4
[../]
[]
(tutorial/ringdown.i)
[GlobalParams]
mag_x = mag_x
mag_y = mag_y
mag_z = mag_z
potential_H_int = potential_H_int
g0 = 1.0
Hscale = 0.004519239
mu0 = 1.256637e-06
[]
alphadef = 0.02
[Mesh]
[./mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 50
ny = 50
nz = 10
xmin = -50
xmax = 50
ymin = -50
ymax = 50
zmin = -10
zmax = 10
[../]
[./vacuum_box]
type = SubdomainBoundingBoxGenerator
input = mesh
bottom_left = '-50 -50 -10'
top_right = '50 50 10'
block_id = 2
block_name = vacuum
[../]
[./brick]
type = SubdomainBoundingBoxGenerator
input = vacuum_box
bottom_left = '-10 -10 -1.5'
top_right = '10 10 1.5'
block_id = 1
block_name = brick
[../]
[../]
[Materials]
############################################################################
##
## material constants used.
##
############################################################################
[./constants]
type = GenericConstantMaterial
prop_names = ' alpha permittivity Ae Ms'
prop_values = '${alphadef} 1.0 1.3e-05 1.2'
block = '1'
[../]
[./a_long]
type = GenericFunctionMaterial
prop_names = 'alpha_long'
prop_values = 'bc_func_1'
block = '1'
[../]
[./constantsv]
type = GenericConstantMaterial
prop_names = ' alpha permittivity Ae Ms'
prop_values = '1 1.0 1.3e-05 .0'
block = '2'
[../]
[./a_longv]
type = GenericFunctionMaterial
prop_names = 'alpha_long'
prop_values = 'bc_func_1'
block = '2'
[../]
[]
[Functions]
[./bc_func_1]
type = ParsedFunction
value = 'st'
vars = 'st'
vals = '1.e1' #3?
[../]
[]
[Variables]
[./mag_x]
order = FIRST
family = LAGRANGE
block = '1'
[./InitialCondition]
type = RandomConstrainedVectorFieldIC
phi = azimuth_phi
theta = polar_theta
M0s = 1.0 #amplitude of the RandomConstrainedVectorFieldIC
component = 0
[../]
[../]
[./mag_y]
order = FIRST
family = LAGRANGE
block = '1'
[./InitialCondition]
type = RandomConstrainedVectorFieldIC
phi = azimuth_phi
theta = polar_theta
M0s = 1.0
component = 1
[../]
[../]
[./mag_z]
order = FIRST
family = LAGRANGE
block= '1'
[./InitialCondition]
type = RandomConstrainedVectorFieldIC
phi = azimuth_phi
theta = polar_theta
M0s = 1.0
component = 2
[../]
[../]
[./potential_H_int]
order = FIRST
family = LAGRANGE
block = '1 2'
[../]
[]
[AuxVariables]
#--------------------------------------------#
# #
# field to seed IC that obeys constraint #
# #
#--------------------------------------------#
[./azimuth_phi]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
min = 0.
max = 0.01
seed = 2
[../]
[../]
[./polar_theta]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
min = 1.5708
max = 1.5709
seed = 37
[../]
[../]
[./mag_s]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
#---------------------------------------#
# #
# Time dependence #
# #
#---------------------------------------#
[./mag_x_time]
type = TimeDerivative
variable = mag_x
block = '1'
[../]
[./mag_y_time]
type = TimeDerivative
variable = mag_y
block = '1'
[../]
[./mag_z_time]
type = TimeDerivative
variable = mag_z
block = '1'
[../]
#---------------------------------------#
# #
# Local magnetic exchange #
# #
#---------------------------------------#
[./dllg_x_exch]
type = MasterExchangeCartLLG
variable = mag_x
component = 0
mag_x = mag_x
mag_y = mag_y
mag_z = mag_z
block = '1'
[../]
[./dllg_y_exch]
type = MasterExchangeCartLLG
variable = mag_y
component = 1
mag_x = mag_x
mag_y = mag_y
mag_z = mag_z
block = '1'
[../]
[./dllg_z_exch]
type = MasterExchangeCartLLG
variable = mag_z
component = 2
mag_x = mag_x
mag_y = mag_y
mag_z = mag_z
block = '1'
[../]
#---------------------------------------#
# #
# demagnetization field #
# #
#---------------------------------------#
[./d_HM_x]
type = MasterInteractionCartLLG
variable = mag_x
component = 0
block = '1'
[../]
[./d_HM_y]
type = MasterInteractionCartLLG
variable = mag_y
component = 1
block = '1'
[../]
[./d_HM_z]
type = MasterInteractionCartLLG
variable = mag_z
component = 2
block = '1'
[../]
#---------------------------------------#
# #
# LLB constraint terms #
# #
#---------------------------------------#
[./llb1_x]
type = MasterLongitudinalLLB
variable = mag_x
component = 0
block = '1'
[../]
[./llb1_y]
type = MasterLongitudinalLLB
variable = mag_y
component = 1
block = '1'
[../]
[./llb1_z]
type = MasterLongitudinalLLB
variable = mag_z
component = 2
block = '1'
[../]
#---------------------------------------#
# #
# Magnetostatic Poisson equation #
# #
#---------------------------------------#
[./int_pot_lap]
type = Electrostatics
variable = potential_H_int
block = '1 2'
[../]
[./int_bc_pot_lap]
type = MagHStrongCart
variable = potential_H_int
block = '1'
[../]
[]
[BCs]
[./vacuum_box]
type = DirichletBC
value = 0.
variable = potential_H_int
boundary = '0 1 2 3 4 5'
[../]
[]
[Postprocessors]
[./dt]
type = TimestepSize
[../]
#---------------------------------------#
# #
# Average M = |m| #
# #
#---------------------------------------#
[./M1]
type = ElementAverageValue
variable = mag_s
execute_on = 'initial timestep_end final'
block = '1'
[../]
[./<mx>]
type = ElementAverageValue
variable = mag_x
execute_on = 'initial timestep_end final'
block = '1'
[../]
[./<my>]
type = ElementAverageValue
variable = mag_y
execute_on = 'initial timestep_end final'
block = '1'
[../]
[./<mz>]
type = ElementAverageValue
variable = mag_z
execute_on = 'initial timestep_end final'
block = '1'
[../]
#---------------------------------------#
# #
# Calculate exchange energy of #
# the magnetic body #
# #
#---------------------------------------#
[./Fexch]
type = MasterMagneticExchangeEnergy
energy_scale = 0.001 #converts results to eV
execute_on = 'initial timestep_end final'
block = '1'
[../]
#---------------------------------------#
# #
# Calculate demagnetization energy #
# of the magnetic body #
# #
#---------------------------------------#
[./Fdemag]
type = MagnetostaticEnergyCart
energy_scale = 0.001 #converts results to eV
execute_on = 'initial timestep_end final'
block = '1'
[../]
#---------------------------------------#
# #
# Calculate excess energy from missed #
# LLB targets #
# #
#---------------------------------------#
[./Fllb1]
type = MagneticExcessLLBEnergy
mag_x = mag_x
mag_y = mag_y
mag_z = mag_z
execute_on = 'initial timestep_end final'
block = '1'
[../]
#---------------------------------------#
# #
# add all the energy contributions #
# and calculate their percent change #
# #
#---------------------------------------#
[./Ftot]
type = LinearCombinationPostprocessor
pp_names = 'Fexch Fdemag'
pp_coefs = ' 1.0 1.0'
execute_on = 'initial timestep_end final'
[../]
[./perc_change]
type = EnergyRatePostprocessor
postprocessor = Ftot
dt = dt
execute_on = 'timestep_end final'
[../]
[./elapsed]
type = PerfGraphData
section_name = "Root" # for profiling the problem
data_type = total
[../]
[]
[AuxKernels]
[./mag_mag]
type = VectorMag
variable = mag_s
vector_x = mag_x
vector_y = mag_y
vector_z = mag_z
execute_on = 'initial timestep_end final'
block = '1'
[../]
[]
[UserObjects]
[./kill]
type = Terminator
expression = 'perc_change <= 1.0e-6'
[../]
[]
[Preconditioning]
#---------------------------------------#
# #
# Solver options #
# #
#---------------------------------------#
[./smp]
type = SMP
full = true
petsc_options_iname = ' -ksp_gmres_restart -snes_atol -snes_rtol -ksp_rtol -pc_type '
petsc_options_value = ' 100 1e-12 1e-9 1e-8 bjacobi'
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
[./TimeIntegrator]
type = NewmarkBeta
[../]
dtmin = 1.e-4
dtmax = 5.e-3
end_time = 10.0
[./TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 25 #usually 10
linear_iteration_ratio = 100
dt = 1e-6
growth_factor = 1.1
cutback_factor = 0.75
[../]
num_steps = 12000
[../]
[Outputs]
print_linear_residuals = false
[./out]
type = Exodus
file_base = out_ringdown
elemental_as_nodal = true
interval = 10
[../]
[./outCSV]
type = CSV
file_base = out_ringdown
[../]
[]
(test/tests/magnets/magnetostatic_brick.i)
[Mesh]
[./fmg]
type = FileMeshGenerator
file = exodus_pysq_dx1_AnoI.e
[]
[central_interface]
type = SideSetsBetweenSubdomainsGenerator
input = fmg
master_block = '1'
paired_block = '2'
primary_block = '1'
new_boundary = '70'
[]
[]
[GlobalParams]
mag_x = mag_x
mag_y = mag_y
mag_z = mag_z
potential_H_int = potential_H_int
[]
[Materials]
[./constants] # Constants used in other material properties
type = GenericConstantMaterial
prop_names = ' alpha Ae Ms g0 mu0 nx ny nz long_susc t'
prop_values = '0.01 0.013 1.2 221010.0 1256.64 1 0 0 1.0 0'
[../]
[./a_long]
type = GenericFunctionMaterial
prop_names = 'alpha_long'
prop_values = 'bc_func_1'
[../]
[./permitivitty_1]
type = GenericConstantMaterial
prop_names = 'permittivity' #dummy variable at the moment since we use the "electrostatics" kernel
prop_values = '1.0'
block = '1 2'
[../]
[]
[Functions]
##############################
##
## Define the ramping function
## expression to be used
##
##############################
[./bc_func_1]
type = ParsedFunction
value = 'st' #*tanh(sl*t)+1.0'
vars = 'st' #sl'
vals = '100.0' # 795.775'
[../]
[]
[Variables]
[./mag_x]
order = FIRST
family = LAGRANGE
block = '1'
[./InitialCondition]
type = RandomConstrainedVectorFieldIC
phi = azimuth_phi
theta = polar_theta
M0s = 1.0 #amplitude of the RandomConstrainedVectorFieldIC
component = 0
[../]
[../]
[./mag_y]
order = FIRST
family = LAGRANGE
block = '1'
[./InitialCondition]
type = RandomConstrainedVectorFieldIC
phi = azimuth_phi
theta = polar_theta
M0s = 1.0 #amplitude of the RandomConstrainedVectorFieldIC
component = 1
[../]
[../]
[./mag_z]
order = FIRST
family = LAGRANGE
block = '1'
[./InitialCondition]
type = RandomConstrainedVectorFieldIC
phi = azimuth_phi
theta = polar_theta
M0s = 1.0 #amplitude of the RandomConstrainedVectorFieldIC
component = 2
[../]
[../]
[./potential_H_int]
order = FIRST
family = LAGRANGE
block = '1 2'
[../]
[]
[AuxVariables]
#--------------------------------------------#
# #
# field to seed IC that obeys constraint #
# #
#--------------------------------------------#
[./azimuth_phi]
order = FIRST
family = LAGRANGE
block = '1'
[./InitialCondition]
type = RandomIC
min = 0.001
max = 0.002
seed = 2
[../]
[../]
[./polar_theta]
order = FIRST
family = LAGRANGE
block = '1'
[./InitialCondition]
type = RandomIC
min = 1.5707
max = 1.5708
seed = 37
[../]
[../]
[./mag_s]
order = FIRST
family = LAGRANGE
block = '1'
[../]
[./H_x]
order = CONSTANT
family = MONOMIAL
block = '1 2'
[../]
[./H_y]
order = CONSTANT
family = MONOMIAL
block = '1 2'
[../]
[./H_z]
order = CONSTANT
family = MONOMIAL
block = '1 2'
[../]
[]
[AuxKernels]
[./mag_mag]
type = VectorMag
variable = mag_s
vector_x = mag_x
vector_y = mag_y
vector_z = mag_z
block = '1'
execute_on = 'timestep_end final'
[../]
[./hxo]
type = DemagFieldAux
component = 0
variable = H_x
block = '1 2'
execute_on = 'timestep_end final'
[../]
[./hyo]
type = DemagFieldAux
component = 1
variable = H_y
block = '1 2'
execute_on = 'timestep_end final'
[../]
[./hzo]
type = DemagFieldAux
component = 2
variable = H_z
block = '1 2'
execute_on = 'timestep_end final'
[../]
[]
[Kernels]
#---------------------------------------#
# #
# Time dependence #
# #
#---------------------------------------#
[./mag_x_time]
type = TimeDerivative
variable = mag_x
block = '1'
[../]
[./mag_y_time]
type = TimeDerivative
variable = mag_y
block = '1'
[../]
[./mag_z_time]
type = TimeDerivative
variable = mag_z
block = '1'
[../]
#---------------------------------------#
# #
# Magnetic exchange #
# #
#---------------------------------------#
[./dllg_x_exch]
type = ExchangeCartLL
variable = mag_x
component = 0
[../]
[./dllg_y_exch]
type = ExchangeCartLL
variable = mag_y
component = 1
[../]
[./dllg_z_exch]
type = ExchangeCartLL
variable = mag_z
component = 2
[../]
#---------------------------------------#
# #
# demagnetization field #
# #
#---------------------------------------#
[./d_HM_x]
type = InteractionCartLL
variable = mag_x
component = 0
[../]
[./d_HM_y]
type = InteractionCartLL
variable = mag_y
component = 1
[../]
[./d_HM_z]
type = InteractionCartLL
variable = mag_z
component = 2
[../]
#---------------------------------------#
# #
# Magnetostatic Poisson equation #
# #
#---------------------------------------#
[./int_pot_lap]
type = Electrostatics
variable = potential_H_int
block = '1 2'
[../]
[./int_bc_pot_lap]
type = MagHStrongCart
variable = potential_H_int
block = '1'
mag_x = mag_x
mag_y = mag_y
mag_z = mag_z
[../]
#---------------------------------------#
# #
# LLB constraint terms #
# #
#---------------------------------------#
[./llb_x]
type = LongitudinalLLB
variable = mag_x
component = 0
[../]
[./llb_y]
type = LongitudinalLLB
variable = mag_y
component = 1
[../]
[./llb_z]
type = LongitudinalLLB
variable = mag_z
component = 2
[../]
[]
[BCs]
#---------------------------------------#
# #
# ground the magnetostatic potential #
# at two boundaries #
# #
#---------------------------------------#
[./bc_int_pot_boundary]
type = DirichletBC
variable = potential_H_int
value = 0.0
boundary = '1 2 3 4 5 6'
[../]
[./bc_surface_mag_x]
type = NeumannBC
variable = mag_x
value = 0.0
boundary = '70'
[../]
[./bc_surface_mag_y]
type = NeumannBC
variable = mag_y
value = 0.0
boundary = '70'
[../]
[./bc_surface_mag_z]
type = NeumannBC
variable = mag_z
value = 0.0
boundary = '70'
[../]
[]
[Postprocessors]
[./dt]
type = TimestepSize
[../]
#---------------------------------------#
# #
# Average |M| and along other #
# directions #
# #
#---------------------------------------#
[./<M>]
type = ElementAverageValue
variable = mag_s
block = '1'
execute_on = 'timestep_end final'
[../]
[./<mx>]
type = ElementAverageValue
variable = mag_x
block = '1'
execute_on = 'timestep_end final'
[../]
[./<my>]
type = ElementAverageValue
variable = mag_y
block = '1'
execute_on = 'timestep_end final'
[../]
[./<mz>]
type = ElementAverageValue
variable = mag_z
block = '1'
execute_on = 'timestep_end final'
[../]
#---------------------------------------#
# #
# Calculate exchange energy of #
# the magnetic body #
# #
#---------------------------------------#
[./Fexch]
type = MagneticExchangeEnergy
execute_on = 'timestep_end final'
block = '1'
[../]
#---------------------------------------#
# #
# Calculate demagnetization energy #
# of the magnetic body #
# #
#---------------------------------------#
[./Fdemag]
type = MagnetostaticEnergyCart
execute_on = 'timestep_end final'
block = '1'
[../]
#---------------------------------------#
# #
# Calculate excess energy from missed #
# LLB targets #
# #
#---------------------------------------#
[./Fllb]
type = MagneticExcessLLBEnergy
execute_on = 'timestep_end final'
block = '1'
[../]
#---------------------------------------#
# #
# add all the energy contributions #
# and calculate their percent change #
# #
#---------------------------------------#
[./Ftot]
type = LinearCombinationPostprocessor
pp_names = 'Fexch Fdemag Fllb'
pp_coefs = ' 1.0 1.0 1.0'
execute_on = 'timestep_end final'
[../]
[./perc_change]
type = EnergyRatePostprocessor
postprocessor = Ftot
dt = dt
execute_on = 'timestep_end final'
[../]
[]
[UserObjects]
[./kill]
type = Terminator
expression = 'perc_change <= 1.0e-5'
[../]
[]
[Preconditioning]
#---------------------------------------#
# #
# Solver options #
# #
#---------------------------------------#
[./smp]
type = SMP
full = true
petsc_options = '-snes_ksp_ew -snes_converged_reason'
petsc_options_iname = ' -ksp_gmres_restart -snes_atol -snes_rtol -ksp_rtol -pc_type'
petsc_options_value = ' 121 1e-10 1e-8 1e-6 bjacobi'
[../]
[]
#[Debug]
# show_var_residual_norms = true
#[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
[./TimeIntegrator]
type = ImplicitEuler
[../]
dtmin = 1e-9
dtmax = 1.0e-5
[./TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 18
growth_factor = 1.3
cutback_factor = 0.8
dt = 1.0e-8
[../]
verbose = true
num_steps = 2
[]
[Outputs]
print_linear_residuals = false
[./out]
type = Exodus
file_base = out_magnetostatic_brick
elemental_as_nodal = true
interval = 1
[../]
[./outCSV]
type = CSV
file_base = out_magnetostatic_brick
[../]
[]
(tutorial/BFOspw_P111A111-P111bA111b_m1_H111_alp0a0f7DW.i)
sfreq = 5.0e6
pulseloc = 15.0
[Mesh]
[fileload]
type = FileMeshGenerator
file = out_BFO_P111A111-P111bA111b_m1.e
use_for_exodus_restart = true
[]
[]
[GlobalParams]
mag1_x = mag1_x
mag1_y = mag1_y
mag1_z = mag1_z
mag2_x = mag2_x
mag2_y = mag2_y
mag2_z = mag2_z
antiphase_A_x = antiphase_A_x
antiphase_A_y = antiphase_A_y
antiphase_A_z = antiphase_A_z
polar_x = polar_x
polar_y = polar_y
polar_z = polar_z
H_x = H_x
H_y = H_y
H_z = H_z
[]
[Materials]
[./constants] # Constants used in other material properties
type = GenericConstantMaterial
prop_names = ' De D0 g0mu0Ms g0 K1 K1c Kt permittivity Ae Ms'
prop_values = ' 3.7551 0.003 48291.9 48291.9 -5.0068 -0.0550748 -0.00365997 1.0 0.75 1.0'
[../]
[./a_long]
type = GenericFunctionMaterial
prop_names = 'alpha_long'
prop_values = 'bc_func_1'
[../]
[./alpha]
type = GenericFunctionMaterial
prop_names = 'alpha'
prop_values = '0.0'
[../]
[]
[Functions]
[./bc_func_1]
type = ParsedFunction
value = 'st'
vars = 'st'
vals = '1e5'
[../]
[./pulse1]
type = ParsedFunction
vars = 't0 t1 A'
vals = '0.0 100.0 0.707107'
value = 1.0*A*0.2*exp(-0.16*(x-${pulseloc})*(x-${pulseloc}))*(sin(10.0*(x-${pulseloc}))/(10.0*(x-${pulseloc})))*sin(${sfreq}*(t-1e-6))/(${sfreq}*(t-1e-6))
[../]
[./pulse2]
type = ParsedFunction
vars = 't0 t1 A'
vals = '0.0 100.0 0.707107'
value = 1.0*A*0.2*exp(-0.16*(x-${pulseloc})*(x-${pulseloc}))*(sin(10.0*(x-${pulseloc}))/(10.0*(x-${pulseloc})))*sin(${sfreq}*(t-1e-6))/(${sfreq}*(t-1e-6))
[../]
[./pulse3]
type = ParsedFunction
vars = 't0 t1 A'
vals = '0.0 100.0 0.707107'
value = 1.0*A*0.2*exp(-0.16*(x-${pulseloc})*(x-${pulseloc}))*(sin(10.0*(x-${pulseloc}))/(10.0*(x-${pulseloc})))*sin(${sfreq}*(t-1e-6))/(${sfreq}*(t-1e-6))
[../]
[]
[Variables]
[./mag1_x]
order = FIRST
family = LAGRANGE
initial_from_file_var = mag1_x
initial_from_file_timestep = 'LATEST'
[../]
[./mag1_y]
order = FIRST
family = LAGRANGE
initial_from_file_var = mag1_y
initial_from_file_timestep = 'LATEST'
[../]
[./mag1_z]
order = FIRST
family = LAGRANGE
initial_from_file_var = mag1_z
initial_from_file_timestep = 'LATEST'
[../]
[./mag2_x]
order = FIRST
family = LAGRANGE
initial_from_file_var = mag2_x
initial_from_file_timestep = 'LATEST'
[../]
[./mag2_y]
order = FIRST
family = LAGRANGE
initial_from_file_var = mag2_y
initial_from_file_timestep = 'LATEST'
[../]
[./mag2_z]
order = FIRST
family = LAGRANGE
initial_from_file_var = mag2_z
initial_from_file_timestep = 'LATEST'
[../]
[]
[AuxVariables]
[./mag1_s]
order = FIRST
family = LAGRANGE
[../]
[./mag2_s]
order = FIRST
family = LAGRANGE
[../]
[./Neel_L_x]
order = FIRST
family = LAGRANGE
[../]
[./Neel_L_y]
order = FIRST
family = LAGRANGE
[../]
[./Neel_L_z]
order = FIRST
family = LAGRANGE
[../]
[./SSMag_x]
order = CONSTANT
family = MONOMIAL
[../]
[./SSMag_y]
order = CONSTANT
family = MONOMIAL
[../]
[./SSMag_z]
order = CONSTANT
family = MONOMIAL
[../]
[./antiphase_A_x]
order = FIRST
family = LAGRANGE
initial_from_file_var = antiphase_A_x
initial_from_file_timestep = 'LATEST'
[../]
[./antiphase_A_y]
order = FIRST
family = LAGRANGE
initial_from_file_var = antiphase_A_y
initial_from_file_timestep = 'LATEST'
[../]
[./antiphase_A_z]
order = FIRST
family = LAGRANGE
initial_from_file_var = antiphase_A_z
initial_from_file_timestep = 'LATEST'
[../]
[./polar_x]
order = FIRST
family = LAGRANGE
initial_from_file_var = polar_x
initial_from_file_timestep = 'LATEST'
[../]
[./polar_y]
order = FIRST
family = LAGRANGE
initial_from_file_var = polar_y
initial_from_file_timestep = 'LATEST'
[../]
[./polar_z]
order = FIRST
family = LAGRANGE
initial_from_file_var = polar_z
initial_from_file_timestep = 'LATEST'
[../]
#############################################################
##
## other angles
##
###########################################################
[./ph]
order = FIRST
family = LAGRANGE
[../]
[./th1]
order = FIRST
family = LAGRANGE
[../]
[./th2]
order = FIRST
family = LAGRANGE
[../]
[./H_x]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = pulse1
[../]
[../]
[./H_y]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = pulse2
[../]
[../]
[./H_z]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = pulse3
[../]
[../]
##############################
## ##
## Initial energy density ##
## ##
##############################
[./t0Etot]
order = CONSTANT
family = MONOMIAL
[../]
######################
## ##
## Energy density ##
## ##
######################
[./Edmi]
order = CONSTANT
family = MONOMIAL
[../]
[./Esupexch]
order = CONSTANT
family = MONOMIAL
[../]
[./Enlexch]
order = CONSTANT
family = MONOMIAL
[../]
[./Eepa1]
order = CONSTANT
family = MONOMIAL
[../]
[./Eepa2]
order = CONSTANT
family = MONOMIAL
[../]
[./Eca1]
order = CONSTANT
family = MONOMIAL
[../]
[./Eca2]
order = CONSTANT
family = MONOMIAL
[../]
[./Etot]
order = CONSTANT
family = MONOMIAL
[../]
#############################
## ##
## Excess energy density ##
## ##
#############################
[./excessEtot]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
#---------------------------------------#
# #
# Time dependence #
# #
#---------------------------------------#
[./mag1_x_time]
type = TimeDerivative
variable = mag1_x
[../]
[./mag1_y_time]
type = TimeDerivative
variable = mag1_y
[../]
[./mag1_z_time]
type = TimeDerivative
variable = mag1_z
[../]
[./mag2_x_time]
type = TimeDerivative
variable = mag2_x
[../]
[./mag2_y_time]
type = TimeDerivative
variable = mag2_y
[../]
[./mag2_z_time]
type = TimeDerivative
variable = mag2_z
[../]
#---------------------------------------#
# #
# AFM sublattice exchange #
# #
#---------------------------------------#
[./afmex1_x]
type = AFMSublatticeSuperexchange
variable = mag1_x
mag_sub = 0
component = 0
[../]
[./afmex1_y]
type = AFMSublatticeSuperexchange
variable = mag1_y
mag_sub = 0
component = 1
[../]
[./afmex1_z]
type = AFMSublatticeSuperexchange
variable = mag1_z
mag_sub = 0
component = 2
[../]
[./afmex2_x]
type = AFMSublatticeSuperexchange
variable = mag2_x
mag_sub = 1
component = 0
[../]
[./afmex2_y]
type = AFMSublatticeSuperexchange
variable = mag2_y
mag_sub = 1
component = 1
[../]
[./afmex2_z]
type = AFMSublatticeSuperexchange
variable = mag2_z
mag_sub = 1
component = 2
[../]
#---------------------------------------#
# #
# AFM sublattice DMI #
# #
#---------------------------------------#
[./afmdmi1_x]
type = AFMSublatticeDMInteraction
variable = mag1_x
mag_sub = 0
component = 0
[../]
[./afmdmi1_y]
type = AFMSublatticeDMInteraction
variable = mag1_y
mag_sub = 0
component = 1
[../]
[./afmdmi1_z]
type = AFMSublatticeDMInteraction
variable = mag1_z
mag_sub = 0
component = 2
[../]
[./afmdmi2_x]
type = AFMSublatticeDMInteraction
variable = mag2_x
mag_sub = 1
component = 0
[../]
[./afmdmi2_y]
type = AFMSublatticeDMInteraction
variable = mag2_y
mag_sub = 1
component = 1
[../]
[./afmdmi2_z]
type = AFMSublatticeDMInteraction
variable = mag2_z
mag_sub = 1
component = 2
[../]
#---------------------------------------#
# #
# Magnetocrystalline anisotropy for #
# the AFM sublattice in easy-plane #
# #
#---------------------------------------#
[./afma1_x]
type = AFMEasyPlaneAnisotropy
variable = mag1_x
mag_sub = 0
component = 0
[../]
[./afma1_y]
type = AFMEasyPlaneAnisotropy
variable = mag1_y
mag_sub = 0
component = 1
[../]
[./afma1_z]
type = AFMEasyPlaneAnisotropy
variable = mag1_z
mag_sub = 0
component = 2
[../]
[./afma2_x]
type = AFMEasyPlaneAnisotropy
variable = mag2_x
mag_sub = 1
component = 0
[../]
[./afma2_y]
type = AFMEasyPlaneAnisotropy
variable = mag2_y
mag_sub = 1
component = 1
[../]
[./afma2_z]
type = AFMEasyPlaneAnisotropy
variable = mag2_z
mag_sub = 1
component = 2
[../]
#---------------------------------------#
# #
# Single-ion anisotropy environment #
# for the AFM sublattice in the #
# degenerate easy-plane #
# #
#---------------------------------------#
[./afmsia1_x]
type = AFMSingleIonCubicSixthAnisotropy
variable = mag1_x
mag_sub = 0
component = 0
[../]
[./afmsia1_y]
type = AFMSingleIonCubicSixthAnisotropy
variable = mag1_y
mag_sub = 0
component = 1
[../]
[./afmsia1_z]
type = AFMSingleIonCubicSixthAnisotropy
variable = mag1_z
mag_sub = 0
component = 2
[../]
[./afmsia2_x]
type = AFMSingleIonCubicSixthAnisotropy
variable = mag2_x
mag_sub = 1
component = 0
[../]
[./afmsia2_y]
type = AFMSingleIonCubicSixthAnisotropy
variable = mag2_y
mag_sub = 1
component = 1
[../]
[./afmsia2_z]
type = AFMSingleIonCubicSixthAnisotropy
variable = mag2_z
mag_sub = 1
component = 2
[../]
#---------------------------------------#
# #
# LLB constraint terms #
# #
#---------------------------------------#
[./llb1_x]
type = LongitudinalLLB
variable = mag1_x
mag_x = mag1_x
mag_y = mag1_y
mag_z = mag1_z
component = 0
[../]
[./llb1_y]
type = LongitudinalLLB
variable = mag1_y
mag_x = mag1_x
mag_y = mag1_y
mag_z = mag1_z
component = 1
[../]
[./llb1_z]
type = LongitudinalLLB
variable = mag1_z
mag_x = mag1_x
mag_y = mag1_y
mag_z = mag1_z
component = 2
[../]
[./llb2_x]
type = LongitudinalLLB
variable = mag2_x
mag_x = mag2_x
mag_y = mag2_y
mag_z = mag2_z
component = 0
[../]
[./llb2_y]
type = LongitudinalLLB
variable = mag2_y
mag_x = mag2_x
mag_y = mag2_y
mag_z = mag2_z
component = 1
[../]
[./llb2_z]
type = LongitudinalLLB
variable = mag2_z
mag_x = mag2_x
mag_y = mag2_y
mag_z = mag2_z
component = 2
[../]
#---------------------------------------#
# #
# Local magnetic exchange #
# #
#---------------------------------------#
[./dllg1_x_exch]
type = ExchangeCartLL
variable = mag1_x
component = 0
mag_x = mag1_x
mag_y = mag1_y
mag_z = mag1_z
[../]
[./dllg1_y_exch]
type = ExchangeCartLL
variable = mag1_y
component = 1
mag_x = mag1_x
mag_y = mag1_y
mag_z = mag1_z
[../]
[./dllg1_z_exch]
type = ExchangeCartLL
variable = mag1_z
component = 2
mag_x = mag1_x
mag_y = mag1_y
mag_z = mag1_z
[../]
[./dllg2_x_exch]
type = ExchangeCartLL
variable = mag2_x
component = 0
mag_x = mag2_x
mag_y = mag2_y
mag_z = mag2_z
[../]
[./dllg2_y_exch]
type = ExchangeCartLL
variable = mag2_y
component = 1
mag_x = mag2_x
mag_y = mag2_y
mag_z = mag2_z
[../]
[./dllg2_z_exch]
type = ExchangeCartLL
variable = mag2_z
component = 2
mag_x = mag2_x
mag_y = mag2_y
mag_z = mag2_z
[../]
#---------------------------------------#
# #
# Local AFM magnetic exchange #
# (Local-term) #
#---------------------------------------#
[./dllg1afm_x_exch]
type = AFMLocalSublatticeExchangeCartLL
variable = mag1_x
mag_sub = 0
component = 0
[../]
[./dllg1afm_y_exch]
type = AFMLocalSublatticeExchangeCartLL
variable = mag1_y
mag_sub = 0
component = 1
[../]
[./dllg1afm_z_exch]
type = AFMLocalSublatticeExchangeCartLL
variable = mag1_z
mag_sub = 0
component = 2
[../]
[./dllg2afm_x_exch]
type = AFMLocalSublatticeExchangeCartLL
variable = mag2_x
mag_sub = 1
component = 0
[../]
[./dllg2afm_y_exch]
type = AFMLocalSublatticeExchangeCartLL
variable = mag2_y
mag_sub = 1
component = 1
[../]
[./dllg2afm_z_exch]
type = AFMLocalSublatticeExchangeCartLL
variable = mag2_z
mag_sub = 1
component = 2
[../]
#---------------------------------------#
# #
# Interaction with demag and #
# applied field #
# #
#---------------------------------------#
[./dllg1_x_int]
type = AFMInteractionCartLLHConst
variable = mag1_x
mag_sub = 0
component = 0
[../]
[./dllg1_y_int]
type = AFMInteractionCartLLHConst
variable = mag1_y
mag_sub = 0
component = 1
[../]
[./dllg1_z_int]
type = AFMInteractionCartLLHConst
variable = mag1_z
mag_sub = 0
component = 2
[../]
[./dllg2_x_int]
type = AFMInteractionCartLLHConst
variable = mag2_x
mag_sub = 1
component = 0
[../]
[./dllg2_y_int]
type = AFMInteractionCartLLHConst
variable = mag2_y
mag_sub = 1
component = 1
[../]
[./dllg2_z_int]
type = AFMInteractionCartLLHConst
variable = mag2_z
mag_sub = 1
component = 2
[../]
[]
[AuxKernels]
[./hx]
type = FunctionAux
variable = H_x
function = pulse1
execute_on = 'initial timestep_end final'
[../]
[./hy]
type = FunctionAux
variable = H_y
function = pulse2
execute_on = 'initial timestep_end final'
[../]
[./hz]
type = FunctionAux
variable = H_z
function = pulse3
execute_on = 'initial timestep_end final'
[../]
[./mag1_mag]
type = VectorMag
variable = mag1_s
vector_x = mag1_x
vector_y = mag1_y
vector_z = mag1_z
execute_on = 'initial timestep_end final'
[../]
[./mag2_mag]
type = VectorMag
variable = mag2_s
vector_x = mag2_x
vector_y = mag2_y
vector_z = mag2_z
execute_on = 'initial timestep_end final'
[../]
[./Neel_Lx]
type = VectorDiffOrSum
variable = Neel_L_x
var1 = mag1_x
var2 = mag2_x
diffOrSum = 0
execute_on = 'initial timestep_end final'
[../]
[./Neel_Ly]
type = VectorDiffOrSum
variable = Neel_L_y
var1 = mag1_y
var2 = mag2_y
diffOrSum = 0
execute_on = 'initial timestep_end final'
[../]
[./Neel_Lz]
type = VectorDiffOrSum
variable = Neel_L_z
var1 = mag1_z
var2 = mag2_z
diffOrSum = 0
execute_on = 'initial timestep_end final'
[../]
[./smallSignalMag_x]
type = VectorDiffOrSum
variable = SSMag_x
var1 = mag1_x
var2 = mag2_x
diffOrSum = 1
execute_on = 'initial timestep_end final'
[../]
[./smallSignalMag_y]
type = VectorDiffOrSum
variable = SSMag_y
var1 = mag1_y
var2 = mag2_y
diffOrSum = 1
execute_on = 'initial timestep_end final'
[../]
[./smallSignalMag_z]
type = VectorDiffOrSum
variable = SSMag_z
var1 = mag1_z
var2 = mag2_z
diffOrSum = 1
execute_on = 'initial timestep_end final'
[../]
[./phc]
type = AngleBetweenTwoVectors
variable = ph
var1x = mag1_x
var1y = mag1_y
var1z = mag1_z
var2x = mag2_x
var2y = mag2_y
var2z = mag2_z
execute_on = 'initial timestep_end final'
[../]
[./th1c]
type = AngleBetweenTwoVectors
variable = th1
var1x = mag1_x
var1y = mag1_y
var1z = mag1_z
var2x = polar_x
var2y = polar_y
var2z = polar_z
execute_on = 'initial timestep_end final'
[../]
[./th2c]
type = AngleBetweenTwoVectors
variable = th2
var1x = mag2_x
var1y = mag2_y
var1z = mag2_z
var2x = polar_x
var2y = polar_y
var2z = polar_z
execute_on = 'initial timestep_end final'
[../]
#---------------------------------------#
# #
# Energy density #
# #
#---------------------------------------#
[./cEdmi]
type = AFMSublatticeDMInteractionEnergyDensity
variable = Edmi
execute_on = 'initial timestep_end final'
energy_scale = -6241.51
[../]
[./cEsupexch]
type = AFMSublatticeSuperexchangeEnergyDensity
variable = Esupexch
execute_on = 'initial timestep_end final'
energy_scale = 6241.51
[../]
[./cEnlexch]
type = AFMExchangeStiffnessEnergyDensity
variable = Enlexch
Neel_L_x = Neel_L_x
Neel_L_y = Neel_L_y
Neel_L_z = Neel_L_z
execute_on = 'initial timestep_end final'
energy_scale = 6241.51
[../]
[./cEepa1]
type = AFMEasyPlaneAnisotropyEnergyDensity
variable = Eepa1
execute_on = 'initial timestep_end final'
mag_x = mag1_x
mag_y = mag1_y
mag_z = mag1_z
energy_scale = 6241.51
[../]
[./cEepa2]
type = AFMEasyPlaneAnisotropyEnergyDensity
variable = Eepa2
execute_on = 'initial timestep_end final'
mag_x = mag2_x
mag_y = mag2_y
mag_z = mag2_z
energy_scale = 6241.51
[../]
[./cEca1]
type = AFMSingleIonCubicSixthAnisotropyEnergyDensity
variable = Eca1
execute_on = 'initial timestep_end final'
mag_x = mag1_x
mag_y = mag1_y
mag_z = mag1_z
energy_scale = 6241.51
[../]
[./cEca2]
type = AFMSingleIonCubicSixthAnisotropyEnergyDensity
variable = Eca2
execute_on = 'initial timestep_end final'
mag_x = mag2_x
mag_y = mag2_y
mag_z = mag2_z
energy_scale = 6241.51
[../]
[./cEdtot]
type = AFMTotalEnergyDensity
variable = Etot
execute_on = 'initial timestep_end final'
Edmi = Edmi
Esupexch = Esupexch
Enlexch = Enlexch
Eepa1 = Eepa1
Eepa2 = Eepa2
Eca1 = Eca1
Eca2 = Eca2
[../]
[./ct0Edtot]
type = AFMTotalEnergyDensity
variable = t0Etot
execute_on = 'initial'
Edmi = Edmi
Esupexch = Esupexch
Enlexch = Enlexch
Eepa1 = Eepa1
Eepa2 = Eepa2
Eca1 = Eca1
Eca2 = Eca2
[../]
[./excessEdtot]
type = VectorDiffOrSum
variable = excessEtot
diffOrSum = 0
var1 = Etot
var2 = t0Etot
execute_on = 'initial timestep_end final'
[../]
[]
[BCs]
#---------------------------------------#
# #
# periodic magnetization distribution #
# #
#---------------------------------------#
[./Periodic]
[./xyz]
auto_direction = 'x y z'
variable = 'mag1_x mag1_y mag1_z mag2_x mag2_y mag2_z'
[../]
[../]
[]
[Postprocessors]
[./dt]
type = TimestepSize
[../]
#---------------------------------------#
# #
# Average Mk = |m_k| and along #
# other directions #
# #
#---------------------------------------#
[./M1]
type = ElementAverageValue
variable = mag1_s
execute_on = 'initial timestep_end final'
[../]
[./M2]
type = ElementAverageValue
variable = mag2_s
execute_on = 'initial timestep_end final'
[../]
#---------------------------------------#
# #
# Calculate exchange energy of #
# the magnetic body #
# #
#---------------------------------------#
[./FafmSLexch]
type = AFMSublatticeSuperexchangeEnergy
execute_on = 'initial timestep_end final'
mag1_x = mag1_x
mag1_y = mag1_y
mag1_z = mag1_z
mag2_x = mag2_x
mag2_y = mag2_y
mag2_z = mag2_z
energy_scale = 6241.51
[../]
[./FafmSLdmi]
type = AFMSublatticeDMInteractionEnergy
execute_on = 'initial timestep_end final'
energy_scale = -6241.51
[../]
#----------------------------------------#
# #
# Calculate excess energy from missed #
# LLB targets #
# #
#----------------------------------------#
[./Fllb1]
type = MagneticExcessLLBEnergy
mag_x = mag1_x
mag_y = mag1_y
mag_z = mag1_z
execute_on = 'initial timestep_end final'
[../]
[./Fllb2]
type = MagneticExcessLLBEnergy
mag_x = mag2_x
mag_y = mag2_y
mag_z = mag2_z
execute_on = 'initial timestep_end final'
[../]
#---------------------------------------#
# #
# Calculate the anisotropy energy #
# #
#---------------------------------------#
[./Fa1]
type = AFMEasyPlaneAnisotropyEnergy
execute_on = 'initial timestep_end final'
mag_x = mag1_x
mag_y = mag1_y
mag_z = mag1_z
energy_scale = 6241.51
[../]
[./Fa2]
type = AFMEasyPlaneAnisotropyEnergy
execute_on = 'initial timestep_end final'
mag_x = mag2_x
mag_y = mag2_y
mag_z = mag2_z
energy_scale = 6241.51
[../]
[./Fsia1]
type = AFMSingleIonCubicSixthAnisotropyEnergy
execute_on = 'initial timestep_end final'
mag_x = mag1_x
mag_y = mag1_y
mag_z = mag1_z
energy_scale = 6241.51
[../]
[./Fsia2]
type = AFMSingleIonCubicSixthAnisotropyEnergy
execute_on = 'initial timestep_end final'
mag_x = mag2_x
mag_y = mag2_y
mag_z = mag2_z
energy_scale = 6241.51
[../]
#---------------------------------------#
# #
# add all the energy contributions #
# and calculate their percent change #
# #
#---------------------------------------#
[./Ftot]
type = LinearCombinationPostprocessor
pp_names = 'FafmSLexch FafmSLdmi Fa1 Fa2 Fsia1 Fsia2'
pp_coefs = ' 1.0 1.0 1.0 1.0 1.0 1.0'
execute_on = 'initial timestep_end final'
[../]
[./FtotLLB]
type = LinearCombinationPostprocessor
pp_names = 'Fllb1 Fllb2'
pp_coefs = ' 1.0 1.0'
execute_on = 'initial timestep_end final'
[../]
[./perc_change]
type = EnergyRatePostprocessor
postprocessor = Ftot
dt = dt
execute_on = 'timestep_end final'
[../]
[./elapsed]
type = PerfGraphData
section_name = "Root" # for profiling the problem
data_type = total
[../]
#---------------------------------------#
# #
# PointValue postprocessors of the #
# excess energy #
# #
#---------------------------------------#
[./p1_excessEtot]
type = PointValue
variable = excessEtot
point = '4.95 0.5 0.5'
execute_on = 'initial timestep_end final'
[../]
[./p2_excessEtot]
type = PointValue
variable = excessEtot
point = '11.0 0.5 0.5'
execute_on = 'initial timestep_end final'
[../]
[./DW_excessEtot]
type = PointValue
variable = excessEtot
point = '7.95 0.5 0.5'
execute_on = 'initial timestep_end final'
[../]
[]
[UserObjects]
[]
[Preconditioning]
#---------------------------------------#
# #
# Solver options #
# #
#---------------------------------------#
[./smp]
type = SMP
full = true
petsc_options_iname = ' -ksp_gmres_restart -snes_atol -snes_rtol -ksp_rtol -pc_type '
petsc_options_value = ' 250 1e-7 1e-6 1e-4 bjacobi'
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
[./TimeIntegrator]
type = NewmarkBeta
[../]
dtmin = 1e-18
dtmax = 5.0e-8
[./TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 25 #usually 10
linear_iteration_ratio = 100
dt = 1e-8
growth_factor = 1.1
[../]
num_steps = 541
end_time = 3.5e-5
[]
[Outputs]
print_linear_residuals = false
[./out]
execute_on = 'timestep_end'
type = Exodus
file_base = out_BFOspw_P111A111-P111bA111b_m1_H111_alp0a0f7
elemental_as_nodal = true
interval = 5
[../]
[./outCSV]
type = CSV
execute_on = 'timestep_end'
file_base = out_BFOspw_P111A111-P111bA111b_m1_H111_alp0a0f7
[../]
[]
(test/tests/msca/BFO_P0A0_mRD.i)
Dedef = 3.0
D0def = 0.01
K1def = -0.2
K1cdef = -0.01
Ktdef = -0.0001
alphadef = 0.01
[Mesh]
[fileload]
type = FileMeshGenerator
file = out_BFO_P0A0_iM.e
use_for_exodus_restart = true
[]
[]
[GlobalParams]
mag1_x = mag1_x
mag1_y = mag1_y
mag1_z = mag1_z
mag2_x = mag2_x
mag2_y = mag2_y
mag2_z = mag2_z
antiphase_A_x = antiphase_A_x
antiphase_A_y = antiphase_A_y
antiphase_A_z = antiphase_A_z
polar_x = polar_x
polar_y = polar_y
polar_z = polar_z
[]
[Materials]
############################################################################
##
## material constants used.
##
############################################################################
[./constants]
type = GenericConstantMaterial
prop_names = ' alpha De D0 g0mu0Ms g0 K1 K1c Kt permittivity '
prop_values = '${alphadef} ${Dedef} ${D0def} 1000.0 1000.0 ${K1def} ${K1cdef} ${Ktdef} 1.0 '
[../]
[./a_long]
type = GenericFunctionMaterial
prop_names = 'alpha_long'
prop_values = 'bc_func_1'
[../]
[]
[Functions]
[./bc_func_1]
type = ParsedFunction
value = 'st'
vars = 'st'
vals = '1e3'
[../]
[]
[Variables]
[./mag1_x]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
min = -0.703126
max = -0.703125
[../]
[../]
[./mag1_y]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
min = -0.0079299
max = -0.0079298
[../]
[../]
[./mag1_z]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
min = 0.711033
max = 0.711034
[../]
[../]
[./mag2_x]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
min = 0.711033
max = 0.711034
[../]
[../]
[./mag2_y]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
min = -0.0079299
max = -0.0079298
[../]
[../]
[./mag2_z]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
min = -0.703126
max = -0.703125
[../]
[../]
[]
[AuxVariables]
[./mag1_s]
order = FIRST
family = LAGRANGE
[../]
[./mag2_s]
order = FIRST
family = LAGRANGE
[../]
[./Neel_L_x]
order = FIRST
family = LAGRANGE
[../]
[./Neel_L_y]
order = FIRST
family = LAGRANGE
[../]
[./Neel_L_z]
order = FIRST
family = LAGRANGE
[../]
[./SSMag_x]
order = FIRST
family = LAGRANGE
[../]
[./SSMag_y]
order = FIRST
family = LAGRANGE
[../]
[./SSMag_z]
order = FIRST
family = LAGRANGE
[../]
[./antiphase_A_x]
order = FIRST
family = LAGRANGE
initial_from_file_var = antiphase_A_x
initial_from_file_timestep = 'LATEST'
[../]
[./antiphase_A_y]
order = FIRST
family = LAGRANGE
initial_from_file_var = antiphase_A_y
initial_from_file_timestep = 'LATEST'
[../]
[./antiphase_A_z]
order = FIRST
family = LAGRANGE
initial_from_file_var = antiphase_A_z
initial_from_file_timestep = 'LATEST'
[../]
[./polar_x]
order = FIRST
family = LAGRANGE
initial_from_file_var = polar_x
initial_from_file_timestep = 'LATEST'
[../]
[./polar_y]
order = FIRST
family = LAGRANGE
initial_from_file_var = polar_y
initial_from_file_timestep = 'LATEST'
[../]
[./polar_z]
order = FIRST
family = LAGRANGE
initial_from_file_var = polar_z
initial_from_file_timestep = 'LATEST'
[../]
[./ph]
order = FIRST
family = LAGRANGE
[../]
[./th1]
order = FIRST
family = LAGRANGE
[../]
[./th2]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./mag1_mag]
type = VectorMag
variable = mag1_s
vector_x = mag1_x
vector_y = mag1_y
vector_z = mag1_z
execute_on = 'initial timestep_end final'
[../]
[./mag2_mag]
type = VectorMag
variable = mag2_s
vector_x = mag2_x
vector_y = mag2_y
vector_z = mag2_z
execute_on = 'initial timestep_end final'
[../]
[./Neel_Lx]
type = VectorDiffOrSum
variable = Neel_L_x
var1 = mag1_x
var2 = mag2_x
diffOrSum = 0
execute_on = 'initial timestep_end final'
[../]
[./Neel_Ly]
type = VectorDiffOrSum
variable = Neel_L_y
var1 = mag1_y
var2 = mag2_y
diffOrSum = 0
execute_on = 'initial timestep_end final'
[../]
[./Neel_Lz]
type = VectorDiffOrSum
variable = Neel_L_z
var1 = mag1_z
var2 = mag2_z
diffOrSum = 0
execute_on = 'initial timestep_end final'
[../]
[./smallSignalMag_x]
type = VectorDiffOrSum
variable = SSMag_x
var1 = mag1_x
var2 = mag2_x
diffOrSum = 1
execute_on = 'initial timestep_end final'
[../]
[./smallSignalMag_y]
type = VectorDiffOrSum
variable = SSMag_y
var1 = mag1_y
var2 = mag2_y
diffOrSum = 1
execute_on = 'initial timestep_end final'
[../]
[./smallSignalMag_z]
type = VectorDiffOrSum
variable = SSMag_z
var1 = mag1_z
var2 = mag2_z
diffOrSum = 1
execute_on = 'initial timestep_end final'
[../]
[./phc]
type = AngleBetweenTwoVectors
variable = ph
var1x = mag1_x
var1y = mag1_y
var1z = mag1_z
var2x = mag2_x
var2y = mag2_y
var2z = mag2_z
execute_on = 'initial timestep_end final'
[../]
[./th1c]
type = AngleBetweenTwoVectors
variable = th1
var1x = mag1_x
var1y = mag1_y
var1z = mag1_z
var2x = polar_x
var2y = polar_y
var2z = polar_z
execute_on = 'initial timestep_end final'
[../]
[./th2c]
type = AngleBetweenTwoVectors
variable = th2
var1x = mag2_x
var1y = mag2_y
var1z = mag2_z
var2x = polar_x
var2y = polar_y
var2z = polar_z
execute_on = 'initial timestep_end final'
[../]
[]
[Kernels]
[./mag1_x_time]
type = TimeDerivative
variable = mag1_x
[../]
[./mag1_y_time]
type = TimeDerivative
variable = mag1_y
[../]
[./mag1_z_time]
type = TimeDerivative
variable = mag1_z
[../]
[./mag2_x_time]
type = TimeDerivative
variable = mag2_x
[../]
[./mag2_y_time]
type = TimeDerivative
variable = mag2_y
[../]
[./mag2_z_time]
type = TimeDerivative
variable = mag2_z
[../]
[./afmex1_x]
type = AFMSublatticeSuperexchange
variable = mag1_x
mag_sub = 0
component = 0
[../]
[./afmex1_y]
type = AFMSublatticeSuperexchange
variable = mag1_y
mag_sub = 0
component = 1
[../]
[./afmex1_z]
type = AFMSublatticeSuperexchange
variable = mag1_z
mag_sub = 0
component = 2
[../]
[./afmex2_x]
type = AFMSublatticeSuperexchange
variable = mag2_x
mag_sub = 1
component = 0
[../]
[./afmex2_y]
type = AFMSublatticeSuperexchange
variable = mag2_y
mag_sub = 1
component = 1
[../]
[./afmex2_z]
type = AFMSublatticeSuperexchange
variable = mag2_z
mag_sub = 1
component = 2
[../]
[./afmdmi1_x]
type = AFMSublatticeDMInteraction
variable = mag1_x
mag_sub = 0
component = 0
[../]
[./afmdmi1_y]
type = AFMSublatticeDMInteraction
variable = mag1_y
mag_sub = 0
component = 1
[../]
[./afmdmi1_z]
type = AFMSublatticeDMInteraction
variable = mag1_z
mag_sub = 0
component = 2
[../]
[./afmdmi2_x]
type = AFMSublatticeDMInteraction
variable = mag2_x
mag_sub = 1
component = 0
[../]
[./afmdmi2_y]
type = AFMSublatticeDMInteraction
variable = mag2_y
mag_sub = 1
component = 1
[../]
[./afmdmi2_z]
type = AFMSublatticeDMInteraction
variable = mag2_z
mag_sub = 1
component = 2
[../]
[./afma1_x]
type = AFMEasyPlaneAnisotropy
variable = mag1_x
mag_sub = 0
component = 0
[../]
[./afma1_y]
type = AFMEasyPlaneAnisotropy
variable = mag1_y
mag_sub = 0
component = 1
[../]
[./afma1_z]
type = AFMEasyPlaneAnisotropy
variable = mag1_z
mag_sub = 0
component = 2
[../]
[./afma2_x]
type = AFMEasyPlaneAnisotropy
variable = mag2_x
mag_sub = 1
component = 0
[../]
[./afma2_y]
type = AFMEasyPlaneAnisotropy
variable = mag2_y
mag_sub = 1
component = 1
[../]
[./afma2_z]
type = AFMEasyPlaneAnisotropy
variable = mag2_z
mag_sub = 1
component = 2
[../]
[./afmsia1_x]
type = AFMSingleIonCubicSixthAnisotropy
variable = mag1_x
mag_sub = 0
component = 0
[../]
[./afmsia1_y]
type = AFMSingleIonCubicSixthAnisotropy
variable = mag1_y
mag_sub = 0
component = 1
[../]
[./afmsia1_z]
type = AFMSingleIonCubicSixthAnisotropy
variable = mag1_z
mag_sub = 0
component = 2
[../]
[./afmsia2_x]
type = AFMSingleIonCubicSixthAnisotropy
variable = mag2_x
mag_sub = 1
component = 0
[../]
[./afmsia2_y]
type = AFMSingleIonCubicSixthAnisotropy
variable = mag2_y
mag_sub = 1
component = 1
[../]
[./afmsia2_z]
type = AFMSingleIonCubicSixthAnisotropy
variable = mag2_z
mag_sub = 1
component = 2
[../]
[./llb1_x]
type = LongitudinalLLB
variable = mag1_x
mag_x = mag1_x
mag_y = mag1_y
mag_z = mag1_z
component = 0
[../]
[./llb1_y]
type = LongitudinalLLB
variable = mag1_y
mag_x = mag1_x
mag_y = mag1_y
mag_z = mag1_z
component = 1
[../]
[./llb1_z]
type = LongitudinalLLB
variable = mag1_z
mag_x = mag1_x
mag_y = mag1_y
mag_z = mag1_z
component = 2
[../]
[./llb2_x]
type = LongitudinalLLB
variable = mag2_x
mag_x = mag2_x
mag_y = mag2_y
mag_z = mag2_z
component = 0
[../]
[./llb2_y]
type = LongitudinalLLB
variable = mag2_y
mag_x = mag2_x
mag_y = mag2_y
mag_z = mag2_z
component = 1
[../]
[./llb2_z]
type = LongitudinalLLB
variable = mag2_z
mag_x = mag2_x
mag_y = mag2_y
mag_z = mag2_z
component = 2
[../]
[]
[BCs]
[./Periodic]
[./xyz]
auto_direction = 'x y z'
variable = 'mag1_x mag1_y mag1_z mag2_x mag2_y mag2_z'
[../]
[../]
[]
[Postprocessors]
[./dt]
type = TimestepSize
[../]
[./FafmSLexch]
type = AFMSublatticeSuperexchangeEnergy
execute_on = 'initial timestep_end final'
mag1_x = mag1_x
mag1_y = mag1_y
mag1_z = mag1_z
mag2_x = mag2_x
mag2_y = mag2_y
mag2_z = mag2_z
energy_scale = 1.0
[../]
[./FafmSLdmi]
type = AFMSublatticeDMInteractionEnergy
execute_on = 'initial timestep_end final'
energy_scale = 1.0
[../]
[./Fllb1]
type = MagneticExcessLLBEnergy
mag_x = mag1_x
mag_y = mag1_y
mag_z = mag1_z
execute_on = 'initial timestep_end final'
[../]
[./Fllb2]
type = MagneticExcessLLBEnergy
mag_x = mag2_x
mag_y = mag2_y
mag_z = mag2_z
execute_on = 'initial timestep_end final'
[../]
[./Fa1]
type = AFMEasyPlaneAnisotropyEnergy
execute_on = 'initial timestep_end final'
mag_x = mag1_x
mag_y = mag1_y
mag_z = mag1_z
energy_scale = 1.0
[../]
[./Fa2]
type = AFMEasyPlaneAnisotropyEnergy
execute_on = 'initial timestep_end final'
mag_x = mag2_x
mag_y = mag2_y
mag_z = mag2_z
energy_scale = 1.0
[../]
[./Fsia1]
type = AFMSingleIonCubicSixthAnisotropyEnergy
execute_on = 'initial timestep_end final'
mag_x = mag1_x
mag_y = mag1_y
mag_z = mag1_z
energy_scale = 1.0
[../]
[./Fsia2]
type = AFMSingleIonCubicSixthAnisotropyEnergy
execute_on = 'initial timestep_end final'
mag_x = mag2_x
mag_y = mag2_y
mag_z = mag2_z
energy_scale = 1.0
[../]
[./Ftot]
type = LinearCombinationPostprocessor
pp_names = 'FafmSLexch FafmSLdmi Fa1 Fa2 Fsia1 Fsia2'
pp_coefs = ' 1.0 1.0 1.0 1.0 1.0 1.0'
execute_on = 'initial timestep_end final'
[../]
[./FtotLLB]
type = LinearCombinationPostprocessor
pp_names = 'Fllb1 Fllb2'
pp_coefs = ' 1.0 1.0'
execute_on = 'initial timestep_end final'
[../]
[./perc_change]
type = EnergyRatePostprocessor
postprocessor = Ftot
dt = dt
execute_on = 'timestep_end final'
[../]
[]
[UserObjects]
[./kill]
type = Terminator
expression = 'perc_change <= 1.0e-8'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
petsc_options_iname = ' -ksp_gmres_restart -snes_atol -snes_rtol -ksp_rtol -pc_type '
petsc_options_value = ' 526 1e-8 1e-8 1e-8 bjacobi'
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
[./TimeIntegrator]
type = NewmarkBeta
[../]
dtmin = 1e-18
dtmax = 1.25e-7
[./TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 10 #usually 10
linear_iteration_ratio = 100
dt = 1e-8
[../]
num_steps = 20
[]
[Outputs]
print_linear_residuals = false
[./out]
type = Exodus
file_base = out_BFO_P0A0_mRD
elemental_as_nodal = true
interval = 2
[../]
[]
(tutorial/BFO_mag_wall_rd.i)
##############################
##
## UNITS:
##
## gamma = (2.2101*10^5 / 2 pi) m/C
##
## gamma/(mu*0Ms) = 48291.9 nm*mus/pg
##
## coefficients given in (pg/nm*mus)
## which is equivalent to an energy/vol
##
## Effective fields are 1/(mu0*Ms)*coeff
## which gives units of aC/(nm*mus)
##
## Energies are natively printed in units
## of 0.160218 pg nm^2 / mus^2
## or 1.60218*10^{-22} J
## or 0.001 eV
##
##############################
Dedef = 3.7551
D0def = 0.003
K1def = -5.0068
K1cdef = -0.0550748
Ktdef = -0.00365997
alphadef = 0.8
#freq = 0.2
corr = 0.0005
dwid = 0.5
hamp = 0.35355339059327373
fDW = 7.88
sDW = 23.53
[Mesh]
[fileload]
type = FileMeshGenerator
file = BFO_dwP1A1_100_ref.e
use_for_exodus_restart = true
[]
[]
[GlobalParams]
mag1_x = mag1_x
mag1_y = mag1_y
mag1_z = mag1_z
mag2_x = mag2_x
mag2_y = mag2_y
mag2_z = mag2_z
antiphase_A_x = antiphase_A_x
antiphase_A_y = antiphase_A_y
antiphase_A_z = antiphase_A_z
polar_x = polar_x
polar_y = polar_y
polar_z = polar_z
[]
[Materials]
############################################################################
##==
## material constants used.
##
##
############################################################################
[./constants]
type = GenericConstantMaterial
prop_names = ' alpha De D0 g0mu0Ms g0 K1 K1c Kt permittivity Ae Ms '
prop_values = '${alphadef} ${Dedef} ${D0def} 48291.9 48291.9 ${K1def} ${K1cdef} ${Ktdef} 1.0 0.75 1.0 '
[../]
[./a_long]
type = GenericFunctionMaterial
prop_names = 'alpha_long'
prop_values = 'bc_func_1'
[../]
[]
[Functions]
##############################
##
## Define the ramping function
## expression to be used
##==
##############################
[./bc_func_1]
type = ParsedFunction
value = 'st'
vars = 'st'
vals = '1e8'
[../]
[./stripem1x]
type = ParsedFunction
value = 'if(x < 15.707963267948966,(${hamp}+${corr})*tanh(${dwid}*(x-${fDW}))+${hamp},-(${hamp}+${corr})*tanh(${dwid}*(x-${sDW}))+${hamp})'
[../]
[./stripem1y]
type = ParsedFunction
value = 'if(x < 15.707963267948966,-(2*${hamp}+${corr})*tanh(${dwid}*(x-${fDW})),(2*${hamp}+${corr})*tanh(${dwid}*(x-${sDW})))'
[../]
[./stripem1z]
type = ParsedFunction
value = 'if(x < 15.707963267948966,-(${hamp}+${corr})*tanh(${dwid}*(x-${fDW}))+${hamp},(${hamp}+${corr})*tanh(${dwid}*(x-${sDW}))+${hamp})'
[../]
[./stripem2x]
type = ParsedFunction
value = 'if(x < 15.707963267948966,-(${hamp}-${corr})*tanh(${dwid}*(x-${fDW}))-${hamp},(${hamp}-${corr})*tanh(${dwid}*(x-${sDW}))-${hamp})'
[../]
[./stripem2y]
type = ParsedFunction
value = 'if(x < 15.707963267948966,(2*${hamp}-${corr})*tanh(${dwid}*(x-${fDW})),-(2*${hamp}-${corr})*tanh(${dwid}*(x-${sDW})))'
[../]
[./stripem2z]
type = ParsedFunction
value = 'if(x < 15.707963267948966,(${hamp}-${corr})*tanh(${dwid}*(x-${fDW}))-${hamp},-(${hamp}-${corr})*tanh(${dwid}*(x-${sDW}))-${hamp})'
[../]
[]
#==
[Variables]
[./mag1_x]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = stripem1x
[../]
[../]
[./mag1_y]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = stripem1y
[../]
[../]
[./mag1_z]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = stripem1z
[../]
[../]
[./mag2_x]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = stripem2x
[../]
[../]
[./mag2_y]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = stripem2y
[../]
[../]
[./mag2_z]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = stripem2z
[../]
[../]
[]
[AuxVariables]
[./mag1_s]
order = FIRST
family = LAGRANGE
[../]
[./mag2_s]
order = FIRST
family = LAGRANGE
[../]
[./Neel_L_x]
order = FIRST
family = LAGRANGE
[../]
[./Neel_L_y]
order = FIRST
family = LAGRANGE
[../]
[./Neel_L_z]
order = FIRST
family = LAGRANGE
[../]
[./SSMag_x]
order = FIRST
family = LAGRANGE
[../]
[./SSMag_y]
order = FIRST
family = LAGRANGE
[../]
[./SSMag_z]
order = FIRST
family = LAGRANGE
[../]
[./antiphase_A_x]
order = FIRST
family = LAGRANGE
initial_from_file_var = antiphase_A_x
initial_from_file_timestep = 'LATEST'
[../]
[./antiphase_A_y]
order = FIRST
family = LAGRANGE
initial_from_file_var = antiphase_A_y
initial_from_file_timestep = 'LATEST'
[../]
[./antiphase_A_z]
order = FIRST
family = LAGRANGE
initial_from_file_var = antiphase_A_z
initial_from_file_timestep = 'LATEST'
[../]
[./polar_x]
order = FIRST
family = LAGRANGE
initial_from_file_var = polar_x
initial_from_file_timestep = 'LATEST'
[../]
[./polar_y]
order = FIRST
family = LAGRANGE
initial_from_file_var = polar_y
initial_from_file_timestep = 'LATEST'
[../]
[./polar_z]
order = FIRST
family = LAGRANGE
initial_from_file_var = polar_z
initial_from_file_timestep = 'LATEST'
[../]
[./dSSMag_dt_x]
order = CONSTANT
family = MONOMIAL
[../]
[./dSSMag_dt_y]
order = CONSTANT
family = MONOMIAL
[../]
[./dSSMag_dt_z]
order = CONSTANT
family = MONOMIAL
[../]
[./dL_dt_x]
order = CONSTANT
family = MONOMIAL
[../]
[./dL_dt_y]
order = CONSTANT
family = MONOMIAL
[../]
[./dL_dt_z]
order = CONSTANT
family = MONOMIAL
[../]
#############################################################
##
## other angles
##
###########################################################
[./ph]
order = FIRST
family = LAGRANGE
[../]
[./th1]
order = FIRST
family = LAGRANGE
[../]
[./th2]
order = FIRST
family = LAGRANGE
[../]
######################
## ##
## Energy density ##
## ##
######################
[./Edmi]
order = CONSTANT
family = MONOMIAL
[../]
[./Esupexch]
order = CONSTANT
family = MONOMIAL
[../]
[./Enlexch]
order = CONSTANT
family = MONOMIAL
[../]
[./Eepa1]
order = CONSTANT
family = MONOMIAL
[../]
[./Eepa2]
order = CONSTANT
family = MONOMIAL
[../]
[./Eca1]
order = CONSTANT
family = MONOMIAL
[../]
[./Eca2]
order = CONSTANT
family = MONOMIAL
[../]
[./Etot]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
#---------------------------------------#
# #
# Time dependence #
# #
#---------------------------------------#
[./mag1_x_time]
type = TimeDerivative
variable = mag1_x
[../]
[./mag1_y_time]
type = TimeDerivative
variable = mag1_y
[../]
[./mag1_z_time]
type = TimeDerivative
variable = mag1_z
[../]
[./mag2_x_time]
type = TimeDerivative
variable = mag2_x
[../]
[./mag2_y_time]
type = TimeDerivative
variable = mag2_y
[../]
[./mag2_z_time]
type = TimeDerivative
variable = mag2_z
[../]
#---------------------------------------#
# #
# AFM sublattice exchange #
# #
#---------------------------------------#
[./afmex1_x]
type = AFMSublatticeSuperexchange
variable = mag1_x
mag_sub = 0
component = 0
[../]
[./afmex1_y]
type = AFMSublatticeSuperexchange
variable = mag1_y
mag_sub = 0
component = 1
[../]
[./afmex1_z]
type = AFMSublatticeSuperexchange
variable = mag1_z
mag_sub = 0
component = 2
[../]
[./afmex2_x]
type = AFMSublatticeSuperexchange
variable = mag2_x
mag_sub = 1
component = 0
[../]
[./afmex2_y]
type = AFMSublatticeSuperexchange
variable = mag2_y
mag_sub = 1
component = 1
[../]
[./afmex2_z]
type = AFMSublatticeSuperexchange
variable = mag2_z
mag_sub = 1
component = 2
[../]
#---------------------------------------#
# #
# AFM sublattice DMI #
# #
#---------------------------------------#
[./afmdmi1_x]
type = AFMSublatticeDMInteraction
variable = mag1_x
mag_sub = 0
component = 0
[../]
[./afmdmi1_y]
type = AFMSublatticeDMInteraction
variable = mag1_y
mag_sub = 0
component = 1
[../]
[./afmdmi1_z]
type = AFMSublatticeDMInteraction
variable = mag1_z
mag_sub = 0
component = 2
[../]
[./afmdmi2_x]
type = AFMSublatticeDMInteraction
variable = mag2_x
mag_sub = 1
component = 0
[../]
[./afmdmi2_y]
type = AFMSublatticeDMInteraction
variable = mag2_y
mag_sub = 1
component = 1
[../]
[./afmdmi2_z]
type = AFMSublatticeDMInteraction
variable = mag2_z
mag_sub = 1
component = 2
[../]
#---------------------------------------#
# #
# Magnetocrystalline anisotropy for #
# the AFM sublattice in easy-plane #
# #
#---------------------------------------#
[./afma1_x]
type = AFMEasyPlaneAnisotropy
variable = mag1_x
mag_sub = 0
component = 0
[../]
[./afma1_y]
type = AFMEasyPlaneAnisotropy
variable = mag1_y
mag_sub = 0
component = 1
[../]
[./afma1_z]
type = AFMEasyPlaneAnisotropy
variable = mag1_z
mag_sub = 0
component = 2
[../]
[./afma2_x]
type = AFMEasyPlaneAnisotropy
variable = mag2_x
mag_sub = 1
component = 0
[../]
[./afma2_y]
type = AFMEasyPlaneAnisotropy
variable = mag2_y
mag_sub = 1
component = 1
[../]
[./afma2_z]
type = AFMEasyPlaneAnisotropy
variable = mag2_z
mag_sub = 1
component = 2
[../]
#---------------------------------------#
# #
# Single-ion anisotropy environment #
# for the AFM sublattice in the #
# degenerate easy-plane #
# #
#---------------------------------------#
[./afmsia1_x]
type = AFMSingleIonCubicSixthAnisotropy
variable = mag1_x
mag_sub = 0
component = 0
[../]
[./afmsia1_y]
type = AFMSingleIonCubicSixthAnisotropy
variable = mag1_y
mag_sub = 0
component = 1
[../]
[./afmsia1_z]
type = AFMSingleIonCubicSixthAnisotropy
variable = mag1_z
mag_sub = 0
component = 2
[../]
[./afmsia2_x]
type = AFMSingleIonCubicSixthAnisotropy
variable = mag2_x
mag_sub = 1
component = 0
[../]
[./afmsia2_y]
type = AFMSingleIonCubicSixthAnisotropy
variable = mag2_y
mag_sub = 1
component = 1
[../]
[./afmsia2_z]
type = AFMSingleIonCubicSixthAnisotropy
variable = mag2_z
mag_sub = 1
component = 2
[../]
#---------------------------------------#
# #
# LLB constraint terms #
# #
#---------------------------------------#
[./llb1_x]
type = LongitudinalLLB
variable = mag1_x
mag_x = mag1_x
mag_y = mag1_y
mag_z = mag1_z
component = 0
[../]
[./llb1_y]
type = LongitudinalLLB
variable = mag1_y
mag_x = mag1_x
mag_y = mag1_y
mag_z = mag1_z
component = 1
[../]
[./llb1_z]
type = LongitudinalLLB
variable = mag1_z
mag_x = mag1_x
mag_y = mag1_y
mag_z = mag1_z
component = 2
[../]
[./llb2_x]
type = LongitudinalLLB
variable = mag2_x
mag_x = mag2_x
mag_y = mag2_y
mag_z = mag2_z
component = 0
[../]
[./llb2_y]
type = LongitudinalLLB
variable = mag2_y
mag_x = mag2_x
mag_y = mag2_y
mag_z = mag2_z
component = 1
[../]
[./llb2_z]
type = LongitudinalLLB
variable = mag2_z
mag_x = mag2_x
mag_y = mag2_y
mag_z = mag2_z
component = 2
[../]
#---------------------------------------#
# #
# Local magnetic exchange #
# #
#---------------------------------------#
[./dllg1_x_exch]
type = ExchangeCartLL
variable = mag1_x
component = 0
mag_x = mag1_x
mag_y = mag1_y
mag_z = mag1_z
[../]
[./dllg1_y_exch]
type = ExchangeCartLL
variable = mag1_y
component = 1
mag_x = mag1_x
mag_y = mag1_y
mag_z = mag1_z
[../]
[./dllg1_z_exch]
type = ExchangeCartLL
variable = mag1_z
component = 2
mag_x = mag1_x
mag_y = mag1_y
mag_z = mag1_z
[../]
[./dllg2_x_exch]
type = ExchangeCartLL
variable = mag2_x
component = 0
mag_x = mag2_x
mag_y = mag2_y
mag_z = mag2_z
[../]
[./dllg2_y_exch]
type = ExchangeCartLL
variable = mag2_y
component = 1
mag_x = mag2_x
mag_y = mag2_y
mag_z = mag2_z
[../]
[./dllg2_z_exch]
type = ExchangeCartLL
variable = mag2_z
component = 2
mag_x = mag2_x
mag_y = mag2_y
mag_z = mag2_z
[../]
#---------------------------------------#
# #=
# Local AFM magnetic exchange #
# (Local-term) #
#---------------------------------------#
[./dllg1afm_x_exch]
type = AFMLocalSublatticeExchangeCartLL
variable = mag1_x
mag_sub = 0
component = 0
[../]
[./dllg1afm_y_exch]
type = AFMLocalSublatticeExchangeCartLL
variable = mag1_y
mag_sub = 0
component = 1
[../]
[./dllg1afm_z_exch]
type = AFMLocalSublatticeExchangeCartLL
variable = mag1_z
mag_sub = 0
component = 2
[../]
[./dllg2afm_x_exch]
type = AFMLocalSublatticeExchangeCartLL
variable = mag2_x
mag_sub = 1
component = 0
[../]
[./dllg2afm_y_exch]
type = AFMLocalSublatticeExchangeCartLL
variable = mag2_y
mag_sub = 1
component = 1
[../]
[./dllg2afm_z_exch]
type = AFMLocalSublatticeExchangeCartLL
variable = mag2_z
mag_sub = 1
component = 2
[../]
[]
[AuxKernels]
[./mag1_mag]
type = VectorMag
variable = mag1_s
vector_x = mag1_x
vector_y = mag1_y
vector_z = mag1_z
execute_on = 'initial timestep_end final'
[../]
[./mag2_mag]
type = VectorMag
variable = mag2_s
vector_x = mag2_x
vector_y = mag2_y
vector_z = mag2_z
execute_on = 'initial timestep_end final'
[../]
[./Neel_Lx]
type = VectorDiffOrSum
variable = Neel_L_x
var1 = mag1_x
var2 = mag2_x
diffOrSum = 0
execute_on = 'initial timestep_end final'
[../]
[./Neel_Ly]
type = VectorDiffOrSum
variable = Neel_L_y
var1 = mag1_y
var2 = mag2_y
diffOrSum = 0
execute_on = 'initial timestep_end final'
[../]
[./Neel_Lz]
type = VectorDiffOrSum
variable = Neel_L_z
var1 = mag1_z
var2 = mag2_z
diffOrSum = 0
execute_on = 'initial timestep_end final'
[../]
[./smallSignalMag_x]
type = VectorDiffOrSum
variable = SSMag_x
var1 = mag1_x
var2 = mag2_x
diffOrSum = 1
execute_on = 'initial timestep_end final'
[../]
[./smallSignalMag_y]
type = VectorDiffOrSum
variable = SSMag_y
var1 = mag1_y
var2 = mag2_y
diffOrSum = 1
execute_on = 'initial timestep_end final'
[../]
[./smallSignalMag_z]
type = VectorDiffOrSum
variable = SSMag_z
var1 = mag1_z
var2 = mag2_z
diffOrSum = 1
execute_on = 'initial timestep_end final'
[../]
[./phc]
type = AngleBetweenTwoVectors
variable = ph
var1x = mag1_x
var1y = mag1_y
var1z = mag1_z
var2x = mag2_x
var2y = mag2_y
var2z = mag2_z
execute_on = 'initial timestep_end final'
[../]
[./th1c]
type = AngleBetweenTwoVectors
variable = th1
var1x = mag1_x
var1y = mag1_y
var1z = mag1_z
var2x = polar_x
var2y = polar_y
var2z = polar_z
execute_on = 'initial timestep_end final'
[../]
[./th2c]
type = AngleBetweenTwoVectors
variable = th2
var1x = mag2_x
var1y = mag2_y
var1z = mag2_z
var2x = polar_x
var2y = polar_y
var2z = polar_z
execute_on = 'initial timestep_end final'
[../]
#---------------------------------------#
# #
# Energy density #
# #
#---------------------------------------#
[./cEdmi]
type = AFMSublatticeDMInteractionEnergyDensity
variable = Edmi
execute_on = 'initial timestep_end final'
energy_scale = -6241.51
[../]
[./cEsupexch]
type = AFMSublatticeSuperexchangeEnergyDensity
variable = Esupexch
execute_on = 'initial timestep_end final'
energy_scale = 6241.51
[../]
[./cEnlexch]
type = AFMExchangeStiffnessEnergyDensity
variable = Enlexch
Neel_L_x = Neel_L_x
Neel_L_y = Neel_L_y
Neel_L_z = Neel_L_z
execute_on = 'initial timestep_end final'
energy_scale = 6241.51
[../]
[./cEepa1]
type = AFMEasyPlaneAnisotropyEnergyDensity
variable = Eepa1
execute_on = 'initial timestep_end final'
mag_x = mag1_x
mag_y = mag1_y
mag_z = mag1_z
energy_scale = 6241.51
[../]
[./cEepa2]
type = AFMEasyPlaneAnisotropyEnergyDensity
variable = Eepa2
execute_on = 'initial timestep_end final'
mag_x = mag2_x
mag_y = mag2_y
mag_z = mag2_z
energy_scale = 6241.51
[../]
[./cEca1]
type = AFMSingleIonCubicSixthAnisotropyEnergyDensity
variable = Eca1
execute_on = 'initial timestep_end final'
mag_x = mag1_x
mag_y = mag1_y
mag_z = mag1_z
energy_scale = 6241.51
[../]
[./cEca2]
type = AFMSingleIonCubicSixthAnisotropyEnergyDensity
variable = Eca2
execute_on = 'initial timestep_end final'
mag_x = mag2_x
mag_y = mag2_y
mag_z = mag2_z
energy_scale = 6241.51
[../]
[./cEdtot]
type = AFMTotalEnergyDensity
variable = Etot
execute_on = 'initial timestep_end final'
Edmi = Edmi
Esupexch = Esupexch
Enlexch = Enlexch
Eepa1 = Eepa1
Eepa2 = Eepa2
Eca1 = Eca1
Eca2 = Eca2
[../]
[]
[BCs]
#---------------------------------------#
# #
# periodic magnetization distribution #
# #
#---------------------------------------#
[./Periodic]
[./x]
auto_direction = 'x'
variable = 'mag1_x mag1_y mag1_z mag2_x mag2_y mag2_z'
[../]
[../]
[]
[Postprocessors]
[./dt]
type = TimestepSize
[../]
#---------------------------------------#
# #
# Average Mk = |m_k| and along #
# other directions #
# #
#---------------------------------------#
[./M1]
type = ElementAverageValue
variable = mag1_s
execute_on = 'initial timestep_end final'
[../]
[./M2]
type = ElementAverageValue
variable = mag2_s
execute_on = 'initial timestep_end final'
[../]
[./<Lx>]
type = ElementAverageValue
variable = Neel_L_x
execute_on = 'initial timestep_end final'
[../]
[./<Ly>]
type = ElementAverageValue
variable = Neel_L_y
execute_on = 'initial timestep_end final'
[../]
[./<Lz>]
type = ElementAverageValue
variable = Neel_L_z
execute_on = 'initial timestep_end final'
[../]
[./<m1x>]
type = ElementAverageValue
variable = mag1_x
execute_on = 'initial timestep_end final'
[../]
[./<m1y>]
type = ElementAverageValue
variable = mag1_y
execute_on = 'initial timestep_end final'
[../]
[./<m1z>]
type = ElementAverageValue
variable = mag1_z
execute_on = 'initial timestep_end final'
[../]
[./<m2x>]
type = ElementAverageValue
variable = mag2_x
execute_on = 'initial timestep_end final'
[../]
[./<m2y>]
type = ElementAverageValue
variable = mag2_y
execute_on = 'initial timestep_end final'
[../]
[./<m2z>]
type = ElementAverageValue
variable = mag2_z
execute_on = 'initial timestep_end final'
[../]
[./<ph>]
type = ElementAverageValue
variable = ph
execute_on = 'initial timestep_end final'
[../]
[./<th1>]
type = ElementAverageValue
variable = th1
execute_on = 'initial timestep_end final'
[../]
[./<th2>]
type = ElementAverageValue
variable = th2
execute_on = 'initial timestep_end final'
[../]
#---------------------------------------#
# #
# Calculate exchange energy of #
# the magnetic body #
# #
#---------------------------------------#
[./FafmSLexch]
type = AFMSublatticeSuperexchangeEnergy
execute_on = 'initial timestep_end final'
mag1_x = mag1_x
mag1_y = mag1_y
mag1_z = mag1_z
mag2_x = mag2_x
mag2_y = mag2_y
mag2_z = mag2_z
energy_scale = 0.001
[../]
[./FafmSLdmi]
type = AFMSublatticeDMInteractionEnergy
execute_on = 'initial timestep_end final'
energy_scale = 0.001
[../]
[./FexchS]
type = AFMExchangeStiffnessEnergy
execute_on = 'initial timestep_end final'
energy_scale = 0.001
Neel_L_x = Neel_L_x
Neel_L_y = Neel_L_y
Neel_L_z = Neel_L_z
[../]
#---------------------------------------#
# #
# Calculate excess energy from missed #
# LLB targets #
# #
#---------------------------------------#
[./Fllb1]
type = MagneticExcessLLBEnergy
mag_x = mag1_x
mag_y = mag1_y
mag_z = mag1_z
execute_on = 'initial timestep_end final'
[../]
[./Fllb2]
type = MagneticExcessLLBEnergy
mag_x = mag2_x
mag_y = mag2_y
mag_z = mag2_z
execute_on = 'initial timestep_end final'
[../]
#---------------------------------------#
# #
# Calculate the anisotropy energy #
# #
#---------------------------------------#
[./Fa1]
type = AFMEasyPlaneAnisotropyEnergy
execute_on = 'initial timestep_end final'
mag_x = mag1_x
mag_y = mag1_y
mag_z = mag1_z
energy_scale = 0.001
[../]
[./Fa2]
type = AFMEasyPlaneAnisotropyEnergy
execute_on = 'initial timestep_end final'
mag_x = mag2_x
mag_y = mag2_y
mag_z = mag2_z
energy_scale = 0.001
[../]
[./Fsia1]
type = AFMSingleIonCubicSixthAnisotropyEnergy
execute_on = 'initial timestep_end final'
mag_x = mag1_x
mag_y = mag1_y
mag_z = mag1_z
energy_scale = 0.001
[../]
[./Fsia2]
type = AFMSingleIonCubicSixthAnisotropyEnergy
execute_on = 'initial timestep_end final'
mag_x = mag2_x
mag_y = mag2_y
mag_z = mag2_z
energy_scale = 0.001
[../]
#---------------------------------------#
# #
# add all the energy contributions #
# and calculate their percent change #
# #
#---------------------------------------#
[./Ftot]
type = LinearCombinationPostprocessor
pp_names = 'FafmSLexch FafmSLdmi Fa1 Fa2 Fsia1 Fsia2 FexchS'
pp_coefs = ' 1.0 1.0 1.0 1.0 1.0 1.0 1.0'
execute_on = 'initial timestep_end final'
[../]
[./FtotLLB]
type = LinearCombinationPostprocessor
pp_names = 'Fllb1 Fllb2'
pp_coefs = ' 1.0 1.0'
execute_on = 'initial timestep_end final'
[../]
[./perc_change]
type = EnergyRatePostprocessor
postprocessor = Ftot
dt = dt
execute_on = 'timestep_end final'
[../]
[./elapsed]
type = PerfGraphData
section_name = "Root" # for profiling the problem
data_type = total
[../]
[]
[UserObjects]
[./kill]
type = Terminator
expression = 'perc_change <= 1.0e-8'
[../]
[]
[Preconditioning]
#---------------------------------------#
# #
# Solver options #
# #
#---------------------------------------#
[./smp]
type = SMP
full = true
petsc_options_iname = ' -ksp_gmres_restart -snes_atol -snes_rtol -ksp_rtol -pc_type '
petsc_options_value = ' 250 1e-8 1e-8 1e-5 bjacobi'
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
[./TimeIntegrator]
type = NewmarkBeta
[../]
dtmin = 1e-18
dtmax = 1e-7
[./TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 25 #usually 10
linear_iteration_ratio = 100
dt = 1e-9
growth_factor = 1.1
[../]
num_steps = 18001
[]
[Outputs]
print_linear_residuals = false
[./out]
type = Exodus
file_base = out_BFO_P111bA111b-P111bA111b_m1
elemental_as_nodal = true
interval = 20
[../]
[./outCSV]
type = CSV
file_base = out_BFO_P111bA111b-P111bA111b_m1
[../]
[]
(test/tests/magnets/Sstate_gen-Py_OOMF.i)
##############################
##
## UNITS:
##
## gamma = (2.2101*10^5 / 2 pi) m/C
##
## gamma/(mu*0Ms) = 48291.9 nm*mus/pg
##
## coefficients given in (pg/nm*mus)
## which is equivalent to an energy/vol
##
## Effective fields are 1/(mu0*Ms)*coeff
## which gives units of aC/(nm*mus)
##
## Energies are natively printed in units
## of 0.160218 pg nm^2 / mus^2
## or 1.60218*10^{-22} J
## or 0.001 eV
##
##############################
Nx = 100
Ny = 25
Nz = 3
#
xMin = 0.0
yMin = 0.0
zMin = 1.5
xMax = 500.0
yMax = 125.0
zMax = 3.0
alphadef = 1.0
#
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = ${Nx}
ny = ${Ny}
nz = ${Nz}
xmin = ${xMin}
xmax = ${xMax}
ymin = ${yMin}
ymax = ${yMax}
zmin = ${zMin}
zmax = ${zMax}
elem_type = HEX8
[]
[]
#
[UserObjects]
[./kill]
type = Terminator
expression = 'perc_change <= 1.0e-8'
[../]
[./reader_nearest]
type = PropertyReadFile
prop_file_name = 'fulldata_state.csv'
read_type = 'voronoi'
nprop = 6 # number of columns in CSV
nblock = 1
nvoronoi = 7500
#use_random_voronoi = true
[../]
[]
#
[GlobalParams]
mag_x = mag_x
mag_y = mag_y
mag_z = mag_z
potential_H_int = potential_H_int
mu0 = 1.0
Hscale = 1.0
g0 = 17680.8
[]
[Materials]
############################################################################
##
## material constants used.
##
##
############################################################################
[./constants]
type = GenericConstantMaterial
prop_names = ' alpha g0mu0Ms permittivity Ae Ms '
prop_values = '${alphadef} 34989.1 1.0 13.0 1.0 '
[../]
#NOTE: g0 is g*mu0*Ms/2 as defined by Hertel
#alpha is chosen to be 1.0 as in the muMag paper
[./a_long]
type = GenericFunctionMaterial
prop_names = 'alpha_long'
prop_values = 'bc_func_1'
[../]
[]
[Functions]
##############################
##
## Define the ramping function
## expression to be used
##
##############################
[./bc_func_1]
type = ParsedFunction
value = 'st'
vars = 'st'
vals = '1e1' #3?
[../]
[./node_mx]
type = PiecewiseConstantFromCSV
read_prop_user_object = 'reader_nearest'
read_type = 'voronoi'
column_number = '3'
[../]
[./node_my]
type = PiecewiseConstantFromCSV
read_prop_user_object = 'reader_nearest'
read_type = 'voronoi'
column_number = '4'
[../]
[./node_mz]
type = PiecewiseConstantFromCSV
read_prop_user_object = 'reader_nearest'
read_type = 'voronoi'
column_number = '5'
[../]
[]
#
[Variables]
[./mag_x]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = node_mx
[../]
[../]
[./mag_y]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = node_my
[../]
[../]
[./mag_z]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = node_mz
[../]
[../]
[./potential_H_int]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
#--------------------------------------------#
# #
# field to seed IC that obeys constraint #
# #
#--------------------------------------------#
[./azimuth_phi]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
min = 0.234979
max = 0.244979
seed = 2
[../]
[../]
[./polar_theta]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
min = 1.46742
max = 1.47742
seed = 37
[../]
[../]
[./mag_s]
order = FIRST
family = LAGRANGE
[../]
[./H_x]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 1.0
[../]
[../]
[./H_y]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 1.0
[../]
[../]
[./H_z]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 1.0
[../]
[../]
[]
[AuxKernels]
[./mag_mag]
type = VectorMag
variable = mag_s
vector_x = mag_x
vector_y = mag_y
vector_z = mag_z
execute_on = 'initial timestep_end final'
[../]
[]
[Kernels]
#---------------------------------------#
# #
# Time dependence #
# #
#---------------------------------------#
[./mag_x_time]
type = TimeDerivative
variable = mag_x
[../]
[./mag_y_time]
type = TimeDerivative
variable = mag_y
[../]
[./mag_z_time]
type = TimeDerivative
variable = mag_z
[../]
#---------------------------------------#
# #
# Local magnetic exchange #
# #
#---------------------------------------#
[./dllg_x_exch]
type = MasterExchangeCartLLG
variable = mag_x
component = 0
[../]
[./dllg_y_exch]
type = MasterExchangeCartLLG
variable = mag_y
component = 1
[../]
[./dllg_z_exch]
type = MasterExchangeCartLLG
variable = mag_z
component = 2
[../]
#---------------------------------------#
# #
# demagnetization field #
# #
#---------------------------------------#
[./d_HM_x]
type = MasterInteractionCartLLG
variable = mag_x
component = 0
[../]
[./d_HM_y]
type = MasterInteractionCartLLG
variable = mag_y
component = 1
[../]
[./d_HM_z]
type = MasterInteractionCartLLG
variable = mag_z
component = 2
[../]
#---------------------------------------#
# #
# LLB constraint terms #
# #
#---------------------------------------#
[./llb1_x]
type = LongitudinalLLB
variable = mag_x
component = 0
[../]
[./llb1_y]
type = LongitudinalLLB
variable = mag_y
component = 1
[../]
[./llb1_z]
type = LongitudinalLLB
variable = mag_z
component = 2
[../]
#---------------------------------------#
# #
# Magnetostatic Poisson equation #
# #
#---------------------------------------#
[./int_pot_lap]
type = Electrostatics
variable = potential_H_int
[../]
[./int_bc_pot_lap]
type = MagHStrongCart
variable = potential_H_int
[../]
[]
[BCs]
[]
[Postprocessors]
[./dt]
type = TimestepSize
[../]
#---------------------------------------#
# #
# Average M = |m| #
# #
#---------------------------------------#
[./M1]
type = ElementAverageValue
variable = mag_s
execute_on = 'initial timestep_end final'
[../]
[./<mx>]
type = ElementAverageValue
variable = mag_x
execute_on = 'initial timestep_end final'
[../]
[./<my>]
type = ElementAverageValue
variable = mag_y
execute_on = 'initial timestep_end final'
[../]
[./<mz>]
type = ElementAverageValue
variable = mag_z
execute_on = 'initial timestep_end final'
[../]
#---------------------------------------#
# #
# Calculate exchange energy of #
# the magnetic body #
# #
#---------------------------------------#
[./Fexch]
type = MasterMagneticExchangeEnergy
energy_scale = 0.001 #converts results to eV
execute_on = 'initial timestep_end final'
[../]
#---------------------------------------#
# #
# Calculate demagnetization energy #
# of the magnetic body #
# #
#---------------------------------------#
[./Fdemag]
type = MagnetostaticEnergyCart
energy_scale = 0.001 #converts results to eV
execute_on = 'initial timestep_end final'
[../]
#---------------------------------------#
# #
# Calculate excess energy from missed #
# LLB targets #
# #
#---------------------------------------#
[./Fllb1]
type = MagneticExcessLLBEnergy
mag_x = mag_x
mag_y = mag_y
mag_z = mag_z
execute_on = 'initial timestep_end final'
[../]
#---------------------------------------#
# #
# add all the energy contributions #
# and calculate their percent change #
# #
#---------------------------------------#
[./Ftot]
type = LinearCombinationPostprocessor
pp_names = 'Fexch Fdemag'
pp_coefs = ' 1.0 1.0'
execute_on = 'initial timestep_end final'
[../]
[./perc_change]
type = EnergyRatePostprocessor
postprocessor = Ftot
dt = dt
execute_on = 'timestep_end final'
[../]
[]
[Preconditioning]
#---------------------------------------#
# #
# Solver options #
# #
#---------------------------------------#
[./smp]
type = SMP
full = true
petsc_options_iname = ' -ksp_gmres_restart -snes_atol -snes_rtol -ksp_rtol -pc_type '
petsc_options_value = ' 526 1e-5 1e-3 1e-6 bjacobi'
[../]
[]
#
[Executioner]
type = Transient
solve_type = 'NEWTON'
[./TimeIntegrator]
type = NewmarkBeta
[../]
dtmin = 1e-18
dtmax = 1.0
[./TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 38 #usually 10
linear_iteration_ratio = 1000
dt = 1e-8
growth_factor = 1.1
[../]
num_steps = 2
[]
[Outputs]
print_linear_residuals = false
[./out]
type = Exodus
file_base = out_Sstate_gen-Py_111_OOMF
elemental_as_nodal = true
interval = 1
[../]
[./outCSV]
type = CSV
file_base = out_Sstate_gen-Py_111_OOMF
[../]
[]
(test/tests/magnets/ringdown.i)
##############################
##
## UNITS:
##
## gamma = (2.2101*10^5 ) m/C
##
## NOTE:
## gamma*Hscale = 1/ns
##
## coefficients given in (pg/nm*ns)
## which is equivalent to an energy/vol
##
## Effective fields are 1/(mu0*Ms)*coeff
## which gives units of aC/(nm*mus)
##
## Energies are natively printed in units
## of 0.160218 pg nm^2 / mus^2
## or 1.60218*10^{-22} J
## or 0.001 eV
##
##############################
################
#
# LLG alpha:
#
################
alphadef = 0.02
[Mesh]
[./mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 50
ny = 50
nz = 10
xmin = -50
xmax = 50
ymin = -50
ymax = 50
zmin = -10
zmax = 10
[../]
[./vacuum_box]
type = SubdomainBoundingBoxGenerator
input = mesh
bottom_left = '-50 -50 -10'
top_right = '50 50 10'
block_id = 2
block_name = vacuum
[../]
[./brick]
type = SubdomainBoundingBoxGenerator
input = vacuum_box
bottom_left = '-10 -10 -1.5'
top_right = '10 10 1.5'
block_id = 1
block_name = brick
[../]
[../]
[GlobalParams]
mag_x = mag_x
mag_y = mag_y
mag_z = mag_z
potential_H_int = potential_H_int
Hscale = 0.004519239
g0 = 1.0
mu0 = 1.256637e-06
[]
[Materials]
############################################################################
##
## material constants used.
##
############################################################################
[./constants]
type = GenericConstantMaterial
prop_names = ' alpha Ae Ms permittivity'
prop_values = '${alphadef} 1.3e-05 1.2 1.'
block = '1'
[../]
[./a_long]
type = GenericFunctionMaterial
prop_names = 'alpha_long'
prop_values = 'bc_func_1'
block = '1'
[../]
[./constantsv]
type = GenericConstantMaterial
prop_names = ' alpha Ae Ms permittivity'
prop_values = '1 1.e-05 0. 1. '
block = '2'
[../]
[./a_longv]
type = GenericFunctionMaterial
prop_names = 'alpha_long'
prop_values = 'bc_func_1'
block = '2'
[../]
[]
[Functions]
##############################
##
## Define the ramping function
## expression to be used
##
##############################
[./bc_func_1]
type = ParsedFunction
value = 'st'
vars = 'st'
vals = '1.e3' #3?
[../]
[]
[Variables]
[./mag_x]
order = FIRST
family = LAGRANGE
block = '1'
[./InitialCondition]
type = RandomConstrainedVectorFieldIC
phi = azimuth_phi
theta = polar_theta
M0s = 1.0 #amplitude of the RandomConstrainedVectorFieldIC
component = 0
[../]
[../]
[./mag_y]
order = FIRST
family = LAGRANGE
block = '1'
[./InitialCondition]
type = RandomConstrainedVectorFieldIC
phi = azimuth_phi
theta = polar_theta
M0s = 1.0 #amplitude of the RandomConstrainedVectorFieldIC
component = 1
[../]
[../]
[./mag_z]
order = FIRST
family = LAGRANGE
block= '1'
[./InitialCondition]
type = RandomConstrainedVectorFieldIC
phi = azimuth_phi
theta = polar_theta
M0s = 1.0 #amplitude of the RandomConstrainedVectorFieldIC
component = 2
[../]
[../]
[./potential_H_int]
order = FIRST
family = LAGRANGE
block = '1 2'
[../]
[]
[AuxVariables]
#--------------------------------------------#
# #
# field to seed IC that obeys constraint #
# #
#--------------------------------------------#
[./azimuth_phi]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
min = 0.
max = 0.01
seed = 2
[../]
[../]
[./polar_theta]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
min = 1.5708
max = 1.5709
seed = 37
[../]
[../]
[./mag_s]
order = FIRST
family = LAGRANGE
[../]
[./H_x]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 1.0
[../]
[../]
[./H_y]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 1.0
[../]
[../]
[./H_z]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 1.0
[../]
[../]
[]
[AuxKernels]
[./mag_mag]
type = VectorMag
variable = mag_s
vector_x = mag_x
vector_y = mag_y
vector_z = mag_z
execute_on = 'initial timestep_end final'
block = '1'
[../]
[]
[Kernels]
#---------------------------------------#
# #
# Time dependence #
# #
#---------------------------------------#
[./mag_x_time]
type = TimeDerivative
variable = mag_x
block = '1'
[../]
[./mag_y_time]
type = TimeDerivative
variable = mag_y
block = '1'
[../]
[./mag_z_time]
type = TimeDerivative
variable = mag_z
block = '1'
[../]
#---------------------------------------#
# #
# Local magnetic exchange #
# #
#---------------------------------------#
[./dllg_x_exch]
type = MasterExchangeCartLLG
variable = mag_x
component = 0
block = '1'
[../]
[./dllg_y_exch]
type = MasterExchangeCartLLG
variable = mag_y
component = 1
block = '1'
[../]
[./dllg_z_exch]
type = MasterExchangeCartLLG
variable = mag_z
component = 2
block = '1'
[../]
#---------------------------------------#
# #
# demagnetization field #
# #
#---------------------------------------#
[./d_HM_x]
type = MasterInteractionCartLLG
variable = mag_x
component = 0
block = '1'
[../]
[./d_HM_y]
type = MasterInteractionCartLLG
variable = mag_y
component = 1
block = '1'
[../]
[./d_HM_z]
type = MasterInteractionCartLLG
variable = mag_z
component = 2
block = '1'
[../]
#---------------------------------------#
# #
# LLB constraint terms #
# #
#---------------------------------------#
# [./llb1_x]
# type = MasterLongitudinalLLB
# variable = mag_x
# component = 0
# block = '1'
# [../]
# [./llb1_y]
# type = MasterLongitudinalLLB
# variable = mag_y
# component = 1
# block = '1'
# [../]
#
# [./llb1_z]
# type = MasterLongitudinalLLB
# variable = mag_z
# component = 2
# block = '1'
# [../]
#---------------------------------------#
# #
# Magnetostatic Poisson equation #
# #
#---------------------------------------#
[./int_pot_lap]
type = Electrostatics
variable = potential_H_int
block = '1 2'
[../]
[./int_bc_pot_lap]
type = MagHStrongCart
variable = potential_H_int
block = '1'
[../]
[]
[BCs]
[./vacuum_box]
type = DirichletBC
value = 0.
variable = potential_H_int
boundary = '0 1 2 3 4 5'
[../]
[]
[Postprocessors]
[./dt]
type = TimestepSize
[../]
#---------------------------------------#
# #
# Average M = |m| #
# #
#---------------------------------------#
[./M1]
type = ElementAverageValue
variable = mag_s
execute_on = 'initial timestep_end final'
block = '1'
[../]
[./<mx>]
type = ElementAverageValue
variable = mag_x
execute_on = 'initial timestep_end final'
block = '1'
[../]
[./<my>]
type = ElementAverageValue
variable = mag_y
execute_on = 'initial timestep_end final'
block = '1'
[../]
[./<mz>]
type = ElementAverageValue
variable = mag_z
execute_on = 'initial timestep_end final'
block = '1'
[../]
#---------------------------------------#
# #
# Calculate exchange energy of #
# the magnetic body #
# #
#---------------------------------------#
[./Fexch]
type = MasterMagneticExchangeEnergy
energy_scale = 1. #converts results to eV
execute_on = 'initial timestep_end final'
block = '1'
[../]
#---------------------------------------#
# #
# Calculate demagnetization energy #
# of the magnetic body #
# #
#---------------------------------------#
[./Fdemag]
type = MagnetostaticEnergyCart
energy_scale = 1. #converts results to eV
execute_on = 'initial timestep_end final'
block = '1'
[../]
#---------------------------------------#
# #
# Calculate excess energy from missed #
# LLB targets #
# #
#---------------------------------------#
[./Fllb1]
type = MagneticExcessLLBEnergy
mag_x = mag_x
mag_y = mag_y
mag_z = mag_z
execute_on = 'initial timestep_end final'
block = '1'
[../]
#---------------------------------------#
# #
# add all the energy contributions #
# and calculate their percent change #
# #
#---------------------------------------#
[./Ftot]
type = LinearCombinationPostprocessor
pp_names = 'Fexch Fdemag'
pp_coefs = ' 1.0 1.0'
execute_on = 'initial timestep_end final'
[../]
[./perc_change]
type = EnergyRatePostprocessor
postprocessor = Ftot
dt = dt
execute_on = 'timestep_end final'
[../]
[]
[UserObjects]
[./kill]
type = Terminator
expression = 'perc_change <= 1.0e-8'
[../]
[mag]
type = RenormalizeVector
v = 'mag_x mag_y mag_z'
norm = 1
execute_on = 'TIMESTEP_END'
# force_praux = true
[]
[]
[Preconditioning]
active = smp
[./muPBP]
type = PBP
solve_order = 'mag_x mag_y mag_z potential_H_int'
preconditioner = 'AMG ILU'
off_diag_row = 'mag_x mag_y mag_z'
off_diag_column = 'mag_x mag_y mag_z'
[../]
[./muFSP]
type = FSP
topsplit = 'magpot'
[./magpot]
splitting = 'mag pot'
splitting_type = additive
[../]
[./mag]
vars = 'mag_x mag_y mag_z'
petsc_options_iname = ' -ksp_gmres_restart -snes_atol -snes_rtol -ksp_rtol -pc_type -pc_sub_type '
petsc_options_value = ' 40 1e-20 1e-6 1e-6 bjacobi ilu'
[../]
[./pot]
vars = potential_H_int
petsc_options_iname = ' -ksp_gmres_restart -snes_atol -snes_rtol -ksp_rtol -pc_type -pc_sub_type '
petsc_options_value = ' 40 1e-12 1e-6 1e-6 bjacobi ilu'
[../]
[../]
#---------------------------------------#
# #
# Solver options #
# #
#---------------------------------------#
[./smp]
type = SMP
full = true
petsc_options_iname = ' -ksp_gmres_restart -snes_atol -snes_rtol -ksp_rtol -pc_type'
petsc_options_value = ' 40 1e-8 1e-8 1e-4 bjacobi'
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
# num_grids = 8
[./TimeIntegrator]
type = NewmarkBeta #LStableDirk4 #NewmarkBeta
[../]
dtmin = 1.e-5
dtmax = 2.e-3
end_time = 5.
automatic_scaling = true
[./TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 15 #usually 10
iteration_window = 2
linear_iteration_ratio = 1000
dt = 1.e-4
growth_factor = 1.1
cutback_factor = 0.75
[../]
num_steps = 20
[../]
[Outputs]
print_linear_residuals = false
[./out]
type = Exodus
file_base = ringdown
elemental_as_nodal = true
interval = 10
[../]
[./outCSV]
type = CSV
file_base = ringdown
[../]
[]
(tutorial/BFO_P111_TO_P111b_switch_m1_a1.i)
alphadef = 0.003
endtdef = 0.00223
efreq = 600
Eadef = -1.8e3
[Mesh]
[fileload]
type = FileMeshGenerator
file = out_BFOMDL_P111A111_m1.e
use_for_exodus_restart = true
[]
[]
[GlobalParams]
len_scale = 1.0
mag1_x = mag1_x
mag1_y = mag1_y
mag1_z = mag1_z
mag2_x = mag2_x
mag2_y = mag2_y
mag2_z = mag2_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
displacements = 'u_x u_y u_z'
E_x = E_x
E_y = E_y
E_z = E_z
[]
[Functions]
[./bc_func_1]
type = ParsedFunction
value = 'st'
vars = 'st '
vals = '5e2'
[../]
[]
[Materials]
[./constants] # Constants used in other material properties
type = GenericConstantMaterial
prop_names = ' alpha De D0 g0mu0Ms g0 K1 K1c Kt '
prop_values = '0.003 3.7551 0.003 48291.9 48291.9 -5.0068 -0.00550748 -0.000365997 '
[../]
[./a_long]
type = GenericFunctionMaterial
prop_names = 'alpha_long'
prop_values = 'bc_func_1'
[../]
[./Landau_P]
type = GenericConstantMaterial
prop_names = 'alpha1 alpha11 alpha12 alpha111 alpha112 alpha123 alpha1111 alpha1112 alpha1122 alpha1123'
prop_values = '-2.81296e3 1.72351e3 2.24147e3 0.0 0.0 0.0 0.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 = '-0.0137763e3 0.0000349266e3 0.0000498846e3 0.0 0.0 0.0 0.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 = '0.012516e3 0.0180504e3 -0.036155e3 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 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 = '295.179e3 117.567e3 74.0701e3'
[../]
[./mat_Q]
type = GenericConstantMaterial
prop_names = 'Q11 Q12 Q44'
prop_values = '-0.0603833 0.0111245 -0.0175686'
[../]
[./mat_R]
type = GenericConstantMaterial
prop_names = 'R11 R12 R44'
prop_values = '-0.0000878064 0.0000295306 0.0000627962'
[../]
[./mat_q]
type = GenericConstantMaterial
prop_names = 'q11 q12 q44'
prop_values = '-30.4162e3 -5.01496e3 -10.4105e3'
#the point is the following: use a slightly different definition of Q_ij than Hlinka
[../]
[./mat_r]
type = GenericConstantMaterial
prop_names = 'r11 r12 r44'
prop_values = '-0.0379499e3 0.00373096e3 0.0372105e3'
[../]
[./elasticity_tensor_1]
type = ComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '295.179e3 117.567e3 117.567e3 295.179e3 117.567e3 295.179e3 74.0701e3 74.0701e3 74.0701e3'
[../]
[./strain]
type = ComputeSmallStrain
global_strain = global_strain
[../]
[./global_strain]
type = ComputeGlobalStrain
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./permitivitty_1]
###############################################
##
## so-called background dielectric constant
## (it encapsulates the motion of core electrons
## at high frequency) = e_b*e_0 (here we use
## e_b = 10), see PRB. 74, 104014, (2006)
##
###############################################
type = GenericConstantMaterial
prop_names = 'permittivity'
prop_values = '0.00008854187'
[../]
[]
[Variables]
[./mag1_x]
order = FIRST
family = LAGRANGE
initial_from_file_var = mag1_x
initial_from_file_timestep = 'LATEST'
[../]
[./mag1_y]
order = FIRST
family = LAGRANGE
initial_from_file_var = mag1_y
initial_from_file_timestep = 'LATEST'
[../]
[./mag1_z]
order = FIRST
family = LAGRANGE
initial_from_file_var = mag1_z
initial_from_file_timestep = 'LATEST'
[../]
[./mag2_x]
order = FIRST
family = LAGRANGE
initial_from_file_var = mag2_x
initial_from_file_timestep = 'LATEST'
[../]
[./mag2_y]
order = FIRST
family = LAGRANGE
initial_from_file_var = mag2_y
initial_from_file_timestep = 'LATEST'
[../]
[./mag2_z]
order = FIRST
family = LAGRANGE
initial_from_file_var = mag2_z
initial_from_file_timestep = 'LATEST'
[../]
[./u_x]
[../]
[./u_y]
[../]
[./u_z]
[../]
[./global_strain]
order = SIXTH
family = SCALAR
[../]
[./polar_x]
order = FIRST
family = LAGRANGE
initial_from_file_var = polar_x
initial_from_file_timestep = 'LATEST'
[../]
[./polar_y]
order = FIRST
family = LAGRANGE
initial_from_file_var = polar_y
initial_from_file_timestep = 'LATEST'
[../]
[./polar_z]
order = FIRST
family = LAGRANGE
initial_from_file_var = polar_z
initial_from_file_timestep = 'LATEST'
[../]
[./antiphase_A_x]
order = FIRST
family = LAGRANGE
initial_from_file_var = antiphase_A_x
initial_from_file_timestep = 'LATEST'
[../]
[./antiphase_A_y]
order = FIRST
family = LAGRANGE
initial_from_file_var = antiphase_A_y
initial_from_file_timestep = 'LATEST'
[../]
[./antiphase_A_z]
order = FIRST
family = LAGRANGE
initial_from_file_var = antiphase_A_z
initial_from_file_timestep = 'LATEST'
[../]
[]
[AuxVariables]
[./mag1_s]
order = FIRST
family = LAGRANGE
[../]
[./mag2_s]
order = FIRST
family = LAGRANGE
[../]
[./Neel_L_x]
order = FIRST
family = LAGRANGE
[../]
[./Neel_L_y]
order = FIRST
family = LAGRANGE
[../]
[./Neel_L_z]
order = FIRST
family = LAGRANGE
[../]
[./SSMag_x]
order = FIRST
family = LAGRANGE
[../]
[./SSMag_y]
order = FIRST
family = LAGRANGE
[../]
[./SSMag_z]
order = FIRST
family = LAGRANGE
[../]
[./ph]
order = FIRST
family = LAGRANGE
[../]
[./th1]
order = FIRST
family = LAGRANGE
[../]
[./th2]
order = FIRST
family = LAGRANGE
[../]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./s00]
order = CONSTANT
family = MONOMIAL
[../]
[./s01]
order = CONSTANT
family = MONOMIAL
[../]
[./s10]
order = CONSTANT
family = MONOMIAL
[../]
[./s11]
order = CONSTANT
family = MONOMIAL
[../]
[./e00]
order = CONSTANT
family = MONOMIAL
[../]
[./e01]
order = CONSTANT
family = MONOMIAL
[../]
[./e10]
order = CONSTANT
family = MONOMIAL
[../]
[./e11]
order = CONSTANT
family = MONOMIAL
[../]
[./e22]
order = CONSTANT
family = MONOMIAL
[../]
[./e12]
order = CONSTANT
family = MONOMIAL
[../]
[./e21]
order = CONSTANT
family = MONOMIAL
[../]
[./e02]
order = CONSTANT
family = MONOMIAL
[../]
[./e20]
order = CONSTANT
family = MONOMIAL
[../]
[./E_x]
order = CONSTANT
family = MONOMIAL
[../]
[./E_y]
order = CONSTANT
family = MONOMIAL
[../]
[./E_z]
order = CONSTANT
family = MONOMIAL
[../]
[./sublat1_phi]
order = FIRST
family = LAGRANGE
[../]
[./sublat1_th]
order = FIRST
family = LAGRANGE
[../]
[./sublat2_phi]
order = FIRST
family = LAGRANGE
[../]
[./sublat2_th]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./TensorMechanics]
[../]
[./rotostr_ux]
type = RotostrictiveCouplingDispDerivative
variable = u_x
component = 0
[../]
[./rotostr_uy]
type = RotostrictiveCouplingDispDerivative
variable = u_y
component = 1
[../]
[./rotostr_uz]
type = RotostrictiveCouplingDispDerivative
variable = u_z
component = 2
[../]
[./electrostr_ux]
type = ElectrostrictiveCouplingDispDerivative
variable = u_x
component = 0
[../]
[./electrostr_uy]
type = ElectrostrictiveCouplingDispDerivative
variable = u_y
component = 1
[../]
[./electrostr_uz]
type = ElectrostrictiveCouplingDispDerivative
variable = u_z
component = 2
[../]
### Operators for the polar field: ###
[./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
[../]
[./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
[../]
[./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
[../]
[./electrostr_polar_coupled_x]
type = ElectrostrictiveCouplingPolarDerivative
variable = polar_x
component = 0
u_x = disp_x
u_y = disp_y
u_z = disp_z
[../]
[./electrostr_polar_coupled_y]
type = ElectrostrictiveCouplingPolarDerivative
variable = polar_y
component = 1
u_x = disp_x
u_y = disp_y
u_z = disp_z
[../]
[./electrostr_polar_coupled_z]
type = ElectrostrictiveCouplingPolarDerivative
variable = polar_z
component = 2
u_x = disp_x
u_y = disp_y
u_z = disp_z
[../]
#Operators for the AFD field
[./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_dis_coupled_x]
type = RotostrictiveCouplingDistortDerivative
variable = antiphase_A_x
component = 0
u_x = disp_x
u_y = disp_y
u_z = disp_z
[../]
[./rotostr_dis_coupled_y]
type = RotostrictiveCouplingDistortDerivative
variable = antiphase_A_y
component = 1
u_x = disp_x
u_y = disp_y
u_z = disp_z
[../]
[./rotostr_dis_coupled_z]
type = RotostrictiveCouplingDistortDerivative
variable = antiphase_A_z
component = 2
u_x = disp_x
u_y = disp_y
u_z = disp_z
[../]
[./polar_electric_px]
type = PolarElectricPStrongEConst
variable = polar_x
component = 0
[../]
[./polar_electric_py]
type = PolarElectricPStrongEConst
variable = polar_y
component = 1
[../]
[./polar_electric_pz]
type = PolarElectricPStrongEConst
variable = polar_z
component = 2
[../]
#---------------------------------------#
# #
# Time dependence #
# #
#---------------------------------------#
[./mag1_x_time]
type = TimeDerivative
variable = mag1_x
[../]
[./mag1_y_time]
type = TimeDerivative
variable = mag1_y
[../]
[./mag1_z_time]
type = TimeDerivative
variable = mag1_z
[../]
[./mag2_x_time]
type = TimeDerivative
variable = mag2_x
[../]
[./mag2_y_time]
type = TimeDerivative
variable = mag2_y
[../]
[./mag2_z_time]
type = TimeDerivative
variable = mag2_z
[../]
#---------------------------------------#
# #
# AFM sublattice exchange #
# #
#---------------------------------------#
[./afmex1_x]
type = AFMSublatticeSuperexchange
variable = mag1_x
mag_sub = 0
component = 0
[../]
[./afmex1_y]
type = AFMSublatticeSuperexchange
variable = mag1_y
mag_sub = 0
component = 1
[../]
[./afmex1_z]
type = AFMSublatticeSuperexchange
variable = mag1_z
mag_sub = 0
component = 2
[../]
[./afmex2_x]
type = AFMSublatticeSuperexchange
variable = mag2_x
mag_sub = 1
component = 0
[../]
[./afmex2_y]
type = AFMSublatticeSuperexchange
variable = mag2_y
mag_sub = 1
component = 1
[../]
[./afmex2_z]
type = AFMSublatticeSuperexchange
variable = mag2_z
mag_sub = 1
component = 2
[../]
#---------------------------------------#
# #
# AFM sublattice DMI #
# !isStronglyCoupled=true #
#---------------------------------------#
[./afmdmi1_x]
type = AFMSublatticeDMInteractionSC
variable = mag1_x
mag_sub = 0
component = 0
[../]
[./afmdmi1_y]
type = AFMSublatticeDMInteractionSC
variable = mag1_y
mag_sub = 0
component = 1
[../]
[./afmdmi1_z]
type = AFMSublatticeDMInteractionSC
variable = mag1_z
mag_sub = 0
component = 2
[../]
[./afmdmi2_x]
type = AFMSublatticeDMInteractionSC
variable = mag2_x
mag_sub = 1
component = 0
[../]
[./afmdmi2_y]
type = AFMSublatticeDMInteractionSC
variable = mag2_y
mag_sub = 1
component = 1
[../]
[./afmdmi2_z]
type = AFMSublatticeDMInteractionSC
variable = mag2_z
mag_sub = 1
component = 2
[../]
#---------------------------------------#
# #
# Magnetocrystalline anisotropy for #
# the AFM sublattice in easy-plane #
# !isStronglyCoupled=true #
#---------------------------------------#
[./afma1_x]
type = AFMEasyPlaneAnisotropySC
variable = mag1_x
mag_sub = 0
component = 0
[../]
[./afma1_y]
type = AFMEasyPlaneAnisotropySC
variable = mag1_y
mag_sub = 0
component = 1
[../]
[./afma1_z]
type = AFMEasyPlaneAnisotropySC
variable = mag1_z
mag_sub = 0
component = 2
[../]
[./afma2_x]
type = AFMEasyPlaneAnisotropySC
variable = mag2_x
mag_sub = 1
component = 0
[../]
[./afma2_y]
type = AFMEasyPlaneAnisotropySC
variable = mag2_y
mag_sub = 1
component = 1
[../]
[./afma2_z]
type = AFMEasyPlaneAnisotropySC
variable = mag2_z
mag_sub = 1
component = 2
[../]
#---------------------------------------#
# #
# Single-ion anisotropy environment #
# for the AFM sublattice in the #
# degenerate easy-plane #
# !isStronglyCoupled=true #
#---------------------------------------#
[./afmsia1_x]
type = AFMSingleIonCubicSixthAnisotropySC
variable = mag1_x
mag_sub = 0
component = 0
[../]
[./afmsia1_y]
type = AFMSingleIonCubicSixthAnisotropySC
variable = mag1_y
mag_sub = 0
component = 1
[../]
[./afmsia1_z]
type = AFMSingleIonCubicSixthAnisotropySC
variable = mag1_z
mag_sub = 0
component = 2
[../]
[./afmsia2_x]
type = AFMSingleIonCubicSixthAnisotropySC
variable = mag2_x
mag_sub = 1
component = 0
[../]
[./afmsia2_y]
type = AFMSingleIonCubicSixthAnisotropySC
variable = mag2_y
mag_sub = 1
component = 1
[../]
[./afmsia2_z]
type = AFMSingleIonCubicSixthAnisotropySC
variable = mag2_z
mag_sub = 1
component = 2
[../]
#---------------------------------------#
# #
# LLB constraint terms #
# #
#---------------------------------------#
[./llb1_x]
type = LongitudinalLLB
variable = mag1_x
mag_x = mag1_x
mag_y = mag1_y
mag_z = mag1_z
component = 0
[../]
[./llb1_y]
type = LongitudinalLLB
variable = mag1_y
mag_x = mag1_x
mag_y = mag1_y
mag_z = mag1_z
component = 1
[../]
[./llb1_z]
type = LongitudinalLLB
variable = mag1_z
mag_x = mag1_x
mag_y = mag1_y
mag_z = mag1_z
component = 2
[../]
[./llb2_x]
type = LongitudinalLLB
variable = mag2_x
mag_x = mag2_x
mag_y = mag2_y
mag_z = mag2_z
component = 0
[../]
[./llb2_y]
type = LongitudinalLLB
variable = mag2_y
mag_x = mag2_x
mag_y = mag2_y
mag_z = mag2_z
component = 1
[../]
[./llb2_z]
type = LongitudinalLLB
variable = mag2_z
mag_x = mag2_x
mag_y = mag2_y
mag_z = mag2_z
component = 2
[../]
#---------------------------------------#
# #
# Time dependence #
# #
#---------------------------------------#
[./polar_x_time]
type = TimeDerivativeScaled
variable=polar_x
time_scale = 0.005
block = '0'
[../]
[./polar_y_time]
type = TimeDerivativeScaled
variable=polar_y
time_scale = 0.005
block = '0'
[../]
[./polar_z_time]
type = TimeDerivativeScaled
variable = polar_z
time_scale = 0.005
block = '0'
[../]
[./a_x_time]
type = TimeDerivativeScaled
variable = antiphase_A_x
time_scale = 0.00005
block = '0'
[../]
[./a_y_time]
type = TimeDerivativeScaled
variable = antiphase_A_y
time_scale = 0.00005
block = '0'
[../]
[./a_z_time]
type = TimeDerivativeScaled
variable = antiphase_A_z
time_scale = 0.00005
block = '0'
[../]
[]
[AuxKernels]
[./mag1_mag]
type = VectorMag
variable = mag1_s
vector_x = mag1_x
vector_y = mag1_y
vector_z = mag1_z
execute_on = 'initial timestep_end final'
[../]
[./mag2_mag]
type = VectorMag
variable = mag2_s
vector_x = mag2_x
vector_y = mag2_y
vector_z = mag2_z
execute_on = 'initial timestep_end final'
[../]
[./Neel_Lx]
type = VectorDiffOrSum
variable = Neel_L_x
var1 = mag1_x
var2 = mag2_x
diffOrSum = 0
execute_on = 'initial timestep_end final'
[../]
[./Neel_Ly]
type = VectorDiffOrSum
variable = Neel_L_y
var1 = mag1_y
var2 = mag2_y
diffOrSum = 0
execute_on = 'initial timestep_end final'
[../]
[./Neel_Lz]
type = VectorDiffOrSum
variable = Neel_L_z
var1 = mag1_z
var2 = mag2_z
diffOrSum = 0
execute_on = 'initial timestep_end final'
[../]
[./smallSignalMag_x]
type = VectorDiffOrSum
variable = SSMag_x
var1 = mag1_x
var2 = mag2_x
diffOrSum = 1
execute_on = 'initial timestep_end final'
[../]
[./smallSignalMag_y]
type = VectorDiffOrSum
variable = SSMag_y
var1 = mag1_y
var2 = mag2_y
diffOrSum = 1
execute_on = 'initial timestep_end final'
[../]
[./smallSignalMag_z]
type = VectorDiffOrSum
variable = SSMag_z
var1 = mag1_z
var2 = mag2_z
diffOrSum = 1
execute_on = 'initial timestep_end final'
[../]
[./phc]
type = AngleBetweenTwoVectors
variable = ph
var1x = mag1_x
var1y = mag1_y
var1z = mag1_z
var2x = mag2_x
var2y = mag2_y
var2z = mag2_z
execute_on = 'initial timestep_end final'
[../]
[./th1c]
type = AngleBetweenTwoVectors
variable = th1
var1x = mag1_x
var1y = mag1_y
var1z = mag1_z
var2x = polar_x
var2y = polar_y
var2z = polar_z
execute_on = 'initial timestep_end final'
[../]
[./th2c]
type = AngleBetweenTwoVectors
variable = th2
var1x = mag2_x
var1y = mag2_y
var1z = mag2_z
var2x = polar_x
var2y = polar_y
var2z = polar_z
execute_on = 'initial timestep_end final'
[../]
[./disp_x]
type = GlobalDisplacementAux
variable = disp_x
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 0
[../]
[./disp_y]
type = GlobalDisplacementAux
variable = disp_y
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 1
[../]
[./disp_z]
type = GlobalDisplacementAux
variable = disp_z
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 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
[../]
[./s11]
type = RankTwoAux
variable = s11
rank_two_tensor = stress
index_i = 1
index_j = 1
[../]
[./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
[../]
[./e11]
type = RankTwoAux
variable = e11
rank_two_tensor = total_strain
index_i = 1
index_j = 1
[../]
[./e12]
type = RankTwoAux
variable = e12
rank_two_tensor = total_strain
index_i = 1
index_j = 2
[../]
[./e21]
type = RankTwoAux
variable = e21
rank_two_tensor = total_strain
index_i = 2
index_j = 1
[../]
[./e20]
type = RankTwoAux
variable = e20
rank_two_tensor = total_strain
index_i = 2
index_j = 0
[../]
[./e02]
type = RankTwoAux
variable = e02
rank_two_tensor = total_strain
index_i = 0
index_j = 2
[../]
[./e22]
type = RankTwoAux
variable = e22
rank_two_tensor = total_strain
index_i = 2
index_j = 2
[../]
[./ez]
type = HarmonicFieldAux
variable = E_z
amplitude = ${Eadef}
correction = 1.0
frequency = ${efreq}
tshift = 0.0
ton = 0.0
toff = 0.000944
execute_on = 'initial timestep_end final'
[../]
[./mcsublat1_phi]
type = SphericalCoordinateVector
variable = sublat1_phi
component = 0
var1x = mag1_x
var1y = mag1_y
var1z = mag1_z
execute_on = 'initial timestep_end final'
[../]
[./mcsublat1_th]
type = SphericalCoordinateVector
variable = sublat1_th
component = 1
var1x = mag1_x
var1y = mag1_y
var1z = mag1_z
execute_on = 'initial timestep_end final'
[../]
[./mcsublat2_phi]
type = SphericalCoordinateVector
variable = sublat2_phi
component = 0
var1x = mag2_x
var1y = mag2_y
var1z = mag2_z
execute_on = 'initial timestep_end final'
[../]
[./mcsublat2_th]
type = SphericalCoordinateVector
variable = sublat2_th
component = 1
var1x = mag2_x
var1y = mag2_y
var1z = mag2_z
execute_on = 'initial timestep_end final'
[../]
[]
[ScalarKernels]
[./global_strain]
type = GlobalStrain
variable = global_strain
global_strain_uo = global_strain_uo
[../]
[]
[BCs]
[./Periodic]
[./xyz]
auto_direction = 'x y z'
variable = 'u_x u_y u_z polar_x polar_y polar_z antiphase_A_x antiphase_A_y antiphase_A_z mag1_x mag1_y mag1_z mag2_x mag2_y mag2_z'
[../]
[../]
# 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
[../]
[]
[Postprocessors]
#---------------------------------------#
# #
# Average Mk = |m_k| and along #
# other directions #
# #
#---------------------------------------#
[./M1]
type = ElementAverageValue
variable = mag1_s
execute_on = 'initial timestep_end final'
[../]
[./M2]
type = ElementAverageValue
variable = mag2_s
execute_on = 'initial timestep_end final'
[../]
[./<m1x>]
type = ElementAverageValue
variable = mag1_x
execute_on = 'initial timestep_end final'
[../]
[./<m1y>]
type = ElementAverageValue
variable = mag1_y
execute_on = 'initial timestep_end final'
[../]
[./<m1z>]
type = ElementAverageValue
variable = mag1_z
execute_on = 'initial timestep_end final'
[../]
[./<m2x>]
type = ElementAverageValue
variable = mag2_x
execute_on = 'initial timestep_end final'
[../]
[./<m2y>]
type = ElementAverageValue
variable = mag2_y
execute_on = 'initial timestep_end final'
[../]
[./<m2z>]
type = ElementAverageValue
variable = mag2_z
execute_on = 'initial timestep_end final'
[../]
[./<Lx>]
type = ElementAverageValue
variable = Neel_L_x
execute_on = 'initial timestep_end final'
[../]
[./<Ly>]
type = ElementAverageValue
variable = Neel_L_y
execute_on = 'initial timestep_end final'
[../]
[./<Lz>]
type = ElementAverageValue
variable = Neel_L_z
execute_on = 'initial timestep_end final'
[../]
[./<SSmx>]
type = ElementAverageValue
variable = SSMag_x
execute_on = 'initial timestep_end final'
[../]
[./<SSmy>]
type = ElementAverageValue
variable = SSMag_y
execute_on = 'initial timestep_end final'
[../]
[./<SSmz>]
type = ElementAverageValue
variable = SSMag_z
execute_on = 'initial timestep_end final'
[../]
[./<ph>]
type = ElementAverageValue
variable = ph
execute_on = 'initial timestep_end final'
[../]
[./<th1>]
type = ElementAverageValue
variable = th1
execute_on = 'initial timestep_end final'
[../]
[./<th2>]
type = ElementAverageValue
variable = th2
execute_on = 'initial timestep_end final'
[../]
[./<sl1phi>]
type = ElementAverageValue
variable = sublat1_phi
execute_on = 'initial timestep_end final'
[../]
[./<sl1th>]
type = ElementAverageValue
variable = sublat1_th
execute_on = 'initial timestep_end final'
[../]
[./<sl2phi>]
type = ElementAverageValue
variable = sublat2_phi
execute_on = 'initial timestep_end final'
[../]
[./<sl2th>]
type = ElementAverageValue
variable = sublat2_th
execute_on = 'initial timestep_end final'
[../]
#---------------------------------------#
# #
# Calculate exchange energy of #
# the magnetic body #
# #
#---------------------------------------#
[./FafmSLexch]
type = AFMSublatticeSuperexchangeEnergy
execute_on = 'initial timestep_end final'
mag1_x = mag1_x
mag1_y = mag1_y
mag1_z = mag1_z
mag2_x = mag2_x
mag2_y = mag2_y
mag2_z = mag2_z
energy_scale = 6241.51
[../]
[./FafmSLdmi]
type = AFMSublatticeDMInteractionEnergy
execute_on = 'initial timestep_end final'
energy_scale = 6241.51
[../]
#---------------------------------------#
# #
# Calculate excess energy from missed #
# LLB targets #
# #
#---------------------------------------#
[./Fllb1]
type = MagneticExcessLLBEnergy
mag_x = mag1_x
mag_y = mag1_y
mag_z = mag1_z
execute_on = 'initial timestep_end final'
[../]
[./Fllb2]
type = MagneticExcessLLBEnergy
mag_x = mag2_x
mag_y = mag2_y
mag_z = mag2_z
execute_on = 'initial timestep_end final'
[../]
#---------------------------------------#
# #
# Calculate the anisotropy energy #
# #
#---------------------------------------#
[./Fa1]
type = AFMEasyPlaneAnisotropyEnergy
execute_on = 'initial timestep_end final'
mag_x = mag1_x
mag_y = mag1_y
mag_z = mag1_z
energy_scale = 6241.51
[../]
[./Fa2]
type = AFMEasyPlaneAnisotropyEnergy
execute_on = 'initial timestep_end final'
mag_x = mag2_x
mag_y = mag2_y
mag_z = mag2_z
energy_scale = 6241.51
[../]
[./Fsia1]
type = AFMSingleIonCubicSixthAnisotropyEnergy
execute_on = 'initial timestep_end final'
mag_x = mag1_x
mag_y = mag1_y
mag_z = mag1_z
energy_scale = 6241.51
[../]
[./Fsia2]
type = AFMSingleIonCubicSixthAnisotropyEnergy
execute_on = 'initial timestep_end final'
mag_x = mag2_x
mag_y = mag2_y
mag_z = mag2_z
energy_scale = 6241.51
[../]
#---------------------------------------#
# #
# add all the energy contributions #
# and calculate their percent change #
# #
#---------------------------------------#
[./FtotMAG]
type = LinearCombinationPostprocessor
pp_names = 'FafmSLexch FafmSLdmi Fa1 Fa2 Fsia1 Fsia2'
pp_coefs = ' 1.0 1.0 1.0 1.0 1.0 1.0'
execute_on = 'initial timestep_end final'
[../]
[./FtotLLB]
type = LinearCombinationPostprocessor
pp_names = 'Fllb1 Fllb2'
pp_coefs = ' 1.0 1.0'
execute_on = 'initial timestep_end final'
[../]
[./Px]
type = ElementAverageValue
variable = polar_x
execute_on = 'initial timestep_end final'
[../]
[./Py]
type = ElementAverageValue
variable = polar_y
execute_on = 'initial timestep_end final'
[../]
[./Pz]
type = ElementAverageValue
variable = polar_z
execute_on = 'initial timestep_end final'
[../]
[./Ax]
type = ElementAverageValue
variable = antiphase_A_x
execute_on = 'initial timestep_end final'
[../]
[./Ay]
type = ElementAverageValue
variable = antiphase_A_y
execute_on = 'initial timestep_end final'
[../]
[./Az]
type = ElementAverageValue
variable = antiphase_A_z
execute_on = 'initial timestep_end final'
[../]
[./e00]
type = ElementAverageValue
variable = e00
execute_on = 'initial timestep_end final'
[../]
[./e11]
type = ElementAverageValue
variable = e11
execute_on = 'initial timestep_end final'
[../]
[./e22]
type = ElementAverageValue
variable = e22
execute_on = 'initial timestep_end final'
[../]
[./e01]
type = ElementAverageValue
variable = e01
execute_on = 'initial timestep_end final'
[../]
[./e12]
type = ElementAverageValue
variable = e12
execute_on = 'initial timestep_end final'
[../]
[./e02]
type = ElementAverageValue
variable = e02
execute_on = 'initial timestep_end final'
[../]
[./Ez]
type = ElementAverageValue
variable = E_z
execute_on = 'initial timestep_end final'
[../]
[./dt]
type = TimestepSize
[../]
[./FbP]
type = BulkEnergyEighth
execute_on = 'initial timestep_end final'
energy_scale = 6.24151
[../]
[./FbA]
type = RotoBulkEnergyEighth
execute_on = 'initial timestep_end final'
energy_scale = 6.24151
[../]
[./FcPA]
type = RotoPolarCoupledEnergyEighth
execute_on = 'initial timestep_end final'
energy_scale = 6.24151
[../]
[./FcPu]
type = ElectrostrictiveCouplingEnergy
execute_on = 'initial timestep_end final'
energy_scale = 6.24151
u_x = disp_x
u_y = disp_y
u_z = disp_z
[../]
[./FcAu]
type = RotostrictiveCouplingEnergy
execute_on = 'initial timestep_end final'
energy_scale = 6.24151
u_x = disp_x
u_y = disp_y
u_z = disp_z
[../]
[./Felu]
type = ElasticEnergy
execute_on = 'initial timestep_end final'
energy_scale = 6.24151
[../]
[./scSSMag_x]
type = LinearCombinationPostprocessor
pp_names = '<SSmx>'
pp_coefs = ' 100 '
execute_on = 'initial timestep_end final'
[../]
[./scSSMag_y]
type = LinearCombinationPostprocessor
pp_names = '<SSmy>'
pp_coefs = ' 100 '
execute_on = 'initial timestep_end final'
[../]
[./scSSMag_z]
type = LinearCombinationPostprocessor
pp_names = '<SSmz>'
pp_coefs = ' 100 '
execute_on = 'initial timestep_end final'
[../]
[./rA_x]
type = LinearCombinationPostprocessor
pp_names = 'Ax'
pp_coefs = '0.017453277'
execute_on = 'initial timestep_end final'
[../]
[./rA_y]
type = LinearCombinationPostprocessor
pp_names = 'Ay'
pp_coefs = '0.017453277'
execute_on = 'initial timestep_end final'
[../]
[./rA_z]
type = LinearCombinationPostprocessor
pp_names = 'Az'
pp_coefs = '0.017453277'
execute_on = 'initial timestep_end final'
[../]
[./FtotFER]
type = LinearCombinationPostprocessor
pp_names = 'FbP FbA FcPA FcPu FcAu Felu'
pp_coefs = ' 1 1 1 1 1 1 '
execute_on = 'initial timestep_end final'
##########################################
#
# NOTE: Ferret output is in attojoules
#
##########################################
[../]
[./perc_change]
type = EnergyRatePostprocessor
postprocessor = FtotFER
execute_on = 'initial timestep_end final'
dt = dt
[../]
[./elapsed]
type = PerfGraphData
section_name = "Root" # for profiling the problem
data_type = total
[../]
[]
[UserObjects]
[./global_strain_uo]
type = GlobalBFOMaterialRVEUserObject
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 '
petsc_options_value = ' 121 1e-8 1e-7 1e-5 bjacobi'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
[./TimeIntegrator]
type = ImplicitEuler
[../]
dtmin = 1e-14
dtmax = 1.0e-6
[./TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 18 #usually 8-16
linear_iteration_ratio = 100
dt = 1.0e-8
[../]
num_steps = 150000
end_time = ${endtdef}
[]
[Outputs]
print_linear_residuals = false
perf_graph_live = false
[./out]
type = Exodus
file_base = out_P111-P111b-BFOMDL_m1_a1
elemental_as_nodal = true
[../]
[./outCSV]
type = CSV
file_base = out_P111-P111b-BFOMDL_m1_a1
[../]
#
[]