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 Tree186Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 5, 2014, 10:56
Default
  #161
Senior Member
 
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18
fabian_roesler is on a distinguished road
Hi

Soon, there will be my PhD thesis available. I am in the final state of printing and it will also be available as eBook. I will post the link here. Moreover, my former colleges from the chair of engineering thermodynamics and transport processes (LTTT) at the University of Bayreuth an I prepare a new article.

Cheers Fabian
fabian_roesler is offline   Reply With Quote

Old   August 5, 2014, 11:39
Default
  #162
Member
 
YS
Join Date: Jan 2010
Posts: 96
Rep Power: 16
Ya_Squall2010 is on a distinguished road
Hi Fabian

I did a quick test today and the short conclusion is that the convMeltFoam, which uses inner iterations to update alpha, gives different result to erfConvectionMeltFoam,which uses continuous alpha function. The plots given in my earlier thread were due to the former solver and the later solver gives result sort of similar to what you presented in your paper.
Ya_Squall2010 is offline   Reply With Quote

Old   August 5, 2014, 14:18
Default
  #163
New Member
 
Akash
Join Date: Jun 2014
Location: Oslo
Posts: 29
Rep Power: 12
pakanatiakash is on a distinguished road
@fabian

Sure, would be happy to read your thesis. Kindly post it here when you are done with it.

@YS

Can I have access to the paper you are referring to?

Cheers
pakanatiakash is offline   Reply With Quote

Old   August 6, 2014, 23:20
Default
  #164
Member
 
YS
Join Date: Jan 2010
Posts: 96
Rep Power: 16
Ya_Squall2010 is on a distinguished road
Hi Fabian,

I have attached two cases below, galliumErfMelting and LHTES, and they are exactly prepared according to your 2011 paper. I am using erfConvectiveMeltingPimpleFoam on OpenFOAM 2.1.1. The validation on galliumErfMelting is perfect but the result of the other case, LHTES, is somehow weird. After 10h of simulation time (36000 sec), the wax is hardly melting. Please help to have a quick look to see if there's anything I missed. Thanks a lot for the help!

erfConvectiveMeltingPimpleFoam_OF210.tar.gz

galliumErfMelting.tar.gz

LHTES.tar.gz

I tried to replace the wax by gallium in the LHTES case and the material is melting normally.
shuisheng likes this.

Last edited by Ya_Squall2010; August 7, 2014 at 22:24.
Ya_Squall2010 is offline   Reply With Quote

Old   August 8, 2014, 11:30
Default convMeltFoam Problem
  #165
New Member
 
P Buck
Join Date: Aug 2014
Posts: 2
Rep Power: 0
PBuck is on a distinguished road
Dear Folks,

for my Master-Thesis i want to simulate the partial melting of a moving plate (quadratic) under a stationary heat source (laser-welding).

I successfully downloaded and compiled the convMeltFoam - Solver for OF 2.3. For a non-moving solid region everything works just perfect.
But when i added the modifications to the solver which has been posted to simulate a moving solid region the Temperature-distribution doesn't change and the pressure rises rapidly. Also the simulation crashes after a few timesteps.

Modifications in createFields.H
Code:
  volVectorField Us
    (   
        IOobject
        (   
            "Us",
            runTime.timeName(),
            mesh,
            IOobject::MUST_READ,
            IOobject::AUTO_WRITE
        ),  
        mesh
    );
Modifications in UEqn.H
Code:
  fvVectorMatrix UEqn
    (
        fvm::ddt(U)
      + fvm::div(phi, U)
      - fvm::laplacian(nu, U)
      + fvm::Sp(DC/rho, U)
       - DC*Us/rho
	  
    );
   
    UEqn.relax();

