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

Commit

Permalink
working on problems, found memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
micahjohnson150 committed Jul 15, 2014
1 parent e43a321 commit b4795c5
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 27 deletions.
12 changes: 3 additions & 9 deletions problems/2D_full/imported_initial_full.i
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
type = FileMesh
file = phi_temp_diffusion_0010_mesh.xdr
dim = 2
uniform_refine = 1
[]

[Variables]
Expand Down Expand Up @@ -145,14 +144,6 @@
[../]
[]

[Preconditioning]
[./smp_precond]
type = SMP
off_diag_row = u
off_diag_column = T
[../]
[]

[Executioner]
# Preconditioned JFNK (default)
type = Transient
Expand Down Expand Up @@ -257,5 +248,8 @@
temperature = T
interface_thickness = 1e-5
temporal_scaling = 1e-4
output_properties = 'diffusion_coefficient conductivity latent_heat tau lambda'
outputs = all
conversion_factor = 1000
[]

13 changes: 6 additions & 7 deletions problems/2D_full/phi_T_initial.i
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
[Mesh]
type = GeneratedMesh
dim = 2
nx = 15
ny = 15
nx = 30
ny = 30
xmax = 5 # mm
ymax = 5 # mm
uniform_refine = 2
elem_type = QUAD4
[]

Expand Down Expand Up @@ -127,8 +126,8 @@
[]

[Adaptivity]
max_h_level = 6
initial_steps = 6
max_h_level = 4
initial_steps = 4
initial_marker = phi_marker
marker = phi_marker
[./Indicators]
Expand All @@ -146,9 +145,9 @@
active = 'phi_marker'
[./phi_marker]
type = ErrorFractionMarker
coarsen = .02
coarsen = .01
indicator = phi_grad_indicator
refine = .5
refine = .8
[../]
[./T_marker]
type = ErrorFractionMarker
Expand Down
4 changes: 2 additions & 2 deletions python/KaempferPlapp2009.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,5 @@
print "rho_vs(268.15) = ", rho_vs.evalf(subs={T: 263.15})

print ""
print "u_eq(263.15) = ", u_eq.evalf(subs={T: 263.15})
print "u_eq(268.15) = ", u_eq.evalf(subs={T: 268.15})
print "u_eq(263.15) = ", u_eq.evalf(subs={T: 264.8})
print "u_eq(268.15) = ", u_eq.evalf(subs={T: 267.515})
9 changes: 1 addition & 8 deletions src/ics/ChemicalPotentialIC.C
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,5 @@ ChemicalPotentialIC::ChemicalPotentialIC(const std::string & name, InputParamete
Real
ChemicalPotentialIC::value(const Point & /*p*/)
{
if (_phase[_qp]<0.95)
{
Real f = _property_uo.equilibriumConcentration(_temperature[_qp]) * (1.0-_phase[_qp])/2.0;
std::cout<<_temperature[_qp]<<' ' <<_phase[_qp]<< ' '<<f<<std::endl;
return f;
}
else
return 0.0;
return _property_uo.equilibriumConcentration(_temperature[_qp]) * (1.0 - _phase[_qp])/2.0;
}
4 changes: 3 additions & 1 deletion src/kernels/PhaseTransition.C
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ PhaseTransition::computeDFDOP(PFFunctionType type)
{
switch (type)
{
Real f = -(_lambda[_qp]) * (_s[_qp] - _s_eq[_qp]) * (1.0 - _u[_qp]*_u[_qp])*(1.0 - _u[_qp]*_u[_qp]);
std::cout<<f<<std::endl;
case Residual:
return -(_lambda[_qp]) * (_s[_qp] - _s_eq[_qp]) * (1.0 - _u[_qp]*_u[_qp])*(1.0 - _u[_qp]*_u[_qp]);
return f;

case Jacobian:
return 4.0 * _lambda[_qp] * _u[_qp] * (-_u[_qp]*_u[_qp]+1.0) * ( _s[_qp] - (_s_eq[_qp]));
Expand Down

0 comments on commit b4795c5

Please sign in to comment.