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

Melting using icoReactingMultiPhaseInterFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 2 Post By TeresaT
  • 1 Post By flo(w)

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 3, 2020, 14:29
Question Melting using icoReactingMultiPhaseInterFoam
  #1
Member
 
Join Date: Mar 2019
Posts: 81
Rep Power: 7
mm66 is on a distinguished road
Dear Foamers,

I am trying to simulate the melting process of a solid body (phase change material) in 3D using icoReactingMultiPhaseInterFoam (first question: is this the best solver for melting? ). I included the buoyant melted movement by Boussinesq as the equation of state for the liquid. The problem is that when I run the simulation, it goes fine until towards the end of melting when suddenly the Courant number goes higher and higher until the alpha value becomes negative... I tried this in 2D and it never happened. But in 3D despite using a relatively fine mesh this happens... I also tried with adjustableRunTime which went down to 10^-6... I also checked the mesh quality:

Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Time = 0

Mesh stats
    points:           206283
    faces:            2290188
    internal faces:   2234676
    cells:            1131216
    faces per cell:   4
    boundary patches: 3
    point zones:      0
    face zones:       0
    cell zones:       0

Overall number of cells of each type:
    hexahedra:     0
    prisms:        0
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    1131216
    polyhedra:     0

Checking topology...
    Boundary definition OK.
    Cell to face addressing OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
    Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces...
    Patch               Faces    Points   Surface topology
    Symmetry            19091    9950     ok (non-closed singly connected)
    Tube                18819    9679     ok (non-closed singly connected)
    Wall                17602    9007     ok (non-closed singly connected)

Checking faceZone topology for multiply connected surfaces...
    No faceZones found.

Checking basic cellZone addressing...
    No cellZones found.

Checking geometry...
    Overall domain bounding box (0 0 0) (0.175 0.175 0.5)
    Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
    Mesh has 3 solution (non-empty) directions (1 1 1)
    Boundary openness (1.30135e-17 -3.18322e-16 2.85069e-16) OK.
    Max cell openness = 2.33158e-16 OK.
    Max aspect ratio = 4.71177 OK.
    Minimum face area = 6.46877e-07. Maximum face area = 4.8044e-05.  Face area magnitudes OK.
    Min volume = 2.68775e-10. Max volume = 8.59991e-08.  Total volume = 0.01183.  Cell volumes OK.
    Mesh non-orthogonality Max: 52.2945 average: 14.4077
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 0.623961 OK.
    Coupled point location match (average 0) OK.

Mesh OK.

End
Here is the phaseProperties file:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v1812                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      phaseProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
type    massTransferMultiphaseSystem;

phases  (solid liquid);

liquid
{
    type            pureMovingPhaseModel;
}

solid
{
    type            pureStaticSolidPhaseModel;
}

interfacePorous
(
    (solid and liquid)
    {
        type            VollerPrakash;
        solidPhase      alpha.solid;
        Cu              1e5;
    }
);

massTransferModel
(
    (solid to liquid)
    {
        type            Lee;
        C               40;
        Tactivate       358.15;
    }
);

// ************************************************************************* //
And here is the controlDict:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v1812                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application     icoReactingMultiphaseInterFoam;

startFrom       latestTime;

startTime       0;

stopAt          endTime;

endTime         4000;                                                                                                                                                                                           deltaT          0.01;                                                                                   
writeControl    runTime;

writeInterval   5;

purgeWrite      0;

writeFormat     binary;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable no;

adjustTimeStep  no;

//maxDeltaT       0.01;

//maxCo           1.;
//maxAlphaCo      1.;
//maxAlphaDdt     2.3;
//maxDi           25;

// ************************************************************************* //
Any ideas? Is there a way let's say in fvOptions to set upper and lower limits for the alpha value between [0,1]?

Thanks,
MJ

PS: Now I am trying to further refine the mesh, hoping it is possible to do so...

