Permalink
Browse files

Merge pull request #12570 from SudiptaBiswas/grandpotential_12554

Fix the derivatives and improve anisotropic GrandPotential model
  • Loading branch information...
dschwen committed Dec 3, 2018
2 parents ee4eddb + 5dcc795 commit 12d19332c0599a6093c1d42d11446a3aaeb8a5c3
@@ -7,13 +7,15 @@
xmax = 2
ymin = -2
ymax = 2
uniform_refine = 2
[]
[GlobalParams]
x1 = -2
y1 = -2
x2 = 2
y2 = -1.5
derivative_order = 2
[]
[Variables]
@@ -27,20 +29,23 @@
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
#Temperature
[./T]
[../]
[]
[AuxKernels]
[./bnds]
type = BndsCalcAux
variable = bnds
v = 'etaa0 etab0'
[../]
[./T]
type = FunctionAux
function = 95.0+2.0*(y-1.0*t)
variable = T
execute_on = "initial timestep_begin"
execute_on = 'initial timestep_begin'
[../]
[]
@@ -139,13 +144,11 @@
type = SusceptibilityTimeDerivative
variable = w
f_name = chi
args = '' # in this case chi (the susceptibility) is simply a constant
[../]
[./Diffusion]
type = MatDiffusion
variable = w
D_name = Dchi
args = ''
[../]
[./coupled_etaa0dot]
type = CoupledSwitchingTimeDerivative
@@ -185,35 +188,27 @@
f_name = omegaa
material_property_names = 'Vm ka caeq'
function = '-0.5*w^2/Vm^2/ka-w/Vm*caeq'
derivative_order = 2
enable_jit = false
[../]
[./omegab]
type = DerivativeParsedMaterial
args = 'w T'
f_name = omegab
material_property_names = 'Vm kb cbeq S Tm'
function = '-0.5*w^2/Vm^2/kb-w/Vm*cbeq-S*(T-Tm)'
derivative_order = 2
enable_jit = false
[../]
[./rhoa]
type = DerivativeParsedMaterial
args = 'w'
f_name = rhoa
material_property_names = 'Vm ka caeq'
function = 'w/Vm^2/ka + caeq/Vm'
derivative_order = 2
enable_jit = false
[../]
[./rhob]
type = DerivativeParsedMaterial
args = 'w'
f_name = rhob
material_property_names = 'Vm kb cbeq'
function = 'w/Vm^2/kb + cbeq/Vm'
derivative_order = 2
enable_jit = false
[../]
[./kappaa]
type = InterfaceOrientationMultiphaseMaterial
@@ -222,6 +217,8 @@
d2kappadgrad_etaa_name = d2kappadgrad_etaa
etaa = etaa0
etab = etab0
outputs = exodus
output_properties = 'kappaa'
[../]
[./kappab]
type = InterfaceOrientationMultiphaseMaterial
@@ -230,19 +227,19 @@
d2kappadgrad_etaa_name = d2kappadgrad_etab
etaa = etab0
etab = etaa0
outputs = exodus
output_properties = 'kappab'
[../]
[./const]
type = GenericConstantMaterial
prop_names = 'kappa_c L D chi Vm ka caeq kb cbeq gab mu S Tm'
prop_values = '0 1.0 1.0 0.1 1.0 10.0 0.1 10.0 0.9 4.5 10.0 1.0 100.0'
prop_names = 'L D chi Vm ka caeq kb cbeq gab mu S Tm'
prop_values = '1.0 1.0 0.1 1.0 10.0 0.1 10.0 0.9 4.5 10.0 1.0 100.0'
[../]
[./Mobility]
type = DerivativeParsedMaterial
type = ParsedMaterial
f_name = Dchi
material_property_names = 'D chi'
function = 'D*chi'
derivative_order = 2
enable_jit = false
[../]
[]
@@ -259,26 +256,49 @@
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_tol = 1.0e-3
l_max_its = 30
nl_max_its = 15
nl_rel_tol = 1.0e-8
nl_abs_tol = 1e-8
end_time = 2.0
[./TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 0.001
[../]
[./Adaptivity]
initial_adaptivity = 3 # Number of times mesh is adapted to initial condition
refine_fraction = 0.7 # Fraction of high error that will be refined
coarsen_fraction = 0.1 # Fraction of low error that will coarsened
max_h_level = 3 # Max number of refinements used, starting from initial mesh (before uniform refinement)
weight_names = 'etaa0 etab0 w'
weight_values = '1 1 1'
type = IterationAdaptiveDT
dt = 0.0005
cutback_factor = 0.7
growth_factor = 1.2
[../]
[]
[Adaptivity]
initial_steps = 3
max_h_level = 3
initial_marker = err_eta
marker = err_bnds
[./Markers]
[./err_eta]
type = ErrorFractionMarker
coarsen = 0.3
refine = 0.95
indicator = ind_eta
[../]
[./err_bnds]
type = ErrorFractionMarker
coarsen = 0.3
refine = 0.95
indicator = ind_bnds
[../]
[../]
[./Indicators]
[./ind_eta]
type = GradientJumpIndicator
variable = etaa0
[../]
[./ind_bnds]
type = GradientJumpIndicator
variable = bnds
[../]
[../]
[]
[Outputs]
Oops, something went wrong.

0 comments on commit 12d1933

Please sign in to comment.