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 16, 2017, 05:03
Default
  #261
New Member
 
Tiphaine Grandin
Join Date: Jun 2017
Posts: 4
Rep Power: 8
Typhain is on a distinguished road
Hello and thanks for the answer !
Yeah I know, there is lots of step between 2.1 and 5.0 but it work for meltFoam solver post at the bigining of the conversation...
Well I wil follow your advice and climb step by step. If it work I will share my solver for 5.0 version

Bye
Typhain is offline   Reply With Quote

Old   June 16, 2017, 05:09
Default
  #262
Member
 
a
Join Date: Oct 2014
Posts: 49
Rep Power: 11
cfd@kgp is on a distinguished road
Typhain, are you saying meltfoam got compiled in OF5.0?

if so, pls send the link of the solver

Thanks,
cfd@kgp is offline   Reply With Quote

Old   June 16, 2017, 05:26
Default
  #263
New Member
 
Tiphaine Grandin
Join Date: Jun 2017
Posts: 4
Rep Power: 8
Typhain is on a distinguished road
Here is the meltFoam solver for 5.0 OpenFoam.
And there is also the test case with gallium wich use meltFoam solver.
mySolvers.tar.gz
balamurugan_cfd and luks1910 like this.
Typhain is offline   Reply With Quote

Old   June 18, 2017, 10:28
Default
  #264
Member
 
Ricky
Join Date: Jul 2014
Location: Germany
Posts: 78
Rep Power: 11
kera is on a distinguished road
Hallo,

If I am not mistaken, from OpenFOAM 4.0 in order to access the internal values it make uses of "primitiveField()" instead of "internalField()" (as in the earlier versions) and hence the error with gMax.

try using this:

Code:
residual = gMax(mag(alpha3New.primitiveField()-alpha3.primitiveField()));
meanResidual = gSum(mag(alpha3New.primitiveField()-alpha3.primitiveField())*mesh.V())/gSum(mesh.V().field());
hope this helps!

Regards,
Ricky



Quote:
Originally Posted by Typhain View Post

Code:
residual = gMax(mag(alpha3New.internalField()-alpha3.internalField()));
meanResidual = gSum(mag(alpha3New.internalField()-alpha3.internalField())*mesh.V())/gSum(mesh.V().field());
And the error message is the folowing
Code:
TEqn.H:37:78: error: no matching function for call to ‘gMax(Foam::tmp<Foam::DimensionedField<double, Foam::volMesh> >)’
So I am a little bit confuse about gMax function, what should be the dimension of alpha3 to use it ?

thanks
__________________
If it is easy, then something is fishy!
kera is offline   Reply With Quote

Old   June 20, 2017, 05:26
Default
  #265
New Member
 
Tiphaine Grandin
Join Date: Jun 2017
Posts: 4
Rep Power: 8
Typhain is on a distinguished road
Hello Ricky,
First of all I'd like to thank you for the answer, and then thank you for the help. Using primitiveField() work as expected and thanks to you the compilation of convMelt_parallel_solver work.

There is also details on simulation that I have to correct but I think soon, I will post the solver uptated for OF5.0 and a testCase.

My mission now is to change the entry of the simulation. In deed, I want to change the nature of the boundaries conditions : instead of having temperature, I would like to work with thermal flux.
Maybe you have an idea, of how to proceed ?

Regards
Typhain
Kummi likes this.
Typhain is offline   Reply With Quote

Old   June 20, 2017, 06:17
Smile
  #266
Member
 
a
Join Date: Oct 2014
Posts: 49
Rep Power: 11
cfd@kgp is on a distinguished road
Dear Typhain,

There are two ways to proceed for implementing heat flux boundary condition namely,

1. programming method, edit the current boundary condition file located in src directory --> (Dirichlet boundary condition) to Neumann boundary condition or Robin based on your need. This methods involves compilation and then adding the name of.lib in the controlDict

