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

melting problem: looking for appropriate solvers

Register Blogs Community New Posts Updated Threads Search

Like Tree167Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 30, 2014, 07:27
Default third solid phase for fins in solid liquid phase change
  #141
Senior Member
 
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18
fabian_roesler is on a distinguished road
Hi shakil

Well, I did not perform real conjugate heat transfer simulations with two different meshes for PCM and solid/gas like in chtMultiRegionFoam. However, I did some simulations to study the influence of fins on the overall melting process.
What id did basically was to add another, third phase to my solver with new thermophysical properties. The energy conservation equation doesn't change and for the momentum conservation equation I introduce a switch off technique that keeps a zero velocity in the fin. I posted the solver in this thread (post #81):

http://www.cfd-online.com/Forums/ope...tml#post467203

Hope this tip pokes you into the right direction. Alternatively you could implement the solid/liquid phase change into chtMultiRegionFoam.

Cheers

Fabian
fabian_roesler is offline   Reply With Quote

Old   July 3, 2014, 09:21
Default multi-species solidification
  #142
Member
 
Join Date: Jul 2010
Posts: 37
Rep Power: 15
steph79 is on a distinguished road
Hello everyone,

I wish to model the solidification of water -> ice in the presence of a gas such as air, just in a box as a simple test case. My question is would this be possible using the convMeltFoam solver?

As such I want to create a hybrid case somewhere between damBreak (interFoam) and convMeltFoamOF230.

Having looked at the convMeltFoamOF230 example I'm a little confused as to the significance of the alpha3 scalar field in the initial 0 folder, particularly given that the solver proceeds without writing it out to file. I understand the concept of using a Darcy constant but I'm still not sure if it needs to be there.

Thanks.
steph79 is offline   Reply With Quote

Old   July 4, 2014, 03:43
Default compressibleInterFoam and convMeltFoam
  #143
Senior Member
 
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18
fabian_roesler is on a distinguished road
Hi steph

I did exactly that within by PhD thesis. I defended the thesis one month ago and it will be published soon. Unfortunately it is written in German. I combined the compressibleInterFoam solver with my new melting solver based on the convMeltFoam. The density of the PCM is no longer described by means of a boussinesq approximation but by a temperature dependent density in all terms of the conservation equations. This makes it possible to simulate volume change during melting and solidification in a closed volume/capsule.
As soon as my thesis is published, I will post at least parts of the solver here.

Cheers

Fabian
fabian_roesler is offline   Reply With Quote

Old   July 4, 2014, 04:04
Default
  #144
Member
 
Join Date: Jul 2010
Posts: 37
Rep Power: 15
steph79 is on a distinguished road
Quote:
Originally Posted by fabian_roesler View Post
Hi steph

I did exactly that within by PhD thesis. I defended the thesis one month ago and it will be published soon. Unfortunately it is written in German. I combined the compressibleInterFoam solver with my new melting solver based on the convMeltFoam. The density of the PCM is no longer described by means of a boussinesq approximation but by a temperature dependent density in all terms of the conservation equations. This makes it possible to simulate volume change during melting and solidification in a closed volume/capsule.
As soon as my thesis is published, I will post at least parts of the solver here.

Cheers

Fabian
That's great. When you've finished translating your thesis into English let me know... Natürlich mache ich Spaß. Es gibt die Möglichkeit, dass ich Ihre Doktorarbeit lesen kann. Falls ich Ihre Doktorarbeit/Code nicht verstehe, wegen meines schlechten Deutsches, dann werde ich mit Ihnen oder meinem Professor, der auch ein Deutscher ist, sprechen.

In all seriousness that sounds like a sensible approach. I look forward to seeing the code.
steph79 is offline   Reply With Quote

Old   July 5, 2014, 15:23
Default
  #145
Senior Member
 
Join Date: Jan 2010
Location: Stuttgart
Posts: 150
Rep Power: 16
Chrisi1984 is on a distinguished road
Hello Fabian,

