melting problem: looking for appropriate solvers
Did anybody solve melting problem with OpenFoam. Are there any appropriate solvers exist?
|
meltFoam
1 Attachment(s)
1) here is a solver i found some months ago in forum so if you search in forum you maybe find more
2) to use this solver, compile it with wmake command 3) it has a test case ;) too |
many thanks i'll try it asap
|
New non-isothermal melting solver
2 Attachment(s)
Hi
I was writing a new melting solver for non-isothermal phase change. It can be used for isothermal melting as well. In the near future I want to combine meltFoam with my new solver which is significantly faster than the old solver. I although wrote an article about my work. Have a look here: F. Rösler, D. Brüggemann (2011): Shell-and-tube type latent heat thermal energy storage: numerical analysis and comparison with experiments. Heat and Mass Transfer, Vol. 47 Issue 8 , 1027-1033, DOI: 10.1007/s00231-011-0866-9 http://www.springerlink.com/content/b1tp01k2u7q8j432/ What do you plan to do? Regards Fabian Attachment 9805 Attachment 9806 |
Quote:
It's been written for openFoam 1.3. I've managed to compile it after some minor changes for openfoam v2.01 .It works fine. Thanks again, Serge |
yourwelcome, you can pay it forward :D
by putting your modified solver here for other users use ;) be lucky |
Quote:
Hello. Your solver also works after some minore changes. Very fast for testcase geometry |
Re: Melting problem
Quote:
I don't quite know what you mean with moving spherical heat source. But it sounds to me like a boundary condition, right? So it must be possible to attach my solver to this problem. Glade you like my solver. I'm still working on it to allow moving rigid body (solid phase) and volume expansion of the melt into a gaseous phase with volume-of-fluid method. Regards Fabian |
I have a ball with fixed T gradient on the boundary. this ball is placed into tube full of wax. Your solver acts very well with such problem.
Now i have new problem. I want make the ball moving in the tube. I've tried to setup the boundary of the ball to type movingWallVelocity and run the case. Everything is good but a cant see any boundary displacement in ParaFoam. Any ideas? |
1 Attachment(s)
Hello everybody,
Quote:
|
Quote:
What Stefan problem testcase do you mean? Where can i find it? |
Hello Serge,
and welcome back to the thread. The Stefan Problem or Stefan Task is a classical testcase of solidification or melting, in fact where a moving boundary is met. The problem has an analytical solution depending on the various possible boundary conditions and as it is but 1 dimensional, it is very fast to validate parts of the code. Try the key words "Stefan task solidification melting" in google or google scholar. I have just tried it and received lots of good hits. Have a nice evening, Anja |
Quote:
yes, i know about it. I asked you about testcase for openfoam. Did you mean galliumErfMelting testcase or something else? |
Stefan Testcase
Hi
I used the gallium melting test case by Gau and Viskanta [Gau C. and Viskanta R.: Melting and Solidification of a Pure Metal on a Vertical Wall, Journal of Heat Transfer, 1986, 108(1), pp. 174–181] for validation. However there are two Stefan problem test cases that are also often used when it comes to melting simulation. The one phase or two phase Stefan problem. Have a look into Cranks book [Crank J.: Free and Moving Boundary Problems, 1984, Oxford University Press, Oxford]. Regards Fabian |
Quote:
I used the testcase of Fabian, the gallium melting and the Stefan Problem. Regards, Anja |
Hi
I am trying to Compile the meltFoam.C , but I wasn't succesful because it was made for an older version - I had OpenFOAM-2.1.0 . and while compiling it gave me an error message related to readSIMPLEControls.H: No such file or directory Any suggestions how to solve that please ? Thanks David |
1 Attachment(s)
Hello David,
this I not trivial for me either as the solver was coded in 1.4.1, or at least that is the tag in the test case. Also, the test case proposes icoFoam, a PISO based solver, to solve the test case. I tried to rewrite meltFoam in 2.1.0 using the SIMPLE Algorithm but I found far more similarities in coding with the icoFoam solver in 2.1.0. Therefore, and as my try for the meltSimpleFoam does compile but not solve the test case, here is my idea for the meltIcoFoam in 2.1.0 . For me, it compiles only with warnings and the rough test case given earlier in this thread works alright. I can't guarantee for anything. I hope this is a help for you, Regards, Anja |
compilation meltFoam
Hi
The meltFoam solver is based on the old buoyantBoussinesqPisoFoam solver as buoyancy is taken into account. You should be able to translate the solver to OpenFOAM 2.1.x. I did that few month ago but without comments and bad syntax. Maybe I can post the solver for OF_2.1.x after a small revision in the next days if you still need it :). Regards Fabian |
new MeltFoam solver for OF 2.1
1 Attachment(s)
Hi all
I posted that it might take some time to review the meltFoam solver and port it from OF_1.7 to OF_2.1 but I felt like doing it instantly. So here you go :). I hope you enjoy it. Regards Fabian |
Hello,
thanks for the code Fabian, nice to see that I did a good job with the changings of erfConvectiveMeltingPimpleFoam posted here in #10 earlier ;-) As far as my post on meltIcoFoam goes, I thought David was asking for an adapted coding of the solver in post #2 and that one is based on 1.4.1. Thanks again for your code in general, I am having fun with it. Anja |
isothermal phase change
Hi
Sorry, I messed up the two solvers and thought that David needed my solver for OF_2.1. I once compiled the meltFoam solver for isothermal phase change problems for OF_1.7. I remember the problem you are talking about. You can go for icoFoam but I would suggest using the buoyantBoussinesPimpleFoam. You can use pimpleControls instead simpleControls in the old solver. However syntax changed a little bit during the years. Regards Fabian |
Hi,
I have absolutely no idea which of the solvers David meant but know he has both and you additional ideas. Thanks for the like. Regards, Anja |
Thanks Fabian and Anja , this had been helpful to me and I agree , i think that buoyantboussinesqFoam is more suitable
|
1 Attachment(s)
Hello, AnjaI also modified meltFoam, instead of using enthalpy based update like yours I used temperature based update for my liquid fraction. All the others are similar to yours. But my results are not correct, do you have any suggestions? Thanks in advance.
|
linear step and continuous liquid fraction function
Hi Chaolian
Nice that somebody else then Anja and I are interested into solid/liquid phase change problems. As you already know, the linear liquid fraction is the standard case from literature as proposed by many authors. There are some predictor corrector methods to update temperature to be consistent with the enthalpy-temperature-curve. This is necessary as the enthalpy equation is non-linear. In the case of a continuous liquid fraction function, you can substitute the function into the energy conservation equation. The drawback is that you still have a non-linear function. But as you do not solve for the liquid fraction anymore, the non-linear behavior is quite small. The error is small and so no or only a few iterations are necessary to solve the equation. I once programed a solver for the linear function using the Brent et al. corrector method and some newer method by Voller. However the solver was not very stable and still 20 and more iterations for the temperature were necessary for solving. Hope this helps Best wishes Fabian |
Quote:
It's very nice to get your reply. I totally agree with you that your erf fitting approach, and some other predictor corrector method are better than classical linear approach. What I want to do is just try to implement the classical approach as a good practice to learn OpenFOAM structure and coding syntax, etc. Many thanks for your reply and comments, Best, Chao |
Quote:
Now I'm wondering if you have made any progress on adding motion to the solid region. It seems like it is a little more complicated than simply adding a DC*(volVectorField solidVelocity) term to the explicit terms of the momentum equation. I tried that and the solution won't converge. Any ideas? |
Hello Tim,
nice to see that this thread does put together people interested in solving for solidification with OpenFOAM. As far as your question is concerned, I do not know why your code does not converge. I started from the updated code I posted, everything is still transient although I am dealing with continuous casting and do have quasi steady-state conditions as well. Then I added in the "createFields.H" the following field: Code:
Info<< "Reading field Us\n" << endl; Code:
fvVectorMatrix UEqn The Us field, you first copy the U file, then you change for your velocities - if they are that easy to be got. I am dealing with a curvilinear geometry, so I do produce my Us velocity field using a Stokes solution, that means I do use simpleFoam with the exact same region and boundaries but very high viscosity. Then, I do copy the final velocity field to be my Us. I hope that will help you. Regards, Anja |
Thanks Anja! It looks like that is basically the same thing that I was trying. I did a little more investigating and found that my problem was related to need for greater relaxation. I had my T relaxationFactor set to 0.5 but I needed it at 0.2 for my problem. I am guessing this is related to the interaction between the complex temperature/velocity boundary condition that I am using and the constant velocity of the solid region. Happily my solution is converging now.
|
close-contact melting
Hi Anja,
hi Tim I can just confirm your steps to include solid movement into the solver. I used the following: Code:
fvVectorMatrix UEqn Best wishes Fabian |
Quote:
|
momentumPredictor
Hi,
the U solver is only necessary when using a momentumPredictor step in PISO or PIMPLE. I don't do the predictor step as it does not help convergence for the melting case. Without predictor step, U is corrected after the pressure equation. Regards Fabian |
Concentration equation
It is good to see people are working on melting problem. Have you guys ever tries to include species equation in your codes? That is what I am working on right now. Any comments?
|
Quote:
|
Species
Hi there
No, never tried that. But it should not be that hard to implement it. Just add another volScalarField C and solve for it after the energy conservation equation. You also have to use another liquid fraction function and an additional one for the concentration. As all melting solvers here in the thread refer to the enthalpy porosity method by Voller and Prakash you could have a look for their solver. They wrote an article on the method for additional species transport. Regards Fabian |
Fabian:
Thanks for your answer, I really appreciate it. However, the problem I am working on is somehow different so I am not sure I can use your solver. In your paper you have updated liquid fraction by an error function (equation (6) in the paper), but I want to use Lever Micro-segregation rule for liquid fraction, and since it is numerical very unstable so I have implemented the liquid fraction updating scheme by C. Prakash and V. Voller. in "ON THE NUMERICAL SOLUTION OF CONTINUUM MIXTURE MODEL EQUATIONS DESCRIBING BINARY SOLID-LIQUID PHASE CHANG, Numerical Heat Transfer, Part B:Volume 15, Issue 2, 1989" I will updated you guys in this thread if i find sth interesting. |
Hi Fabian
Would you please let me know why you have used "mesh.solver( .select(finalIter))" in your code? What does this statement do? |
p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.fin alInnerIter())))
Hi Yahoo
Have a look into pisoFoam solver. There you have this statement split up. In most solvers, you specify two different tolerances. One for the last iteration and the other for all previous iterations. An example: Code:
Code:
Regards Fabian |
Hi Guys
Have you tried to compile erfConvectiveMeltingPimpleFoam.C (Fabian's code for melting) on OpenFOAM 2.2.0? I am getting this compile error: make: *** No rule to make target `/opt/OpenFOAM-2.2.0/src/finiteVolume/lnInclude/newFvPatchField.C', needed by `erfConvectiveMeltingPimpleFoam.dep'. Stop. |
OF2.1 meltFoam
Hi,
you could just use the solver for OF2.1 I posted here :confused:: http://www.cfd-online.com/Forums/ope...tml#post365835 Regards Fabian |
All times are GMT -4. The time now is 22:02. |