Last edited by mm66; October 4, 2020 at 11:19.
mm66 is offline   Reply With Quote

Old   November 24, 2020, 23:55
Default
  #2
Member
 
Neilson Whit
Join Date: Aug 2011
Posts: 74
Rep Power: 15
wolfindark is on a distinguished road
same problem i have....
wolfindark is offline   Reply With Quote

Old   November 25, 2020, 03:41
Default
  #3
Member
 
Teresa
Join Date: Nov 2015
Location: germany
Posts: 63
Rep Power: 11
TeresaT is on a distinguished road
Hi,

I think this is the right kind of solver. I am working with icoReactingMultiphaseInterFoam as well but on a different topic. A Laser melts my material. You said "towards the end" and "same problem" so this happens when both of your solids are melted completely and there is only liquid left?

Regards,
Teresa
TeresaT is offline   Reply With Quote

Old   November 25, 2020, 03:53
Default
  #4
Member
 
Neilson Whit
Join Date: Aug 2011
Posts: 74
Rep Power: 15
wolfindark is on a distinguished road
Quote:
Originally Posted by TeresaT View Post
Hi,

I think this is the right kind of solver. I am working with icoReactingMultiphaseInterFoam as well but on a different topic. A Laser melts my material. You said "towards the end" and "same problem" so this happens when both of your solids are melted completely and there is only liquid left?

Regards,
Teresa

I also try to simulate laser melting. but at the same time liquid metal evaporation. When I added liquid to gas evaporation, simulation diverges.
wolfindark is offline   Reply With Quote

Old   November 25, 2020, 04:33
Default
  #5
Member
 
Teresa
Join Date: Nov 2015
Location: germany
Posts: 63
Rep Power: 11
TeresaT is on a distinguished road
Liquid to gas is my next goal and I just startet the first simulation with it included. I first wanted to see that melting works fine.

I will see if my case will diverge too.
TeresaT is offline   Reply With Quote

Old   November 25, 2020, 09:52
Question
  #6
Member
 
Join Date: Mar 2019
Posts: 81
Rep Power: 7
mm66 is on a distinguished road
Thanks for replying
Mine is pure melting of a solid. It runs well let's say up to 60% liquid (this value changes based on mesh quality, etc.) and then Courant number begins increasing until it messes everything (alpha becomes negative and divergence happens...)
Have tried everything that might affect this (changing settings in fvSolutions, very fine mesh, etc.) still getting the same error...
Any idea/input is appreciated...

Regards,
MJ
mm66 is offline   Reply With Quote

Old   November 25, 2020, 11:39
Default
  #7
Member
 
Teresa
Join Date: Nov 2015
Location: germany
Posts: 63
Rep Power: 11
TeresaT is on a distinguished road
You probably have checked the quality of your mesh and if it crashes when liquid flows to a particular area?

Checking the timesteps prior to crashing for high velocities or pressure jumps could help with this.

In my case with adjustable timeSteps I have a deltaT of 2e-7, but my mesh is about a factor of 1000 smaller.

Does your case crash at some point and do you have the error message at the end of the log at hand?
TeresaT is offline   Reply With Quote

Old   November 25, 2020, 15:02
Default
  #8
Member
 
Join Date: Mar 2019
Posts: 81
Rep Power: 7
mm66 is on a distinguished road
Quote:
Originally Posted by TeresaT View Post
You probably have checked the quality of your mesh and if it crashes when liquid flows to a particular area?

Checking the timesteps prior to crashing for high velocities or pressure jumps could help with this.

In my case with adjustable timeSteps I have a deltaT of 2e-7, but my mesh is about a factor of 1000 smaller.