thanks for the solver that also runs in parallel.

Just as information for others: The solver that Fabian recently posted for parallel usage was made for OF 2.3.

Kind regards
Chrisi
Chrisi1984 is offline   Reply With Quote

Old   July 10, 2014, 07:27
Default
  #146
New Member
 
Akash
Join Date: Jun 2014
Location: Oslo
Posts: 29
Rep Power: 11
pakanatiakash is on a distinguished road
Hullo All

I am new to Foam but I have been trying to simulate 3D melting phenomena using AVL Fire for my master thesis. AVL works well for hexa mesh but when i go for a tetra mesh it diverges. Now, this has to got me to investigate the possibility of running my simulation in Foam. I set up the case with Foam (thanks to the solver developed by Fabian). Its running well and I can already see some melting.

But the problem I have is : I had to resolve the mesh near heater elements to make sure correct transfer of heat flux occurs. But this has made my calculation very expensive. The reason is I have varying cell size and my max courant number is close to one. But when it calculates at the fine cells, the mean courant number is quite small, of the order 1e-5. I am thinking this is slowing down my calculation. Could anyone kindly tell me -

1) Is it necessary to have a finer/finest resolution near heater elements?

2) If it is necessary, then is there any way to solve the issue of slower convergence by somehow trying to work around the courant number issue?

Cheers!
pakanatiakash is offline   Reply With Quote

Old   July 10, 2014, 14:40
Default Increase outer correctors and maxCO
  #147
Senior Member
 
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18
fabian_roesler is on a distinguished road
Hi

as the solver is based on the PIMPLE algorithm you can increase your max Co above one. This is achieved by outer Simple iterations and thus, the conservation equations can be under relaxed. This could give you a boost, as the number of inner iterations for energy conservation should more or less stay the same for one time step. This is just a guess but try the following:

maxCo 5
nCorrectos 1 or 2
nOuterCorrectors 10
lower the number of maximum iterations for alpha to say 10 to 15
add some under relaxation factors and convergence control

If you play with these options you should get some speedup. Moreover you could use GAMG solver for pressure and smoothSolver for the other equations. And moreover, try to use more CPUs

Cheers Fabian
fabian_roesler is offline   Reply With Quote

Old   July 17, 2014, 08:15
Default
  #148
New Member
 
Akash
Join Date: Jun 2014
Location: Oslo
Posts: 29
Rep Power: 11
pakanatiakash is on a distinguished road
Thanks for the inputs Fabian. I played around a bit and looks like Courant no of 10 gives the fastest time possible. Maybe reducing the nCorrectors to 1 (I have two) might boost my speed up further more. But the overall simulation time is in acceptable range for now. I could do with more CPUs but i am very much limited to 30 cores.

Will post here again if i find something new or have further issues!

Cheers
pakanatiakash is offline   Reply With Quote

Old   July 24, 2014, 08:36
Default
  #149
New Member
 
Akash
Join Date: Jun 2014
Location: Oslo
Posts: 29
Rep Power: 11
pakanatiakash is on a distinguished road
hullo

I am a little stuck up with boundary conditions for wall. Let me explain. I am solving a 2D melting problem for comparison with AVL Fire. I have a surface named THOT and it is at a temperature of 330K. Rest of the domain has adiabatic wall condition with the IC of the medium being a solid at a temperature below the freezing point. I have run simulations by taking this condition in the T file in 0 folder.

THOT
{
type fixedValue;
value uniform 330;
}

Now I want to change this condition in such a way that the value of 330K is alloted to THOT only at the 0 time step. It should not remian fixed throughout the simulation. Rather the temperature at THOT has to be calculated at every time. How can I do that? Would be glad to hear some suggestions

Cheers
pakanatiakash is offline   Reply With Quote

Old   July 24, 2014, 09:05
Default
  #150
Senior Member
 
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18
fabian_roesler is on a distinguished road
Well, do you have a fixed heat flux through the wall or is it an adiabatic wall? Second would be zeroGradient and first depends on what you intend to simulate. For example heat transfer through a wall and an outer/infinite temperature is implemented by

