CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

melting problem

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree74Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   April 17, 2014, 03:13
Default
  #121
Member
 
Rohith
Join Date: Oct 2012
Location: Bayreuth, Germany
Posts: 45
Rep Power: 4
RaghavendraRohith is on a distinguished road
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 Caman-Kozeny 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:
DC = - Dcl (1- alpha3)^2/(alpha3^3+Dcs)
Which makes DC zero in the liquid zone and very high value in solid zone.

This was implemented by many researchers,but however voller and prakash paper is major cited of this kind.


http://ac.els-cdn.com/00179310879031...8aa918c64efc5d

Thanks
Rohith
shuisheng likes this.
RaghavendraRohith is offline   Reply With Quote

Old   April 17, 2014, 06:51
Default
  #122
New Member
 
Zhipeng Zhou
Join Date: Mar 2014
Posts: 8
Rep Power: 3
zhouzhipeng77 is on a distinguished road
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:
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell
(
p,
p_rgh,
mesh.solutionDict().subDict("PIMPLE"),
pRefCell,
pRefValue
);

if (p_rgh.needReference())
{
p += dimensionedScalar
(
"p",
p.dimensions(),
pRefValue - getRefCellValue(p, pRefCell)
);
}
zhouzhipeng77 is offline   Reply With Quote

Old   April 17, 2014, 07:41
Default
  #123
Member
 
Rohith
Join Date: Oct 2012
Location: Bayreuth, Germany
Posts: 45
Rep Power: 4
RaghavendraRohith is on a distinguished road
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
RaghavendraRohith is offline   Reply With Quote

Old   April 17, 2014, 08:06
Default
  #124
Senior Member
 
fabian_roesler's Avatar
 
Fabian Roesler
Join Date: Mar 2009
Location: Bad Friedrichshall, Germany
Posts: 161
Rep Power: 8
fabian_roesler is on a distinguished road
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
ahmmedshakil and shuisheng like this.
fabian_roesler is offline   Reply With Quote

Old   April 17, 2014, 09:22
Default
  #125
New Member
 
Zhipeng Zhou
Join Date: Mar 2014
Posts: 8
Rep Power: 3
zhouzhipeng77 is on a distinguished road
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:
setRefCell //Check if there is some data for the reference cell in fvSolution
(
p,
p_rgh,
mesh.solutionDict().subDict("PIMPLE"),
pRefCell,
pRefValue
);
The refering value is for p , then what is the "p_rgh" for ?

What's more , rhok is different in z direct, can we use p=p_rgh+gh*rhok
Regards

Zhipeng
zhouzhipeng77 is offline   Reply With Quote

Old   April 17, 2014, 10:14
Default
  #126
Senior Member
 
fabian_roesler's Avatar
 
Fabian Roesler
Join Date: Mar 2009
Location: Bad Friedrichshall, Germany
Posts: 161
Rep Power: 8
fabian_roesler is on a distinguished road
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
fabian_roesler is offline   Reply With Quote

Old   April 17, 2014, 14:34
Default
  #127
Member
 
Rohith
Join Date: Oct 2012
Location: Bayreuth, Germany
Posts: 45
Rep Power: 4
RaghavendraRohith is on a distinguished road
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
RaghavendraRohith is offline   Reply With Quote

Old   April 20, 2014, 08:15
Default big temperature difference convection
  #128
New Member
 
Zhipeng Zhou
Join Date: Mar 2014
Posts: 8
Rep Power: 3
zhouzhipeng77 is on a distinguished road
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
zhouzhipeng77 is offline   Reply With Quote

Old   April 24, 2014, 03:55
Thumbs up temperature dependant density for all terms in all conservation equations
  #129
Senior Member
 
fabian_roesler's Avatar
 
Fabian Roesler
Join Date: Mar 2009
Location: Bad Friedrichshall, Germany
Posts: 161
Rep Power: 8
fabian_roesler is on a distinguished road
Hi Zhipeng

You will not find a ready-made 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
fabian_roesler is offline   Reply With Quote

Old   April 30, 2014, 04:51
Default
  #130
New Member
 
Thilo Franke
Join Date: Mar 2014
Location: Bunswick
Posts: 4
Rep Power: 3
denhelden is on a distinguished road
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
Attached Images
File Type: jpg alpha.jpg (18.8 KB, 65 views)
File Type: jpg p_rgh.jpg (18.9 KB, 62 views)
File Type: jpg T.jpg (20.2 KB, 59 views)
File Type: jpg u_y.jpg (17.4 KB, 60 views)
denhelden is offline   Reply With Quote

Old   May 10, 2014, 04:52
Default Isothermal melting
  #131
Senior Member
 
Mohammad Shakil Ahmmed
Join Date: Oct 2012
Location: AU
Posts: 123
Rep Power: 5
ahmmedshakil is on a distinguished road
Hi Foamer's,
Can any one advice me whether the recent method (recently publish by Fabian:melting problem) is appropriate for the isothermal melting ? I'm trying to use the code for isothermal melting taking narrow temperature width (i.e. Tl-Ts <0.5). Please suggest me, whether the method is good or not OR the appropriate method.