Does your case crash at some point and do you have the error message at the end of the log at hand?
Thank for you prompt response...
I always check the quality of the mesh before running the simulations. Indeed, they have a very good quality but refining it has not resulted in convergence yet
I also ran the simulations with/without adjustableTimeStep. With it, the timestep goes down to 10^-100
I tried several meshes, every time refining it further, same error appears every time
Attached you can find the results I got from one of the simulations.
BTW, I ran these simulations on an HPC cluster. They only error that I got is:


Code:
===================================================================================
=   BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES
=   PID 1840 RUNNING AT n122.localdomain
=   EXIT CODE: 8                                                                                        =   CLEANING UP REMAINING PROCESSES
=   YOU CAN IGNORE THE BELOW CLEANUP MESSAGES
===================================================================================
   Intel(R) MPI Library troubleshooting guide:
      https://software.intel.com/node/561764
===================================================================================
Any ideas what might be causing this? Thank you very much.

Regards,
MJ
Attached Images
File Type: png Alpha.png (76.4 KB, 57 views)
File Type: png Courant.png (111.5 KB, 46 views)
File Type: png Temp.png (78.1 KB, 40 views)
File Type: png Residuals.png (169.2 KB, 39 views)
File Type: png Timestep.png (72.2 KB, 32 views)
mm66 is offline   Reply With Quote

Old   November 25, 2020, 15:16
Default
  #9
Member
 
Join Date: Mar 2019
Posts: 81
Rep Power: 7
mm66 is on a distinguished road
Quote:
Originally Posted by TeresaT View Post
You probably have checked the quality of your mesh and if it crashes when liquid flows to a particular area?

Checking the timesteps prior to crashing for high velocities or pressure jumps could help with this.

In my case with adjustable timeSteps I have a deltaT of 2e-7, but my mesh is about a factor of 1000 smaller.

Does your case crash at some point and do you have the error message at the end of the log at hand?
BTW, may I ask what you mean by "but my mesh is about a factor of 1000 smaller"?
mm66 is offline   Reply With Quote

Old   November 26, 2020, 03:19
Default
  #10
Member
 
Teresa
Join Date: Nov 2015
Location: germany
Posts: 63
Rep Power: 11
TeresaT is on a distinguished road
Hi MJ,

I have a gridwidth of 2.5 µm, I think a grid study will show that I am still to big. The over all domain is about 1x0.2x0.175 mm during my tests. That's was what I meant with mine beeing smaller.

The error code of MPI is not very helpful, at least not for me - doesn't spark any ideas.
What about your log file? The legends of your plots aren't always visible you might want to change that for better understanding.

Have you checked if there are high velocity gradients somewhere? Something happens between the 1500th and the 2000th Iteration and looking there might spark some ideas.

Regards,
Teresa
Edit:
One more thing: What Boundary Conditions do you use?

Last edited by TeresaT; November 26, 2020 at 10:55. Reason: added a question
TeresaT is offline   Reply With Quote

Old   November 26, 2020, 14:36
Default
  #11
Member
 
Join Date: Mar 2019
Posts: 81
Rep Power: 7
mm66 is on a distinguished road
Quote:
Originally Posted by TeresaT View Post
Hi MJ,

I have a gridwidth of 2.5 µm, I think a grid study will show that I am still to big. The over all domain is about 1x0.2x0.175 mm during my tests. That's was what I meant with mine beeing smaller.

The error code of MPI is not very helpful, at least not for me - doesn't spark any ideas.
What about your log file? The legends of your plots aren't always visible you might want to change that for better understanding.

Have you checked if there are high velocity gradients somewhere? Something happens between the 1500th and the 2000th Iteration and looking there might spark some ideas.

Regards,
Teresa
Edit:
One more thing: What Boundary Conditions do you use?
Hi Teresa,

Thanks for the clarification. My simulation domain is a quarter of a cylinder with 0.5 m height and 0.35 m in diameter.

The error code is not helpful at all. That is the only error that I have at the end of the log file...

I am terribly sorry for the legends. Attached please find the new plots with updated legends and titles.