Code:
   myPatch
   {
       type            wallHeatTransfer;
       Tinf            uniform 500;
       alphaWall       uniform 1;
   }
In general: Have a look into the OpenFOAM C++ documentation
http://foam.sourceforge.net/docs/cpp/a10483.html

Cheers

Fabian
fabian_roesler is offline   Reply With Quote

Old   July 25, 2014, 04:30
Default
  #151
New Member
 
Akash
Join Date: Jun 2014
Location: Oslo
Posts: 29
Rep Power: 11
pakanatiakash is on a distinguished road
Hullo Fabian

I am sorry but there was no problem in my simulation actually. I was making a visualization error in AVL Fire. I took a sample test case(2D) to do some comparison of Foam and Fire. A 2D block with one face being heated at 330K and all other faces at adiabatic conditions. The fluid properties are of AdBlue. All this would form a basis of my master thesis later on and that is the reason I did not take standard test cases available in literature. The dimensions of box is 0.1X0.1X0.003. The region is initially assumed to be solid.

The problem is the melting profiles are not the same for the same BC and IC. I have attached the plots for simulation results at the end of 600 seconds. Can you advise on where I might be going wrong.

Cheers

foam.jpg

fire.jpg
pakanatiakash is offline   Reply With Quote

Old   July 25, 2014, 04:31
Default
  #152
New Member
 
Akash
Join Date: Jun 2014
Location: Oslo
Posts: 29
Rep Power: 11
pakanatiakash is on a distinguished road
And yes, the profile with higher melting is from openfoam....
pakanatiakash is offline   Reply With Quote

Old   July 31, 2014, 02:33
Default More info
  #153
Senior Member
 
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18
fabian_roesler is on a distinguished road
Could you post your setup for OpenFOAM? blockMeshDict, fvSolution, fvSchemes, transportProperties and controlDict. With a litle bit more info the answer could be much more specific.

Cheers Fabian
fabian_roesler is offline   Reply With Quote

Old   August 1, 2014, 05:26
Default Why am I getting totally different result using the convMeltFoam (parallel) on OF211?
  #154
Member
 
YS
Join Date: Jan 2010
Posts: 93
Rep Power: 16
Ya_Squall2010 is on a distinguished road
As shown below and the case setup have been attached as well.

alpha1.jpg

T.jpg

U.jpg

PCMCase.tar.gz
shuisheng likes this.
Ya_Squall2010 is offline   Reply With Quote

Old   August 1, 2014, 05:51
Default Vortices during melting of metal at a vertical wall
  #155