My boundarys are:
U
Code:
internalField   uniform ( 0 0 0 );
boundaryField
{
  ground          // This is actually the top of the plate where the heat source                           
                     //   is supplied
  {
 type slip;
  }
  maxZ
  {
     type fixedValue;
     value uniform ( 0 0 0 );
  }
  minX
  {
       type fixedValue;
     value uniform ( 0 0 0 );
  }

  maxX
  {
       type fixedValue;
     value uniform ( 0 0 0 );
  }

  minY
  {
       type fixedValue;
     value uniform ( 0 0  0 );
  }

  maxY
  {
 
   type fixedValue;
     value uniform ( 0 0  0 );
  }
Us:

Code:
internalField   uniform ( 0 0.1667 0 );
boundaryField
{

  ground
  {
  type slip;
  }

  maxZ
  {
  type fixedValue; value uniform ( 0 0.1667 0 );
  }

  minX
  {
   type fixedValue; value uniform ( 0 0.1667 0 );
	 }

  maxX
  {
     type fixedValue; value uniform ( 0 0.1667 0 );
  }

  minY
  {
 type fixedValue; value uniform ( 0 0.1667 0 );
  }

  maxY
  {
type zeroGradient;
  }
p_rgh

Code:
internalField   uniform 0;

boundaryField
{

  ground
  {
  type fixedFluxPressure;  rho rhok; value uniform 0;
  }

  maxZ
  {
   type fixedFluxPressure;  rho rhok; value uniform 0;
  }

  minX
  {
   type fixedFluxPressure;  rho rhok; value uniform 0;
  }

  maxX
  {
type fixedFluxPressure;  rho rhok; value uniform 0;
  }

  minY
  {
  type fixedFluxPressure;  rho rhok; value uniform 0;

  }

  maxY
  {
    type fixedFluxPressure;  rho rhok; value uniform 0;
  }
I also tried different variations with Us and p_rgh, without any success.

Thanks in advance for any help.

Best
Phil
Kummi likes this.
PBuck is offline   Reply With Quote

Old   August 19, 2014, 03:40
Default
  #166
Senior Member
 
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 23
vasava will become famous soon enough
@Anja Miehe: Thanks for the solver. I have OF2.3.0 and while compiling the solver I get following warnings:

Code:
/opt/openfoam230/src/finiteVolume/lnInclude/readTimeControls.H:38:8: warning: unused variable ‘maxDeltaT’ [-Wunused-variable]
readControls.H:4:9: warning: unused variable ‘minTCorr’ [-Wunused-variable]
readControls.H:5:9: warning: unused variable ‘maxTCorr’ [-Wunused-variable]
readControls.H:6:12: warning: unused variable ‘alphaTol’ [-Wunused-variable]
readControls.H:7:12: warning: unused variable ‘alphaRel’ [-Wunused-variable]
There is no other warnings or errors. The tutorial attached is also running without any errors.

Do you think these warnings are serious? If so how can I modify the solver code to avoid them?
vasava is offline   Reply With Quote

Old   August 19, 2014, 03:55
Default warning: unused variable
  #167
Senior Member
 
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18
fabian_roesler is on a distinguished road
Hi,

those warnings appear because of the curly brackets around the TEqn. The variables are defined outside these brackets and are only used inside. Thus, the compiler does not recognized their usage. So everything is fine.

@ Phil: I need some time to study your problem

Cheers

Fabian
fabian_roesler is offline   Reply With Quote

Old   August 19, 2014, 04:39
Default
  #168
Senior Member
 
Paritosh Vasava
Join Date: Oct 2012
Location: Lappeenranta, Finland
Posts: 732
Rep Power: 23
vasava will become famous soon enough
@fabian_roesler: Thank you for the prompt reply.
vasava is offline   Reply With Quote

Old   August 19, 2014, 10:28
Default
  #169
New Member
 
P Buck
Join Date: Aug 2014
Posts: 2
Rep Power: 0
PBuck is on a distinguished road
Hy Fabian,

i did proceed with my problem. The key was to deactivate the Momentum-Predictor and to use uncorrected div-schemes. Furthermore it is necessary to define the inlet and outlet velocity boundaries in the U-File. Only the internal field values from Us are needed.

Now the temperature distribution looks way better and the velocity magnitude (flow of the molten metal around a keyhole (capillary) in the middle of the plate ) looks more realistic than before. (See attached picture)
Nevertheless the pressure distribution looks quite unrealistic. I would expect a pressure rise in front of the capillary to force the fluid around the capillary.


P.S. The metal is completely fluent in the capillary region, thus a collision with the soild is not the problem.
P.S.2 If i change the inlet velocity boundary to fixedValue, everything explodes.

Best Phil
Attached Images
File Type: jpg solution.jpg (39.1 KB, 205 views)
PBuck is offline   Reply With Quote

Old   August 20, 2014, 08:07
Default
  #170
New Member
 
Akash
Join Date: Jun 2014
Location: Oslo
Posts: 29
Rep Power: 12
pakanatiakash is on a distinguished road
Hullo Fabian

I have conducted some test runs and compared with the experimental data available as a part of my master thesis. It was interesting to note that once the solid melted, a lot of noise in the temperature can be observed. I am not really sure if its numerical or physical. I checked for an other probe at a different location where the solid has not melted yet. Here no oscillations can be observed. Can you have a look at the plots I attached and kindly comment on it?

Cheers
Attached Images
File Type: png plotprobe2_new.png (7.4 KB, 96 views)
File Type: png plotprobe17_new.png (5.9 KB, 61 views)
pakanatiakash is offline   Reply With Quote

Old   August 26, 2014, 01:24
Default
  #171
Senior Member
 
Mohammad Shakil Ahmmed
Join Date: Oct 2012
Location: AUS
Posts: 137
Rep Power: 15
ahmmedshakil is on a distinguished road
Hi Akash,
Have you checked with the fined mesh ?

cheers
shakil
ahmmedshakil is offline   Reply With Quote

Old   August 27, 2014, 04:03
Default
  #172
Senior Member
 
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18
fabian_roesler is on a distinguished road
Hi

Quote:
Hi Fabian,

I have attached two cases below, galliumErfMelting and LHTES, and they are exactly prepared according to your 2011 paper. I am using erfConvectiveMeltingPimpleFoam on OpenFOAM 2.1.1. The validation on galliumErfMelting is perfect but the result of the other case, LHTES, is somehow weird. After 10h of simulation time (36000 sec), the wax is hardly melting. Please help to have a quick look to see if there's anything I missed. Thanks a lot for the help!

I tried to replace the wax by gallium in the LHTES case and the material is melting normally.
Earlier in this thread I posted that the erfConvectiveMeltingFoam is a method to decrease the nonlinear behavior of the energy conservation equation. However, you will not get rid of it entirely. Thus, when the influence of the convective term increases, the error of the energy conservation increases too. In short, cases with high conductivity of the PCM work well with this solver. Materials like wax or plastics with low thermal conductivity and proportionally high convective heat transfer give erroneous results. This is the reason I switched to the iterative method, proposed by Voller, implemented in the convMeltFoam. This method is quite slow but conserves energy when used correctly. I hope this clarifies your situation a bit.


Quote:
Hy Fabian,
i did proceed with my problem. The key was to deactivate the Momentum-Predictor and to use uncorrected div-schemes. Furthermore it is necessary to define the inlet and outlet velocity boundaries in the U-File. Only the internal field values from Us are needed.
Now the temperature distribution looks way better and the velocity magnitude (flow of the molten metal around a keyhole (capillary) in the middle of the plate ) looks more realistic than before. (See attached picture)
Nevertheless the pressure distribution looks quite unrealistic. I would expect a pressure rise in front of the capillary to force the fluid around the capillary.

P.S. The metal is completely fluent in the capillary region, thus a collision with the soild is not the problem.
P.S.2 If i change the inlet velocity boundary to fixedValue, everything explodes.
Best Phil
This could be due to the Darcy source term. This source term forces velocity to zero in the solid and transition region. However, as you use PISO or PIMPLE with no momentum predictor, momentum is not solved for directly. You rather calculate the velocity from your pressure field. Thus, the pressure in solid cells with flow against them in the near fluid cells will increase to 'resist' the flow. In contrary, the pressure in cells with no or negative flow against them will be lower. Always imagine the solid as a kind of high viscous fluid.

Cheers

Fabian
fabian_roesler is offline   Reply With Quote

Old   August 27, 2014, 05:05
Default
  #173
New Member
 
Akash
Join Date: Jun 2014
Location: Oslo
Posts: 29
Rep Power: 12
pakanatiakash is on a distinguished road
Hi Ahmed

The mesh is fine but not finest. I did a grid study for my geometry and I took mesh levels of 0.5, 1 and 2 million. There is a noticeable difference from half to one million. But one to two million has little change. Considering the computational resources available to me, I opted for 1 million cells which looked like an optimum solution. Maybe taking 2 million cells will dampen the oscillitations but I am not sure if they will eliminate them entirely. What do you think?

Cheers
Akash
pakanatiakash is offline   Reply With Quote

Old   August 27, 2014, 05:16
Default
  #174
Member
 
Rohith
Join Date: Oct 2012
Location: Germany
Posts: 57
Rep Power: 14
RaghavendraRohith is on a distinguished road
Hi Akash

From the plots attached, after the melting point of the solid. The solver tends to be chaotic due to the modeling of convection. Which algorithm are you using the one with error function or an iterative approach?

Best Regards
Rohith
RaghavendraRohith is offline   Reply With Quote

Old   August 27, 2014, 06:26
Default
  #175
New Member
 
Akash
Join Date: Jun 2014
Location: Oslo
Posts: 29
Rep Power: 12
pakanatiakash is on a distinguished road
Hi Rohith

The solver I am using is convMeltFoam from Fabian. Could you be more specific about what you mean by the algorithm employed? You mean the pressure corrector or something else?

Cheers
Akash
pakanatiakash is offline   Reply With Quote

Old   August 27, 2014, 06:40
Default
  #176
Member
 
Rohith
Join Date: Oct 2012
Location: Germany
Posts: 57
Rep Power: 14
RaghavendraRohith is on a distinguished road
Hi Akash

The algorithm, i mentioned means the approach used to model the temperature and Enthalpy coupling. However, i see that you have used ConvMeltFoam which means the temperature follows source based iterative approach by Voller et al., i may suggest you to reduce the time step size as well with different mesh refinements to optimize the courant number.

The oscillations you mentioned above could be possible due to the iterations. But it seems a bit strange to me that the slope and curvature vary very large from the experimental results.

My call would be try to make the approximation more stiff in modeling temperature.

Regards
Rohith
RaghavendraRohith is offline   Reply With Quote

Old   August 27, 2014, 08:59
Default
  #177
New Member
 
Akash
Join Date: Jun 2014
Location: Oslo
Posts: 29
Rep Power: 12
pakanatiakash is on a distinguished road
Hi Rohith

Thank you for the suggestions. I would try to implement them and see how it goes.

As you indicated, the slopes are quite different but after having a word with the testing department we have come to conclusion that the experimental values are also error prone. Especially probe 2(the first picture) as it is located between the heaters (my geometry has two parallel heaters in a tank). It was quite difficult to measure with reasonable accuracy.

But probe 17(second picture) is far away from the heaters and shows good relation with experimental values. Nonetheless, it would be interesting to see what would happen with probe 17 once melting front reaches the location. I have not yet run that far.

Cheers
Akash
pakanatiakash is offline   Reply With Quote

Old   October 6, 2014, 11:51
Default
  #178
Senior Member
 
anonymous
Join Date: Aug 2014
Posts: 205
Rep Power: 13
ssss is on a distinguished road
Hi guys,

I´m having some doubts about how to implement the source terms in Openfoam. Currently there seems to be two approaches:

1) Fabian Rösler's one, based on writing the enthalpy equation in terms of the liquid fraction writing the terms which depends on the liquid fraction as explicit ( fvc:: )

2) Voller's approach, based on linearized source terms as follows:

\cfrac{\partial(c_{p}T^)}{\partial t}+\nabla\cdot(\vec{u}c_{p}T)=\nabla\cdot(\cfrac{\kappa}{\rho}\nabla T)+S_{P}T+S_{T}

S_{P}=-\cfrac{L}{\delta t}\cfrac{dF}{dT}

S_{T}=\cfrac{L}{\delta t}(\beta^{oldIteration}-\beta^{m})-S_{T}F^{-1}(\beta^{m})

Whith both of them correcting the liquid fraction after each iteration

So which one would the best one to implement? I mean, Voller didn´t take account of convection, so the convection source term doesn´t appear in his equations. But Voller´s method has been validated in numerous testcases. Also I've validated Rösler approach in easy-geometry testcases, but I didn´t use it in complex-geometries.

Thank you all for the cooperation
shuisheng likes this.
ssss is offline   Reply With Quote

Old   October 6, 2014, 21:28
Default
  #179
Senior Member
 
Mohammad Shakil Ahmmed
Join Date: Oct 2012
Location: AUS
Posts: 137
Rep Power: 15
ahmmedshakil is on a distinguished road
Hi anonymous,
First of all, both of the methods are good. But for the implementation it depends on what type of problem you are solving. Linearised Source Based Method (LSM) is robust, and it just takes (at least) 3-4 iteration for convergence. Second method, which called Fictitious Source Method (FSM), takes a little bit more iteration to converge.
Now for the use, it depends on how the thermal gradient is changing. If thermal gradient changes strongly with times, then LSM may give some false results for the melt front and you may observe some false diffusion. In this case, my personal observation, it is better to go with FSM. Another problem for the LSM is to get the convergence of the results.
Also, none of the method is good for isothermal phase change.
If thermo-physical properties are function of temperature, then LSM will cause problem unless careful steps are not taken.

cheers,
#shakil
shuisheng and ssss like this.
ahmmedshakil is offline   Reply With Quote

Old   October 8, 2014, 08:15
Default PhD Thesis on modeling and simulation of phase change processes in macro encapsula
  #180
Senior Member
 
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18
fabian_roesler is on a distinguished road
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
fabian_roesler 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 03:46
Can I solve this problem by Fluent? Kai_kc FLUENT 1 October 27, 2010 06:29
natural convection problem for a CHT problem Se-Hee CFX 2 June 10, 2007 07:29
Adiabatic and Rotating wall (Convection problem) ParodDav CFX 5 April 29, 2007 20:13
Melting Problem M FLUENT 0 April 29, 2007 17:07


All times are GMT -4. The time now is 20:58.