Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Commit

Permalink
Merge pull request #47 from micahjohnson150/spatial_rescale-45
Browse files Browse the repository at this point in the history
Spatial rescale 45
  • Loading branch information
aeslaughter committed Jul 16, 2014
2 parents 2da882c + b4795c5 commit f530c38
Show file tree
Hide file tree
Showing 25 changed files with 3,393 additions and 113 deletions.
8 changes: 8 additions & 0 deletions include/kernels/PhaseTransition.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ class PhaseTransition :

protected:
virtual Real computeDFDOP(PFFunctionType type);
/**
* Compute off-diagonal jacobain
* The off-diagonal jacobain term, i.e., the derivative of the coupled time derivative with respect
* to the coupled variable.
*/
// virtual Real computeQpOffDiagJacobian(unsigned int jvar);

private:
VariableValue & _s;
Expand All @@ -29,5 +35,7 @@ class PhaseTransition :

MaterialProperty<Real> & _s_eq;

unsigned int _v_var;

};
#endif // PHASETRANSITION_H
139 changes: 80 additions & 59 deletions problems/1D_full/1D_full.i
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
[Mesh]
type = GeneratedMesh
type = FileMesh
file = phi_diffusion_0021_mesh.xdr
dim = 2
nx = 100
ny = 2
xmax = .005
ymax = .0002
elem_type = QUAD4
[]

[Variables]
active = 'phi T'
[./T]
[../]
[./u]
Expand All @@ -18,24 +13,25 @@
[../]
[]

[AuxVariables]
[./u]
[../]
[]

[Functions]
[./T_func]
type = ParsedFunction
value = -200*x+261
type = SolutionFunction
from_variable = T
solution = intial_T
[../]
[./phi_func]
type = SolutionFunction
from_variable = phi
solution = initial_phi
[../]
[]

[Kernels]
active = 'phi_transition heat_diffusion phi_double_well heat_phi_time heat_time phi_time phi_square_gradient'
[./heat_diffusion]
type = MatDiffusion
type = PikaDiffusion
variable = T
D_name = conductivity
use_temporal_scaling = true
property = conductivity
[../]
[./heat_time]
type = PikaTimeDerivative
Expand All @@ -44,11 +40,12 @@
scale = 1.0
[../]
[./heat_phi_time]
type = PikaScaledTimeDerivative
type = PikaCoupledTimeDerivative
variable = T
property = latent_heat
scale = -0.5
differentiated_variable = phi
use_temporal_scaling = true
coupled_variable = phi
[../]
[./vapor_time]
type = PikaTimeDerivative
Expand All @@ -57,15 +54,18 @@
scale = 1.0
[../]
[./vapor_diffusion]
type = MatDiffusion
type = PikaDiffusion
variable = u
D_name = diffusion_coefficient
use_temporal_scaling = true
property = diffusion_coefficient
[../]
[./vapor_phi_time]
type = PikaScaledTimeDerivative
type = PikaCoupledTimeDerivative
variable = u
coefficient = 0.5
differentiated_variable = phi
use_temporal_scaling = true
coupled_variable = phi
[../]
[./phi_time]
type = PikaTimeDerivative
Expand Down Expand Up @@ -93,6 +93,7 @@
[]

[BCs]
active = 'T_hot T_cold phi_bc'
[./T_hot]
type = DirichletBC
variable = T
Expand All @@ -110,75 +111,99 @@
variable = T
boundary = 'top bottom'
[../]
[./phi_bc]
type = DirichletBC
variable = phi
boundary = 'left right'
value = 1
[../]
[]

[Postprocessors]
[]

[UserObjects]
[./property_uo]
type = PropertyUserObject
[./intial_T]
type = SolutionUserObject
system = nl0
mesh = temp_diffusion_0003_mesh.xdr
nodal_variables = T
es = temp_diffusion_0003.xdr
[../]
[./initial_phi]
type = SolutionUserObject
system = nl0
mesh = phi_diffusion_0021_mesh.xdr
nodal_variables = phi
es = phi_diffusion_0021.xdr
[../]
[]

[Preconditioning]
[./smp_precond]
type = SMP
full = true
[../]
[]

[Executioner]
# Preconditioned JFNK (default)
type = Transient
dt = 5
solve_type = PJFNK
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type'
petsc_options_value = '500 hypre boomeramg'
end_time = 10
petsc_options_value = '100 hypre boomeramg'
end_time = 1300
[]

[Adaptivity]
max_h_level = 3
initial_steps = 3
max_h_level = 5
initial_steps = 2
marker = combo
initial_marker = phi_marker
marker = combo_mark
[./Indicators]
[./phi_grad_indicator]
[./phi_grad_jump]
type = GradientJumpIndicator
variable = phi
[../]
[./u_jump_indicator]
[./u_grad_jump]
type = GradientJumpIndicator
variable = u
block = 0
[../]
[./T_grad_jump]
type = GradientJumpIndicator
variable = T
[../]
[../]
[./Markers]
active = 'phi_marker combo_mark u_marker'
[./phi_marker]
type = ErrorFractionMarker
coarsen = 0.2
indicator = phi_grad_indicator
refine = .8
[../]
[./T_marker]
type = ErrorFractionMarker
coarsen = 0.2
indicator = T_jump_indicator
refine = 0.7
coarsen = .01
indicator = phi_grad_jump
refine = .6
[../]
[./u_marker]
type = ErrorFractionMarker
indicator = u_jump_indicator
coarsen = 0.2
refine = 0.8
block = 0
coarsen = .01
indicator = u_grad_jump
refine = 0.6
[../]
[./combo_mark]
[./combo]
type = ComboMarker
block = 0
markers = 'u_marker phi_marker'
markers = 'phi_marker u_marker t_marker'
[../]
[./t_marker]
type = ErrorFractionMarker
coarsen = .01
indicator = T_grad_jump
refine = .5
[../]
[../]
[]

[Outputs]
output_initial = true
exodus = true
file_base = phi_diffusion
[./console]
type = Console
perf_log = true
Expand All @@ -189,14 +214,9 @@

[ICs]
[./phase_ic]
x1 = 0.00214285714
variable = phi
type = KaempferAnalyticPhaseIC
x2 = 0.00285714285
phi_new = -1
phi_old = 1
x3 = 0.00357142857
x4 = 0.00428571428
type = FunctionIC
function = phi_func
[../]
[./temperature_ic]
variable = T
Expand All @@ -215,8 +235,9 @@
[PikaMaterials]
phi = phi
temperature = T
interface_thickness = 1e-6
reference_temperature = 263.15
interface_thickness = 8e-5
output_properties = 'tau equilibrium_concentration heat_capacity conductivity diffusion_coefficient latent_heat lambda'
outputs = all
temporal_scaling = 1e-4
[]

Loading

0 comments on commit f530c38

Please sign in to comment.