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

Modelling of Melting and Solidification of Phase Change Materials

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Philipadebayo

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 25, 2022, 00:25
Default Modelling of Melting and Solidification of Phase Change Materials
  #1
New Member
 
Philip Adebayo
Join Date: May 2021
Posts: 1
Rep Power: 0
Philipadebayo is on a distinguished road
Dear All,

I am currently working on modelling of melting and solidification of phase change materials. I have been able to develop a solver using piecewise enthalpy-temperature relationship with the help of this thread. Total liquid volume fraction vs Time

I was able to validate the model with some cases in the literature.

Now, I want to implement the experimental enthalpy-temperature relationship based for binary mixture as defined in the attached picture.

I implemented the equation in openfoam in the T.Eqn from the mentioned thread as shown below

{

volScalarField h2 = (cpL - cpS)*(Ta - Tm)*log(mag(h1)) + L/h1;
fvScalarMatrix TEqn
(
fvm::ddt(cp, T)

+fvm::div(phi*fvc::interpolate(cp), T)
- fvm::laplacian(DT/rho, T)
==- fvc::ddt(h2)- fvc::div(phi, h2)

);

TEqn.relax();

TEqn.solve();

rhok = 1.0 - beta*(T - TRef);

volScalarField Tstar = (Ta - Tm)*alpha + Tm;

DH = DH + omegaDH*cp*(T - Tstar);

}

and in the source.H file as below

volScalarField h1 =(T - Ta)/(Tm - Ta);

forAll(mesh.cells(),celli)
{
if (T[celli] < Tm.value() && Tm.value()==T[celli])
{
h1[celli]= (T[celli]-Ta.value())/ (Tm.value()-Ta.value());

}
else
{
h1[celli]=1;
}

if (DH[celli] > L.value())
{
DH[celli] = L.value();
}
if (DH[celli] < 0)
{
DH[celli] = 0;
}

};

alpha=DH/L;

A = -C*sqr(scalar(1)-alpha)/(rho*(pow(alpha,scalar(3))+C1));


I was able to compile and run the solver but the melting front progression is faster than the piecewise function for the same simulation parameter. I suspect that I may not be implementing the enthalpy-temperature relationship in the right way. I would appreciate any help and insight on how to better implement this code.

Thank you.
Attached Images
File Type: png Screenshot 2022-04-24 092034.png (22.1 KB, 65 views)
nlymberis likes this.
Philipadebayo is offline   Reply With Quote

Reply

Tags
melting&solidification, openfoam, pcm


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
Verification of melting and solidification three phase model kuechenrole OpenFOAM Verification & Validation 4 May 10, 2020 11:47
Modelling of meat in the presence of solidification and melting cagri Fluent Multiphase 0 June 2, 2019 10:04
Melting Phase Change Materials sa har Main CFD Forum 0 July 21, 2018 02:08
solidification and melting (phase change ) Cfdpower Main CFD Forum 1 October 7, 2016 12:39
VOF with melting of Phase change materials sakil2k3 FLUENT 3 March 17, 2015 15:26


All times are GMT -4. The time now is 06:17.