2. Second method is slightly simpler, by using the groovy boundary conditions (check the implementation details here https://openfoamwiki.net/index.php/Contrib/groovyBC).
here also u have to add "libs ( "libgroovyBC.so" );" in controlDict

3. I am not very sure whether swak4foam can also help u in doing this.

But I would go for option 2. Happy Foaming!

Regards,
cfd@kgp
Kummi likes this.
cfd@kgp is offline   Reply With Quote

Old   July 18, 2017, 11:40
Default unconstrained close-contact melting
  #267
New Member
 
Deva Shafer
Join Date: Jul 2017
Posts: 2
Rep Power: 0
dshafer is on a distinguished road
Fabian, would you be willing to share the solver you mention in your thesis which takes unconstrained close contact melting into account?

I realize your thesis came out some time ago - perhaps some of the other solvers mentioned on this forum have been updated to model unconstrained melting? If not, I would be very grateful for suggestions for how to implement this myself. At the moment I'm simply hoping to replicate a simple test case of Octadecane melting in a spherical enclosure.

Full disclosure: I am new to OpenFOAM and have only attempted to model this problem in COMSOL and Fluent so far, without success. I expect the solution will require me to modify the momentum equation to A*(u - u_sink), where A is the porosity function and u_sink is the sinking velocity of the solid. I am not sure how to define u_sink in this case.

I'm hoping OpenFOAM will be more suitable to this problem!

Many thanks


Quote:
Originally Posted by fabian_roesler View Post
Hi Folks

My PhD thesis on modeling and simulation of phase change processes in macro encapsulated latent heat thermal energy storage is now published. It is written in German and was published by the Logos Verlag Berlin.

Modellierung und Simulation der Phasenwechselvorgänge in makroverkapselten latenten thermischen Speichern
Thermodynamik: Energie - Umwelt - Technik, Bd. 24
Fabian Rösler
ISBN 978-3-8325-3787-6

http://www.logos-verlag.de/cgi-bin/e...87&lng=deu&id=

The convMeltFoam solver as well as the solver which takes unconstrained close contact melting and an additional gas phase into account are explained in detail. Experimental validation in an rectangular cavity is performed.
Hope you like it.

Cheers

Fabian
dshafer is offline   Reply With Quote

Old   July 18, 2017, 12:52
Post unconstrained close-contact melting
  #268
New Member
 
Deva Shafer
Join Date: Jul 2017
Posts: 2
Rep Power: 0
dshafer is on a distinguished road
Dear all,

Does anyone know if the solvers discussed in this thread can be used to model unconstrained close-contact melting? I am trying to replicate a simple case study of Octadecane melting in a spherical enclosure, but am not aware of any solvers which can take the sinking of the solid into account.

I should note that I am new to OpenFOAM, and have only attempted to solve this problem in COMSOL and Fluent so far (without success).

I'd love to know if anyone has had success using OpenFOAM for these purposes!

Thank you!
dshafer is offline   Reply With Quote

Old   July 19, 2017, 08:06
Default
  #269
New Member
 
ahmed
Join Date: Jun 2017
Posts: 1
Rep Power: 0
ahmed1981 is on a distinguished road
Hi Typhain
is there OpenFoam version 5.0 ready for download, I search for this version in internet but I do not find it.
I now use openFoam 4.1, I ask can I use meltFoam solver for this version, If your answer is yes. How can I use this solver please .

I ask that because I am new to OpenFoam, And I want to model phase change materials
.
Thank you very much


Ahmed Almudhafar
ahmed1981 is offline   Reply With Quote

Old   August 3, 2017, 07:50
Default Solidification with shrinkage
  #270
New Member
 
diwakar
Join Date: Sep 2016
Posts: 11
Rep Power: 9
janghel is on a distinguished road
Dear All,
Is there any one who has successfully modelled solidification with shrinkage. I want to do the shrinkage model in openfoam. But i dont know from where should I start.
janghel is offline   Reply With Quote

Old   August 25, 2017, 03:29
Default
  #271
New Member
 
diwakar
Join Date: Sep 2016
Posts: 11
Rep Power: 9
janghel is on a distinguished road
Quote:
Originally Posted by fabian_roesler View Post
Hi callahance

I did exactly what you propose in my thesis. However, I am still in the PhD process and want the solver, results and thesis be public not before my defense of the doctor's thesis. You are right; I combined the compressibleInterFoam solver with my own melting solver to allow a free surface between liquid and gas.

Regards

Fabian
Hello Fabian,
I am trying to solve the three phase problem with your convFinMeltFoam solver. I have taken Fin material as air (third phase) with solid and liquid. I want to track the interface of liquid and air using VOF as solidification takes place. Due to density difference in solid and liquid, volume will shrink. I am unable to combine the solver with interFoam.
Please give some advice...
janghel is offline   Reply With Quote

Old   September 7, 2017, 09:06
Default
  #272
Member
 
Ricky
Join Date: Jul 2014
Location: Germany
Posts: 78
Rep Power: 11
kera is on a distinguished road
Hallo diwaker,

I am also trying to implement shrinkage model due to density variations, were you able to find some good literature?

I am currently trying to adapt the model described in [1] to my solver:

[1] "M. Raessi and J. Mostaghimi, Three-dimensional modeling of density variation due to phase change in complex free surface flows, Numerical Heat transfer, Part B, 47: 507-531, 2005"

Thank you in advance.

Regards,
Ricky

Quote:
Originally Posted by janghel View Post
Dear All,
Is there any one who has successfully modelled solidification with shrinkage. I want to do the shrinkage model in openfoam. But i dont know from where should I start.
__________________
If it is easy, then something is fishy!
kera is offline   Reply With Quote

Old   September 7, 2017, 14:25
Default
  #273
New Member
 
diwakar
Join Date: Sep 2016
Posts: 11
Rep Power: 9
janghel is on a distinguished road
Quote:
Originally Posted by kera View Post
Hallo diwaker,

I am also trying to implement shrinkage model due to density variations, were you able to find some good literature?

I am currently trying to adapt the model described in [1] to my solver:

[1] "M. Raessi and J. Mostaghimi, Three-dimensional modeling of density variation due to phase change in complex free surface flows, Numerical Heat transfer, Part B, 47: 507-531, 2005"

Thank you in advance.

Regards,
Ricky
Dear kera,
you can look into paper by Sun and Garimella, they have done solidification shrinkage of TNT.
"Numerical and Experimental Investigation of Solidification Shrinkage" 2007
i have some more papers but they are not like Raessi's paper. Using raessi's model you can get 3D cavity.
I am also trying to implement the model by Sun and Garimella. but no progress so far..
were you able to implement shrinkage?

ThankYou
janghel is offline   Reply With Quote

Old   September 11, 2017, 04:39
Default
  #274
Member
 
Ricky
Join Date: Jul 2014
Location: Germany
Posts: 78
Rep Power: 11
kera is on a distinguished road
Hallo diwaker and FOAMers,

I tried to implement the source term in "alphaEqn" as per this forum InterFoam: add a source term in alpha eq. and it seems that the source term is being calculated (checked via some print statements), but the problem is I don't see any effect in the simulation. --> This time I blindly followed Sun and Garimella [1], maybe I am doing something wrong.

Here is a snippet of the code.

Code:
volScalarField Sp 
    (
        IOobject
        (
            "Sp", 
         runTime.timeName(),
         mesh
         ),
      ((rhol - rhos)*gammas*fvc::ddt(alpha1)/rhol  - gammas*fvc::div(phiAlpha1))
     );
explicitSolve:

Code:
MULES::explicitSolve(geometricOneField(), alpha1, phi, tphiAlpha(), Sp,Su, 1, 0);
I am not sure where exactly is the problem, any help is really appreciated.

Thank you!

Regards,
Ricky

[1] " D. Sun and S.V. Garimella, Numerical and Experimental Investigation of Solidification Shrinkage, Prude University, 2007"

Quote:
Originally Posted by janghel View Post
Dear kera,
you can look into paper by Sun and Garimella, they have done solidification shrinkage of TNT.
"Numerical and Experimental Investigation of Solidification Shrinkage" 2007
i have some more papers but they are not like Raessi's paper. Using raessi's model you can get 3D cavity.
I am also trying to implement the model by Sun and Garimella. but no progress so far..
were you able to implement shrinkage?

ThankYou
raj kumar saini likes this.
__________________
If it is easy, then something is fishy!
kera is offline   Reply With Quote

Old   September 11, 2017, 06:16
Default
  #275
New Member
 
diwakar
Join Date: Sep 2016
Posts: 11
Rep Power: 9
janghel is on a distinguished road
Dear ricky,
You are One step ahead of me. I am actually working on solver of Fabian with little modification. I combined the solver with interFoam. Right now i am working on it. will update you ASAP. Meanwhile i tried to combine the solidification solver with compressibleinterFoam. But it did not work. I got an error. I will try your approach by adding source term to alphaEqn. One Question?
Did you solve continuity equation with source terms mentioned in both the papers...?

Regards
Diwakar janghel
janghel is offline   Reply With Quote

Old   November 13, 2017, 05:07
Default
  #276
MSF
New Member
 
Join Date: Apr 2014
Location: Germany
Posts: 24
Rep Power: 12
MSF is on a distinguished road
Hi
Quote:
Dear all,

Does anyone know if the solvers discussed in this thread can be used to model unconstrained close-contact melting? I am trying to replicate a simple case study of Octadecane melting in a spherical enclosure, but am not aware of any solvers which can take the sinking of the solid into account.

I should note that I am new to OpenFOAM, and have only attempted to solve this problem in COMSOL and Fluent so far (without success).

I'd love to know if anyone has had success using OpenFOAM for these purposes!

Thank you!
If you want to implement close-contact melting you can use multiple approaches: Variable viscosity, force balance + Darcy term or prescribe the settling velocity with forcing functions. Here are some links to papers. The first two models are in OpenFoam, the third was implemented in Matlab I think.

http://www.sciencedirect.com/science...17931017329241
Darcy-Term + force balance
https://link.springer.com/article/10.1007/s00231-016-1932-0
Variable viscosity
http://www.sciencedirect.com/science...17931017300856
Forcing functions + force balance


Best
Moritz
snak and dshafer like this.
MSF is offline   Reply With Quote

Old   August 3, 2018, 11:05
Default
  #277
New Member
 
Shekhar Singh
Join Date: Jun 2018
Posts: 1
Rep Power: 0
Shekhar@03 is on a distinguished road
Quote:
Originally Posted by AnjaMiehe View Post
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
can you please provide a test case for this solver?
Shekhar@03 is offline   Reply With Quote

Old   October 22, 2018, 06:56
Default
  #278
New Member
 
Germilly Barreto
Join Date: Jul 2016
Location: Portugal
Posts: 25
Rep Power: 9
Germilly is on a distinguished road
Hello ahmmedshakil,

I am dealing with the same problem (post: #100), have you solved it?

My energy equation is:

Code:
   fvm::div(phiCpf, Tf) - fvm::laplacian(por*kf, Tf)
 - hconv*Ts + fvm::Sp(hconv, Tf)
where phiCpf is:
Code:
phiCpf = fvc::interpolate(cpf)*phi
Tf is the temperature of the fluid...cpf is function of temperature using a polynomial equation.

The solver is running, but the final result does not respect the conservation of energy.

I think I have to do some correction, because of fvm::div(phiCpf, Tf) ...

Can you help me?

Thank you

GB

Last edited by Germilly; October 22, 2018 at 08:35.
Germilly is offline   Reply With Quote

Old   November 28, 2018, 01:49
Default Melting a simple 2-dimensional ice
  #279
New Member
 
Parsa Nazmi
Join Date: Nov 2018
Posts: 1
Rep Power: 0
Parsa Nazmi is on a distinguished road
Hi Everyone

I'm new to OpenFoam6 and I want to melt a two dimensional square ice with conduction. I don't know how to start. Can you help me about solver?
Parsa Nazmi is offline   Reply With Quote

Old   December 1, 2018, 11:15
Default
  #280
New Member
 
hemanth krishna kommu
Join Date: Mar 2018
Posts: 2
Rep Power: 0
hemanth17 is on a distinguished road
hey i m using this sovler and i m facing an error(heat generation at bottom left corner) intial condition upper wall at higher temperature, lower wall at lower temperature, left and right wall at zero gradient condition
hemanth17 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:51.