
[Sponsors] 
melting problem: looking for appropriate solvers 

LinkBack  Thread Tools  Search this Thread  Display Modes 
April 17, 2014, 03:13 

#121  
Member
Rohith
Join Date: Oct 2012
Location: Germany
Posts: 57
Rep Power: 11 
Hallo Zhipeng
Before Fabian answers you, i can give you some info. regarding this DC is a darcy constant which is used to switch off or stiff the velocity in the solid domain of a melting problem during phase change. It is derived from CamanKozeny equation used to solve porous flows. The interface between the solid and liquid is called as mushy zone which is treated as porous zone. Moreover Quote:
This was implemented by many researchers,but however voller and prakash paper is major cited of this kind. http://ac.elscdn.com/00179310879031...8aa918c64efc5d Thanks Rohith 

April 17, 2014, 06:51 

#122  
New Member
Zhipeng Zhou
Join Date: Mar 2014
Posts: 8
Rep Power: 10 
Hi Rohith , Thank you very much for your help . I will read the paper you recommended for more information . Moreover , I have some difficulties with the following code . Can you give me some explanation ?
Quote:


April 17, 2014, 07:41 

#123 
Member
Rohith
Join Date: Oct 2012
Location: Germany
Posts: 57
Rep Power: 11 
Hi Zhipeng
This is however, followed in major buoyancy bousinessq approximations in openfoam. According to my understanding, it is basically balancing the p_rgh ( buoyant pressure) and p(pressure) by settling reference values defined in Peqn. It is a small form of declaration however on the first place. Go through the OpenFOAM programmers guide for detail on all such definitions. Regards Rohith 

April 17, 2014, 08:06 

#124 
Senior Member
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 16 
Hi
this code snipped checks weather a reference cell is needed or not and sets the pRefValue to the reference cell pRefCell. In incompressible flow, pressure is relative (the solution does not depend on the actual value of the pressure but its gradient). Thus, in closed domains you have to specify pressure somehow. This is done by the reference cell. Code:
label pRefCell = 0; //number of the cell chosen to be the reference cell scalar pRefValue = 0.0; //pressure value, the reference cell should have setRefCell //Check if there is some data for the reference cell in fvSolution ( p, p_rgh, mesh.solutionDict().subDict("PIMPLE"), pRefCell, pRefValue ); if (p_rgh.needReference()) //Check if a reference cell is needed and set the value of the reference cell { p += dimensionedScalar ( "p", p.dimensions(), pRefValue  getRefCellValue(p, pRefCell) ); } Regards Fabian 

April 17, 2014, 09:22 

#125  
New Member
Zhipeng Zhou
Join Date: Mar 2014
Posts: 8
Rep Power: 10 
Hi ,
Thanks ! Both of you has give me great help . But can you explain me some thing about p_rgh ( buoyant pressure) and p(pressure) . Or can you send me a paper about this ? moreover , Fabian about this function Quote:
What's more , rhok is different in z direct, can we use p=p_rgh+gh*rhok Regards Zhipeng 

April 17, 2014, 10:14 

#126 
Senior Member
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 16 
Hi,
p_rgh is not the buoyant pressure. It is pressure p minus the static pressure (which is rho*g*h). So p_rgh is the dynamic pressure. As pressure is relative, you set p and p_rgh at the reference cell and calculate the p and p_rgh field relative to this cell. Cheers Fabian 

April 17, 2014, 14:34 

#127 
Member
Rohith
Join Date: Oct 2012
Location: Germany
Posts: 57
Rep Power: 11 
Hi Zhipeng
i am sorry for the false nomenclature. It is actually dynamic pressure and static pressure, as fabian said. He is absolutely right. Actually the Total pressure(p) is the sum of p_rgh and rhogh. The term rhogh actually comes from the formulation of bernoullis theorem, which makes the total pressure the sum of static and dynamic pressures. generally this rho*gh is computed through rhi*gravity*position of the cell center, this is due to the position of the computational cell. which is in physical sense is due to the virtue of its position. Thanks Rohith 

April 20, 2014, 08:15 
big temperature difference convection

#128 
New Member
Zhipeng Zhou
Join Date: Mar 2014
Posts: 8
Rep Power: 10 
Hello Fabian ,
your solver about melting uses the Boussinesq Approximation . But as you know , boussinesq approximation will bring in large error when the temperature didderent is big . I am calculating a melting problem about copper contact , and the temperature didderent is very big , can you tell me what solver is suited for my problem ? Thanks , Zhipeng 

April 24, 2014, 03:55 
temperature dependant density for all terms in all conservation equations

#129 
Senior Member
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 16 
Hi Zhipeng
You will not find a readymade solver for that. However, here is what I did for such problems: I switched from the Boussinesq approximation to a temperature dependent density for all terms in all conservation equations. As the density is calculated from temperature only, you can easily change the convMeltFoam solver for your needs (Keeps in mind that you still have an incompressible solver and you do not need the compressible mass conservation equation). I do not have access to my temperature dependent density melt solver now. So have a try  the changes are of minor kind. Regards Fabian 

April 30, 2014, 04:51 

