CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

Solid/liquid phase change

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   May 13, 2009, 09:35
Default Solid/liquid phase change
  #1
Senior Member
 
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18
fabian_roesler is on a distinguished road
Dear Foamers

For a project I am trying to get a solid/liquid phase change simulation running in OF 1.5-dev. A paraffin with non isothermal phase change is molten in a 2D rectangular test case scenario. I started from interFoam solver by changing especially the gamma equation to my needs:

Gamma equation:

dimensionedScalar pi = mathematicalConstant:i;
dimensionedScalar alpha = (Tl-Ts)/(scalar(2)*tan(scalar(0.49)*pi));
gamma = atan(scalar(1)/alpha*(T-(Tl+Ts)/scalar(2)))/pi+scalar(0.5);

Changig gamma from 0 (solid) to 1 (liquid) depending on the temperatures
Tl (upper phase change temperature) Ts (lower phase change temperature)

Momentum equation:

fvVectorMatrix UEqn

(
fvm::ddt(rho, U)
+ fvm::div(rhoPhi, U)
- fvm::laplacian(muf, U)
- (fvc::grad(U) & fvc::grad(muf))
);

UEqn.relax();

if (momentumPredictor)
{
solve
(
UEqn
==
fvc::reconstruct
(
(
- ghf*fvc::snGrad(rho)
- fvc::snGrad(pd)
) * mesh.magSf()
)
);
}

No changes at all, however no surface tension left

Energy equation:

volScalarField rhoCp("rhoCp", rho*cp);
surfaceScalarField rhoPhiCp("rhoPhiCp", rhoPhi*fvc::interpolate(cp));

fvScalarMatrix hEqn
(
fvm::ddt(rhoCp, T)
+ fvm::div(rhoPhiCp, T)
- fvm::laplacian(lambda, T)
);

solve
(
hEqn ==
- hs*fvc::ddt(rho, gamma) //Source term from Stefan condition
);

The source term derived from the Stefan condition takes care of the temperature gradient at the interface induced by the phase change.

Solver:

Like in interFoam, the solver works as follows:
  1. Solving gamma equation
  2. Solving coupled pressure and velocity equations
  3. NEW solving energy equation NEW
The solver is very unstable what, in my opinion is due to the couppling of gamma and energy. Please correct me when I am wrong. My questions are:

Is it really the coupling of gamma and energy, making the solver instable?
Is there a way to solve the coupled equations (relaxation)?

Thanks allot for your replies.

Best regards

Fabian
fabian_roesler is offline   Reply With Quote

 

Tags
coupling, interfoam, phase change, piso, solid/liquid


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Thermal phase change model Piti CFX 1 January 14, 2021 10:03
Two phase flow with phase change Ahmad Al-Zoubi CFX 1 November 26, 2008 03:59
How to model the solid-fluid phase change in CFX ohrmond CFX 2 May 26, 2006 06:27
thermal phase change question CFDflying CFX 1 February 18, 2004 04:10
compressible two phase flow in CFX4.4 youngan CFX 0 July 1, 2003 23:32


All times are GMT -4. The time now is 11:47.