Senior Member
 
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18
fabian_roesler is on a distinguished road
Well, from your transportProperties I can see that you simulate a metal PCM (if I may guess I'd say it is Gallium). Moreover I guess you have a fine mesh.
Have a look into the literature. There you will find lots of articles that describe the melting of metals at a vertical wall. Most authors discovered the formation of several vortices/eddies along the wall. The numerical simulation of the metal melting at vertical walls is very much mesh dependent. So that’s why your results differ from the experimental results from Gau and Viskanta. You dug up a very up-to-date problem that is heavily discussed in literature.

Cheers

Fabian
shuisheng likes this.
fabian_roesler is offline   Reply With Quote

Old   August 4, 2014, 23:16
Default
  #156
Member
 
YS
Join Date: Jan 2010
Posts: 93
Rep Power: 16
Ya_Squall2010 is on a distinguished road
Quote:
Originally Posted by fabian_roesler View Post
Well, from your transportProperties I can see that you simulate a metal PCM (if I may guess I'd say it is Gallium). Moreover I guess you have a fine mesh.
Have a look into the literature. There you will find lots of articles that describe the melting of metals at a vertical wall. Most authors discovered the formation of several vortices/eddies along the wall. The numerical simulation of the metal melting at vertical walls is very much mesh dependent. So that’s why your results differ from the experimental results from Gau and Viskanta. You dug up a very up-to-date problem that is heavily discussed in literature.

Cheers

Fabian
Thanks for reply. I am following, however, the parameters tabulated in table 1 of your <Heat Mass Transfer> paper on 2011. The only thing I have changed is that I tripled the mesh resolution used in your paper. Why different meshes are giving totally different solutions? Backed up by the experiment conducted by Gau and Viskanta, am I right to say that the converged result on the finer mesh was wrong? But how could it be?
mikulo likes this.
Ya_Squall2010 is offline   Reply With Quote

Old   August 5, 2014, 02:46
Default
  #157
Senior Member
 
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18
fabian_roesler is on a distinguished road
Hi

I do not have access to my literature at the moment. However, what I remember is that the experiments by Gau and Viskanta where stopped at certain times after start of melting; the liquid phase was dumped and the phase front at the remaining solid phase was measured. Then the measurement was restarted and stopped at the next breakpoint. This lead to uncertain results. Campbell and Koster (Visualization of liquid-solid interface morphologies in gallium subject to natural convection) repeated the measurements with a X-Ray analysis and obtained different results. In the younger literature, you will find more and more articles on the phenomena of multiple vortices when melting metal at a vertical wall. Moreover, the results in my paper where conducted with a different solver than the one posted in the forum. I would say your results look reasonable.
Try to make a mesh refinement study. Start with the resolution of Brent and Voller and go up to half a million cells.

Cheers Fabian
fabian_roesler is offline   Reply With Quote

Old   August 5, 2014, 05:45
Default
  #158
New Member
 
Akash
Join Date: Jun 2014
Location: Oslo
Posts: 29
Rep Power: 11
pakanatiakash is on a distinguished road
Hullo Fabian

I am not at liberty to disclose the properties of PCM. But I feel that Boussinesq approximation is introducing some error here. The approximation is I believe valid for a difference of 2 degrees for water and the PCM i am using is also comparable to water to an extent with respect to density and other properties. But in my setup, I have a temperature difference of 40K between the frozen solid and heat source. Will this introduce some sort of numerical error because fundamentally boussinesq approximation works only for a small range of temperatures?


Cheers
pakanatiakash is offline   Reply With Quote

Old   August 5, 2014, 07:17
Default
  #159
Senior Member
 
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18
fabian_roesler is on a distinguished road
Yes sure, the boussinesq approximation is only valid for small temperature differences. However, the error one faces is not that big and the flow field will not change entirely. I also programed a solver with polynomial temperature dependent density. The simulation domain has a small outlet to account for volume expansion. For the simulations and experiments I compared in my thesis, the only difference was a slightly faster melting of the boussinesq approximation case. However, the PCM I studied was a paraffin with totally different transport and thermal properties.

Cheers

Fabian
fabian_roesler is offline   Reply With Quote

Old   August 5, 2014, 09:14
Default
  #160
New Member
 
Akash
Join Date: Jun 2014
Location: Oslo
Posts: 29
Rep Power: 11
pakanatiakash is on a distinguished road
Yes, the flow field did not change entirely. When i compare the result with AVL Fire, the difference in profile can be observed. This probably comes with the way the solver is implemented in Fire. I am also noticing a slightly higher melting in openFoam.

Do you have a specific paper/reference for the mathematical formulation of the solver you implemented. Reading that would come in handy for me.

Cheers
pakanatiakash is offline   Reply With Quote

Reply

Tags
melting openfoam


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
Melting and solidification with free surface problem? cqlwj123 CFX 6 July 25, 2013 02:46
Can I solve this problem by Fluent? Kai_kc FLUENT 1 October 27, 2010 05:29
natural convection problem for a CHT problem Se-Hee CFX 2 June 10, 2007 06:29
Adiabatic and Rotating wall (Convection problem) ParodDav CFX 5 April 29, 2007 19:13
Melting Problem M FLUENT 0 April 29, 2007 16:07


All times are GMT -4. The time now is 10:29.