I tried to access the files (from the server) to verify if there are high velocity gradients. But the server seems to be down... I will check this as soon as I can.

Regarding boundary conditions, there is no inlet or outlet to the domain, it is a confined solid material undergoing phase change, so I am using the following simple boundaries at the walls:

U: fixedValue uniform (0 0 0)
T: one side is fixedValue, the rest are zeroGradient
alpha.liquid: zeroGradient
alpha.solid: zeroGradient
p_rgh: fixedFluxPressure

I really appreciate your help.

Regards,
MJ
Attached Images
File Type: png Alpha.png (76.9 KB, 26 views)
File Type: png Courant.png (112.0 KB, 20 views)
File Type: png Residuals.png (172.2 KB, 21 views)
File Type: png Temp.png (77.1 KB, 17 views)
File Type: png Timestep.png (72.2 KB, 14 views)
mm66 is offline   Reply With Quote

Old   November 26, 2020, 15:12
Default
  #12
Member
 
Teresa
Join Date: Nov 2015
Location: germany
Posts: 63
Rep Power: 11
TeresaT is on a distinguished road
Hi MJ,
thanks for the new plots!

Maybe I only suggest the following because I don't understand you case completely but without an inlet/outlet or atmospheric boundary condition you might want to look at your pressure as well.

I hope looking at velocity/pressure and temperature fields will give some hints.

Good luck
Teresa
TeresaT is offline   Reply With Quote

Old   November 26, 2020, 15:19
Default
  #13
Member
 
Teresa
Join Date: Nov 2015
Location: germany
Posts: 63
Rep Power: 11
TeresaT is on a distinguished road
Quote:
Originally Posted by wolfindark View Post
I also try to simulate laser melting. but at the same time liquid metal evaporation. When I added liquid to gas evaporation, simulation diverges.
Today I tried to add condensation and encountered something strange. The simulation crashed at the start with an error:
kineticGasEvaporation does not exist....

Found out that these:
(solid to liquid) with positive model constant c
(liquid to solid) with negative model constant c
(liquid to gas) with positive model constant c
work fine and I see the corresponding effects But as soon as i try to add
(gas to liquid) with negative model constant c
kineticGasEvaporation becomes unknown.
However,:
(liquid to gas) with negative model constant c
works fine again. Now I just have to find out if the condensation really works.

No, condensation does not work yet. I see lot's of vapour with temperatures between 364.3 and 587.3 Kelvin while condensation should take place at 2743.
Juan Daniel and nobo like this.

Last edited by TeresaT; November 27, 2020 at 04:15. Reason: spelling and grammar *sighs; added info
TeresaT is offline   Reply With Quote

Old   December 11, 2020, 06:34
Default increasing Co
  #14
New Member
 
Join Date: May 2020
Posts: 7
Rep Power: 6
flo(w) is on a distinguished road
I also had some problems with a suddenly increasing Co number. I recognized that the problem comes from the interface between two phases. It seems as if this is a common problem of some solvers, that instabilities may arise at the interface between two phases. I could solve the problem by adding some porosity to the interface through something like this in the phaseProperties file:

interfacePorous
(
(solid and gas)
{
type VollerPrakash;
solidPhase alpha.solid;
Cu 1e7;
}
);
Juan Daniel likes this.
flo(w) is offline   Reply With Quote

Reply

Tags
alpha, melting, negative, openfoam 1812, phase change material


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
Stefan Problem : Tin Melting : Moving Boundary swparth OpenFOAM 0 September 21, 2017 15:53
Melting and Solidification Mansoor_shad FLUENT 0 April 23, 2017 14:37
melting in horizontal shell in tube, need help friends thermal energy FLUENT 0 January 9, 2014 18:33
melting of a pcm flex00 FLUENT 2 April 8, 2013 14:33
Simple Melting Problem flex00 FLUENT 0 March 15, 2013 06:10


All times are GMT -4. The time now is 04:46.