#130 
New Member
Thilo Franke
Join Date: Mar 2014
Location: Bunswick
Posts: 4
Rep Power: 10 
Hello,
i took the solver of Fabian (convMeltfoam, Post 80/81) and implemented it in interFoam. Instead of using rhok and the boussinesq approximation i used a temperature depended rho i read in every iteration (compare Anja's post) everything is working (compiling and calculating) but when it comes to the results of Fabian (see attached pictures, the left one is with the untouched solver of Fabian, the right one is with extended interFoam) I'm wondering about two things: First the effect of the convection in Fabian's calculation is much bigger (see T and alpha) Second the values of p_rgh are much different. I didn't touch the pEqn of interFoam. But as p_rgh is the dynamic pressure my results look wrong. Do you have an idea why this is so? thank you in advance Thilo 

May 10, 2014, 04:52 
Isothermal melting

#131 
Senior Member
Mohammad Shakil Ahmmed
Join Date: Oct 2012
Location: AUS
Posts: 136
Rep Power: 12 
Hi Foamer's,
Can any one advice me whether the recent method (recently publish by Fabian:http://www.cfdonline.com/Forums/ope...problem5.html) is appropriate for the isothermal melting ? I'm trying to use the code for isothermal melting taking narrow temperature width (i.e. TlTs <0.5). Please suggest me, whether the method is good or not OR the appropriate method. Thanks in advance. #shakil 

May 15, 2014, 21:51 
Modifying the solver to include MultiRegion

#132 
New Member
David
Join Date: May 2012
Location: Canada
Posts: 12
Rep Power: 12 
Hi,
Thanks for this post. I found it very helpful for the foamers working in phase change materials. I need to modify Fabian's solver to solve for a multiregion problem, I know that my first steps should be looking into chtMultiRegionFoam. Any ideas on how can this be implemented ?? Thanks, David 

June 22, 2014, 11:19 
running solver in parallel

#133 
Senior Member
Join Date: Jan 2010
Location: Stuttgart
Posts: 150
Rep Power: 14 
Hi all,
first of all thank you for providing the solvers. I tried to run the convMeltFoam solver for the OF Versions 2.1 and 2.3. Both are running fine in serial. But I recognized that the simulation stops after some timesteps without crashing when I try to run the tutorial cases in parallel. I also tried it with another case in 3D with the same result: Running fine in serial and stopping in parallel. Does anybordy has an idea why the solver has problems in parallel runs? Did you discover similar problems? Thanks in advance! Kind regards Chrisi 

June 22, 2014, 11:27 
Running in parallel

#134  
Senior Member
Mohammad Shakil Ahmmed
Join Date: Oct 2012
Location: AUS
Posts: 136
Rep Power: 12 
Hi,
Have you checked the space available in your drive? I don't think it will cause any problem for running in parallel. One thing you can check, whether you used gSum instead of sum in the code, because sum will not work for parallel. Cheers shakil Quote:


June 23, 2014, 02:18 

#135  
Senior Member
Join Date: Jan 2010
Location: Stuttgart
Posts: 150
Rep Power: 14 
Hi Shakil,
thank you for your hint. Indeed there was used "sum" instead of "gSum" in the solver. But now I removed that function and it still stoping/crashing. On another machine the parallel run now ends up after 10 or 15 timesteps with the following error: Quote:
By the way: Other solvers run fine in parallel. So it should not be a general mpi problem. What can be the reason therefore? Kind regards Chrisi 

June 23, 2014, 13:19 

#136 
Senior Member
Mohammad Shakil Ahmmed
Join Date: Oct 2012
Location: AUS
Posts: 136
Rep Power: 12 
Hi Chrisi1984,
It seems a bit strange !!! Is it possible to upload your exact solver that you are compiled ? Cheers shakil 

June 23, 2014, 15:49 

#137 
Senior Member
Join Date: Jan 2010
Location: Stuttgart
Posts: 150
Rep Power: 14 
Hi Shakil,
attached you find the solver that I am using for version 2.1. It is nealy that solver that was posted in this thread few pages before: I hope you can help me finding the problem for the parallel simulation. Kind regards, Chrisi 

June 27, 2014, 09:09 

#138 
Member
Anja Miehe
Join Date: Dec 2009
Location: Freiberg / Germany
Posts: 48
Rep Power: 14 
Hello Chrisi,
the same which applies for sum and gSum has to be used for max and gMax. If you want to have the sum or the maximum of a field, which could be spread on several nodes when using parallel, the function name is gMax, not max. Thus, change line 31 in TEqn.H from Code:
residual = max(mag(alpha1.internalField()alpha1.prevIter().internalField())); Code:
residual = Foam::gMax(mag(alpha1.internalField()alpha1.prevIter().internalField())); Regards, Anja 

June 27, 2014, 09:29 
Parallel convMeltFoam

#139 
Senior Member
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 16 
Hi
attached you find the parallelized convMeltFoam solver. It runs parallel now after decomposing the case. I tested it on a 3D case with 10M cells. Regards Fabian 

June 28, 2014, 02:37 
convMeltFoam with conjugate heat transfer

#140 
Senior Member
Mohammad Shakil Ahmmed
Join Date: Oct 2012
Location: AUS
Posts: 136
Rep Power: 12 
Hi fabian_roesler,
Thanks for the parallelized convMeltFoam solver. Have you worked with the melting problem with conjugate heat transfer ? Any help regarding to this will be great for me. Thanks in advance shakil 

Tags 
melting openfoam 
Thread Tools  Search this Thread 
Display Modes  


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  SeHee  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 