Thanks in advance.
#shakil
ahmmedshakil is offline   Reply With Quote

Old   May 15, 2014, 21:51
Default Modifying the solver to include MultiRegion
  #132
New Member
 
David
Join Date: May 2012
Location: Canada
Posts: 12
Rep Power: 5
salehda is on a distinguished road
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
salehda is offline   Reply With Quote

Old   June 22, 2014, 11:19
Default running solver in parallel
  #133
Senior Member
 
Join Date: Jan 2010
Location: Stuttgart
Posts: 129
Rep Power: 7
Chrisi1984 is on a distinguished road
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
Chrisi1984 is offline   Reply With Quote

Old   June 22, 2014, 11:27
Default Running in parallel
  #134
Senior Member
 
Mohammad Shakil Ahmmed
Join Date: Oct 2012
Location: AU
Posts: 123
Rep Power: 5
ahmmedshakil is on a distinguished road
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:
Originally Posted by Chrisi1984 View Post
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
ahmmedshakil is offline   Reply With Quote

Old   June 23, 2014, 02:18
Default
  #135
Senior Member
 
Join Date: Jan 2010
Location: Stuttgart
Posts: 129
Rep Power: 7
Chrisi1984 is on a distinguished road
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:
[fe-z0as9:16166] *** An error occurred in MPI_Recv
[fe-z0as9:16166] *** on communicator MPI_COMM_WORLD
[fe-z0as9:16166] *** MPI_ERR_TRUNCATE: message truncated
[fe-z0as9:16166] *** MPI_ERRORS_ARE_FATAL (your MPI job will now abort)
--------------------------------------------------------------------------
mpirun has exited due to process rank 4 with PID 16169 on
node fe-z0as9 exiting improperly. There are two reasons this could occur:

1. this process did not call "init" before exiting, but others in
the job did. This can cause a job to hang indefinitely while it waits
for all processes to call "init". By rule, if one process calls "init",
then ALL processes must call "init" prior to termination.

2. this process called "init", but exited without calling "finalize".
By rule, all processes that call "init" MUST call "finalize" prior to
exiting or it will be considered an "abnormal termination"

This may have caused other processes in the application to be
terminated by signals sent by mpirun (as reported here).
What I can also observe that the crash occurs when the solver should solve the p_rgh equation.

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
Chrisi1984 is offline   Reply With Quote

Old   June 23, 2014, 13:19
Default
  #136
Senior Member
 
Mohammad Shakil Ahmmed
Join Date: Oct 2012
Location: AU
Posts: 123
Rep Power: 5
ahmmedshakil is on a distinguished road
Hi Chrisi1984,
It seems a bit strange !!! Is it possible to upload your exact solver that you are compiled ?
Cheers
shakil
ahmmedshakil is offline   Reply With Quote

Old   June 23, 2014, 15:49
Default
  #137
Senior Member
 
Join Date: Jan 2010
Location: Stuttgart
Posts: 129
Rep Power: 7
Chrisi1984 is on a distinguished road
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
Attached Files
File Type: gz convMeltFoam.tar.gz (7.4 KB, 18 views)
shuisheng likes this.
Chrisi1984 is offline   Reply With Quote

Old   June 27, 2014, 09:09
Default
  #138
Member
 
Anja Miehe
Join Date: Dec 2009
Location: Freiberg / Germany
Posts: 48
Rep Power: 7
AnjaMiehe is on a distinguished road
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()));
to

Code:
residual = Foam::gMax(mag(alpha1.internalField()-alpha1.prevIter().internalField()));
Then it works, at least on my computer. So I hope, this solves it for you as well. By the way, this should be the same with Version 2.3.

Regards, Anja
ahmmedshakil likes this.
AnjaMiehe is offline   Reply With Quote

Old   June 27, 2014, 09:29
Default Parallel convMeltFoam
  #139
Senior Member
 
fabian_roesler's Avatar
 
Fabian Roesler
Join Date: Mar 2009
Location: Bad Friedrichshall, Germany
Posts: 161
Rep Power: 8
fabian_roesler is on a distinguished road
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
Attached Files
File Type: gz convMeltFoam.tar.gz (4.5 KB, 86 views)
ahmmedshakil and shuisheng like this.
fabian_roesler is offline   Reply With Quote

Old   June 28, 2014, 02:37
Default convMeltFoam with conjugate heat transfer
  #140
Senior Member
 
Mohammad Shakil Ahmmed
Join Date: Oct 2012
Location: AU
Posts: 123
Rep Power: 5
ahmmedshakil is on a distinguished road
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

Quote:
Originally Posted by fabian_roesler View Post
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
ahmmedshakil is offline   Reply With Quote

Reply

Tags
melting openfoam

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
conduction problem venkataramana OpenFOAM 3 December 1, 2013 08:30
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
Is this problem well posed? Thomas P. Abraham Main CFD Forum 5 September 8, 1999 14:52


All times are GMT -4. The time now is 12:34.