CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   melting problem: looking for appropriate solvers (https://www.cfd-online.com/Forums/openfoam-solving/93620-melting-problem-looking-appropriate-solvers.html)

Kummi July 7, 2019 02:49

Phase transition phenomenon ==> with Only TEqn.H
 
1 Attachment(s)
Hello Foamers,


# Post 19 --> Mr. Fabian Roesler had constructed the solver for melting problem in OpenFOAM 2.1.1 based on Stefan Task .
I have modified this solver in simplest way using SIMPLE algorithm based on only Temperature (TEqn.H) as shown in the attachment. Here, I have neglected pressure (pEqn.H) and velocity (UEqn.H) terms to fit the conditions based on my solver as explained in next comment section.
In this case, by default 'alpha' is a function of temperature, 'lamda' and 'cp' is the function of 'alpha'

This solver explains the movement of interface from right to left for non-isothermal phase change where melting occurs. [Stefan Problem - moving boundary is met]

Kummi July 7, 2019 02:58

Phase transition phenomenon ==> with Only TEqn.H
 
5 Attachment(s)
Hello Foamers,

Following my above comment, I would like to explain my problem conditions to fit into the phase change solver. After solving the simple energy equation, I want to include the phase transition phenomenon - Boiling, Condensation and Convection [ATTACHMENT 1].

ATTACHMENT 2 explains the schematic 1D model with phenomenon. Here the main equation is only ENERGY equ. The problem is basically the coal pyrolysis. Initially, the coal is considered as wet and 2 phases of moisture and steam need to be implemented. After evaporation of moisture, once if wet coal is converted into dry ~ pyrolysis will take place, which is a different topic of discussion.

Position of interface (boiling plane) is explicitly defined based on mass and heat balance ~ as not defined in previous Fabian Roesler problem.
Quote:

Mass balance (r) = rho * alpha * (dx/dt)
Heat balance (-K dT/dx) = rho * latent heat
There is only TEqu.H is my case, then how to define (dx/dt) velocity. If I consider phi as velocity, then phi is surfaceScalarField interpolated from U.
So, how to correct the mass balance based on velocity (dx/dt)?
Heat balance of boiling and condensation expressed in unit of W/m2 ==> where it couldnot be added as source term in energy equation which carries the unit W/m3 ~ And I am confused here
(1) Boiling: When the heating wall (left side) reaches the temperature of 100deg, the moisture evaporates [the condition (alpha) w = 0] instantly. [ATTACHMENT 3]
(2) Condensation: The steam condenses (right side of chamber) until the temperature reaches 100deg on the right side. [ATTACHMENT 4]
(3) Convection: When T = 100deg, the steam flow after moisture evaporation. [ATTACHMENT 5]
How to fix such condition at interface quoted below ==>
Quote:

@T=100deg (moiture content_w=0)

>> Tl (liquid) = Tv (vapor) [Looks like single point phase change scheme over the specified temperature by Voller and Cross]
>> H2O(l) = H2O (v)
REF - MANUSCRIPT which I am focussed with based on GOVERNING EQUATIONS and SOLUTIONS ~ https://sci-hub.tw/https://doi.org/10.1016/0016-2361(83)90225-9
Although the equations to solve looks simple, I couldn't able to figure out the exact path to find my solution (considering my queries mainly marked in "RED mark")
Kindly someone share their ideas please. Thank you !!!

Kummi July 10, 2019 02:18

Hello Foamers,
To make it simple, I will explain the main core of the problem about phase change.
alpha as a function of T in melting problem ~ as mentioned in above explanation
Quote:

alpha = 0.5*Foam::erf(4.0*(T-Tmelt)/(Tl-Ts))+scalar(0.5);
But in my case, alpha is not function of T, instead the position of the interface (boiling plane) is fixed with the condition as follows:
Quote:

Initial moisture content alpha = 0.1 (10%)
@BOILING TEMP, T=100deg
(moiture content) alpha=0 (near the heated wall)
//************************************************** *****************//
Heat is transferred by wall conduction only. When the temperature reaches T=100deg (heating wall), the surface reaches above the saturation temperature, and so liquid (moisture) evaporates leading to the motion of vapor-liquid flat interface. If the vapor-liquid interface moves to the complete right, then the chamber is saturated with only evaporated vapor. Interface stays flat for 1D PROBLEM.
//************************************************** *****************//
Following the above condition, mass and heat balance are calculated as,
Quote:

Mass balance (r) = rho * alpha * (dx/dt)
Heat balance (-K dT/dx) = (r) * latent heat
Heat balance expressed as W/m2 --> looks like surface tracking problem based on STEFAN 1D phase change CONDITION
REF - Clear details here in this reference ~ https://sci-hub.tw/https://doi.org/10.1016/0016-2361(83)90225-9

Kindly someone help me by sharing ideas..

Thank you

PositronCascade July 20, 2019 01:35

Is there any CHT melting solver that you know?


Thanks!

Pavithra July 24, 2019 05:37

Hello Everyone,

First of all, I thank everyone who has contributed to this wonderful thread.

I downloaded the solver posted by Typhian in post #263. I am able to compile it successfully in OF V6 and perform the test case too.

But, when I changed the mesh resolution to 132X100 in the blockMesh dictionary. The case gives an abnormal result.

After changing the entries int he blockMeshdict, I ran blockMesh and meltFoam.

I believe it has something to do with the cellToRegion file.

Someone please explain me the use of cellToRegion file. I mean what it does exactly.

Sorry if my question is too silly.

Thank You.

Kummi July 24, 2019 06:27

1 Attachment(s)
Hello Pavithra,
I downloaded the solver and compiled in version 5.0 (post #263). U can find the same case in the attachment. I don't find any trouble while compiling and solving this case.
Quote:

But, when I changed the mesh resolution to 132X100 in the blockMesh dictionary.
No such problems even if I changed the mesh size.
You have compiled in OF V6 - thats where the problem is, I hope so.
Quote:

Someone please explain me the use of cellToRegion file. I mean what it does exactly.
cellToRegion file is basically created by splitMeshRegions: This file defines all the patches of a particular region. cellToRegion( ) const --> Return region split.
cellToRegion file is like any other field file but not associated to a specific field. The BC type is either zeroGradient or calculated.

calculated (if defined) --> in case of coupling patches to other regions
zeroGradient (if defined) -->boundary patches (outside of domain)

Hope it helps.
Thank you ^^

Pavithra July 24, 2019 06:57

2 Attachment(s)
Respected Sir,

Thank you so much for your kind reply.

I have attached the liquid fraction and temperature distribution at 2 seconds.

I find the liquid fraction and temperature distribution at 2 secs as abnormal. Kindly please give your comments on this.

So, in normal case, cellToRegion file does not have any use. The default case should produce the results even without the cellToRegion file. Sir, please correct me, if I am wrong.

Thank You.

Kummi July 24, 2019 07:14

In 1D case of mesh size (100 1 1) - the results looks reasonable.
However, for 2D case, the behavior is weird. Have you tried increasing the width size or decreasing the default time size less than 0.005 ?

Pavithra July 24, 2019 07:27

Quote:

Originally Posted by Kummi (Post 739859)
In 1D case of mesh size (100 1 1) - the results looks reasonable.
However, for 2D case, the behavior is weird. Have you tried increasing the width size or decreasing the default time size less than 0.005 ?

Thank You Sir. I also believe that a smaller time step can reduce this error. I am running the case with a smaller time step.

But, Sir please help me understand that how increasing the width can resolve this issue.

Thank You

Kummi July 24, 2019 10:13

2 Attachment(s)
Hello Pavithra,
Quote:

So, in normal case, cellToRegion file does not have any use.
- Yes, no need of cellToRegion here.
Quote:

But, Sir please help me understand that how increasing the width can resolve this issue.
I thought it could be corner effects - butt thats not the case here actually.
I am not proficient in multiphase problems. My field of work is different. However, I am sharing ideas to the best of my knowledge.
In the attachment given below, both images are captured at 170s. When the temperature range is between 300-310K, the contour plot looks apparent. But when the range is rescaled btw 300-340K, there found strange behavior - bottom left corner temperature rises. Time reduction doesn't helps. I am not sure where could be the problem.

~Have you gone through this post completely from the beginning. I am sure it will give you the spark.
~Have you tried the extended version coding by Fabian Roesler [post #81]
~Posts #130 #151 #154 draw contour results - might be helpful for you to validate
~Fabian Roesler - Ph.D thesis on post #180
~Ole Richter posts from #201-205 - about incompressible two phase mixture might help too..
Keep updating your progress. You will find a way one day!!

Thank you

Pavithra July 24, 2019 21:38

Quote:

Originally Posted by Kummi (Post 739894)
Hello Pavithra,
- Yes, no need of cellToRegion here.
I thought it could be corner effects - butt thats not the case here actually.
I am not proficient in multiphase problems. My field of work is different. However, I am sharing ideas to the best of my knowledge.
In the attachment given below, both images are captured at 170s. When the temperature range is between 300-310K, the contour plot looks apparent. But when the range is rescaled btw 300-340K, there found strange behavior - bottom left corner temperature rises. Time reduction doesn't helps. I am not sure where could be the problem.

~Have you gone through this post completely from the beginning. I am sure it will give you the spark.
~Have you tried the extended version coding by Fabian Roesler [post #81]
~Posts #130 #151 #154 draw contour results - might be helpful for you to validate
~Fabian Roesler - Ph.D thesis on post #180
~Ole Richter posts from #201-205 - about incompressible two phase mixture might help too..
Keep updating your progress. You will find a way one day!!

Thank you


Sir,



Thank you so much for your detailed reply. I will go through all the posts carefully and will update my progress here.



Thank you so much Sir.

Pavithra August 6, 2019 23:22

2 Attachment(s)
Hello Everyone,

I am trying to use the solver by Fabian posted in this thread. Could someone please clarify me the following points?


1) What is Tdim in constant/transportProperties?


2) From his paper, I can see that Tdim = (T_liquidus) - (T_solidus). If this is true, for isothermal melting, Tdim = 0. If I set Tdim = 0, the solver crashes due to division by 0.


3) Moreover the value of Tdim affects the results, drastically. Smaller values of Tdim leads to accelerated melting and viceversa.


Please help me in choosing a right value of Tdim for isothermal melting. Fabian's solver and link to his paper are attached.

https://link.springer.com/article/10...231-011-0866-9

Thank You.

Pavithra August 7, 2019 06:59

2 Attachment(s)
Hello Everyone,

Finally, I have managed to modify buoyantBoussinesqPimpleFoam to simulate melting problems. I have attached the solver and Gallium melting testcase. The solver is tested in OF v6.

Any feedback or suggestions are welcome.

Also, please give me a direction or any guidance to parallelize this solver.

The solver works well when running on a single core. But, blows up while running in parallel.

Thank You.

- Pavithra.

Pavithra August 8, 2019 04:41

4 Attachment(s)
Hi Everyone,

I am attaching the results of some validation cases, herewith.

I have attached the solver, cases and results. Any suggestions for improvements are welcome.

Thank You.

- Pavithra

luks1910 September 5, 2019 13:14

Kummi,


For a finite volume solver shouldn't the energy balance always be written in W/m^3? In this case there could be some confusion due to the length attributed to dx/dt (the velocity of the interface, correct me if I am mistaken). I think you want to divide dx/dt by an appropriate length scale for your vapor-liquid interface transport phenomena, then the source term can be added to the TEqn with correct units.


It seems simple but in my experience careful dimensional analysis can solve/avoid many issues when writing equations for a finite volume solver.


Cheers

Kummi September 5, 2019 13:59

Hello Luca,
Thank you for your comments. Energy balance will be written in terms of W/m3 in finite volume approach basically. My problem is a kind of 1D pyrolysis (Coal) modelling, which is focussed mainly on heat loss - thus only Energy equation is included in my work.

ENERGY EQU: rho*Cp*(dT/dt) = del/delx[K*dT/dx ] + rho*dQ/dT + r*cp*dT/dx (W/m3)
Unsteady conduction = Diffusion term + SOURCE TERM 1 + SOURCE TERM 2
SOURCE TERM 1 = heat loss due to pyrolysis
SOURCE TERM 2 = phase change of moisture (moisture embedded in the wet coal)

My query is all about the SOURCE TERM 2. Concerning it, I posted my query here - because this post discusses phase change problem - thought of gaining some assistance here for my work.
Pyrolysis - Arrhenius-like degradation chemistry
Drying - surface modelling at boiling plane (drying when moisture boils at 100deg)
Since, drying is based on surface modelling, the mass and heat balances unit is calculated at the surface. The calculated mass balance (r) is multiplied with cp and dT/dx as SOURCE TERM 2 gives the unit of W/m3.
Quote:

CONDITION: T= 100 ==> moisture content =0
Based on it, mass and heat balances are calculated at the boiling plane (surface) as,
Mass balance (r) = rho * alpha * (dx/dt) [kg/m2.s]
Heat balance (-K dT/dx) = (r) * latent heat [W/m2]
REF - Clear details here in this MANUSCRIPT ~ https://sci-hub.tw/https://doi.org/1...361(83)90225-9 (ATKINSON, B., & MERRICK, D. (1983). Mathematical models of the thermal decomposition of coal4. Heat transfer and temperature profiles in a coke-oven charge. Fuel, 62(5), 553–561)
How the source terms can be included in such problems? I have contacted certain people, few replied as they are not familier with pyrolysis, others asked me to look into interFoam solvers. But the approach of interFoam seems to different with separate transport equation for volume fraction, which is not the same in my case. I'm trying to figure out and learn as how the problem can be attacked based on algorithm and importantly how such problems can be approached step by step in OpenFOAM//

Please share your ideas, it will be highly helpful.
Thank you.

luks1910 September 5, 2019 20:56

I should preface by saying I am relatively new to OpenFOAM and am currently working on a cht problem with solidification and melting, hence my monitoring of this thread. I do have more extensive experience with CFD modeling in general.



Based on your last post I don't see a problem. Perhaps I am misunderstanding, but it looks as if you have a valid energy equation in W/m^3. The 2d surface model is an additional function used to define your source term, the units of this don't necessarily matter so long as they are correct within the function definition. Do you know dx/dt based on results from the previous timestep? The way I see it, you should be able to calculate (r) with a function object, but I am not sure if you could then use that term to your TEqn.

Kummi September 11, 2019 22:29

Hello Luca,

Sorry for my late response.
Quote:

The 2d surface model is an additional function used to define your source term
Not sure, I'm looking forward to find a way for it.
Quote:

Do you know dx/dt based on results from the previous timestep?
Yae, dx/dt are based on previous time steps.
Quote:

The way I see it, you should be able to calculate (r) with a function object, but I am not sure if you could then use that term to your TEqn.
Function objects usually calculates post processing output results right (also using swak4Foam sometimes). Correct me if Im wrong
Thank you

Kummi September 11, 2019 22:43

Moisture evaporation - if-else loop
 
1 Attachment(s)
Hello Luca,
In previous message, I have given a condition for moisture evaporation (phase change) quoted in a box.
Quote:

CONDITION: T= 100 ==> moisture content =0
Based on it, mass and heat balances are calculated at the boiling plane (surface) as,
Mass balance (r) = rho * alpha * (dx/dt) [kg/m2.s]
Heat balance (-K dT/dx) = (r) * latent heat [W/m2]
I tried to evaluate the above condition separately. I mean, without pyrolysis, only phase change, in order to understand that how such condition can be implemented in the OpenFOAM.
I'm hereby attaching the solver (OF211). In this solver, under TEqn.H, I solved a if-else loop based on the above condition.
Quote:

forAll(mesh.cells(), celli)
{
if (T[celli] >= Tsat.value())
{
alpha[celli] = scalar(0.0);
}
else
{
alpha[celli] = alphaTemp[celli];
// alpha[celli] = alpha[celli];
// alpha[celli] = alpha[nearestCellIndex];
}
}
However, the alpha (moisture content) is not solved properly with appropriate outcome. In my case, alpha has no expression (field operation), alpha is only solved based on the loop. So, do we need an expression to solve alpha basically? any ideas ?

If you have any ideas about it, kindly do share.

It will be helpful. Thank you

dp32 November 24, 2019 12:25

Solidification of pure metal
 
I was trying to make solidification model of pure metal.
can I use erfConvectiveMeltingPimpleFoam solver for solidification just by changing initial and boundary conditions or do I need to make any changes to the solver part?

The Mad Scientist December 23, 2019 06:46

making appropriate required physical changes should do

dp32 December 23, 2019 07:10

Sir, can I know what are all the changes to be done?

The Mad Scientist December 23, 2019 07:12

first check your solver for any test case.. if its working fine then all you need to do is supply physical BC & IC along with thermophyscial parameter..

dp32 December 23, 2019 07:16

Sir, i have checked the solver for melting problem and it's working fine. But, when it come to Solidification problem, i'm unable to capture the natural convection effects. so, could you please help me with the initial and boundary conditions.

The Mad Scientist December 23, 2019 07:20

post your results and error ...

riccardo93 January 5, 2020 06:37

Hi everyone,
I need to simulate the solidification of steel.
At the moment I'm using the solver solidificationFoam, but there are some missing things:
-Communication between solid and liquid domain, ingot and ingot mold
-Thermal Shrinkage
-Viscosity variation as a function of temperature

What solver do you recommend?

Thanks in advance!

Shoonya February 4, 2020 01:46

meltingFoam works fine in OpenFOAM (v1912)
 
Quote:

Originally Posted by Pavithra (Post 741490)
Hi Everyone,

I am attaching the results of some validation cases, herewith.

I have attached the solver, cases and results. Any suggestions for improvements are welcome.

Thank You.

- Pavithra


Thanks Pavithra for sharing the solver meltingFoam. It works fine in the present version of OpenFOAM (v1912).

Regards

wanghongjie May 8, 2020 12:25

please
 
Quote:

Originally Posted by kuechenrole (Post 545444)
Hey Fabian,

I'm working on a problem you might have already solved in your PhD and therefore I would like to ask you for a hint.

My Master thesis is about the simulation of casting processes including the filling, temperature transport and solidification and thus exactly the reversal of your subject.
In order to add the gas phase I'm trying to combine interFoam and convMeltFoam, as you suggested earlier.

Using the model of your PhD, everything seems to work out fine except the solution of the TEqn, which exploits whenever I include the calculation of the liquid fraction fl.

The only thing I changed so far is the update equation of the liquid fraction. I replaced the heat capacity cp of the hole cell with a cp calculated from just the liquid and solid phase.

I suggest that the new possibility of changing the fl by filling a cell instead of just melting solid is causing the trouble. By filling a cell I can produce huge differences of fl between two time steps, which the iteration algorithm for T and fl can't handle anymore.

Do you come to that problem?

My supervisor mentioned a smoothing function to restrict the time step if huge fl changes happen could be a solution. I haven't tried it yet, but will post again, if something works.

I have to excuse, if the solution is described in your PhD. We already ordered a book through inter-library loan, but it seems to be loaned. Do you know about a library online version? If I haven't got access by next week I will buy it. (Until then I'm dealing with the googleBooks prev)

Thanks,

ole

Can i have the paper? Thanks!!!

aerospace1365 August 13, 2020 07:25

request
 
Quote:

Originally Posted by som (Post 332921)
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?

Hello Som.
I want to cool a heat sink by butting it on the wax, just like your problem.
May I have your code?
would you please send it to my email?
aerospace1365@gmail.com

aerospace1365 August 13, 2020 17:03

request
 
Quote:

Originally Posted by Typhain (Post 653502)
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

Dear Sir
I have a case that should be solved by your solver. I have a heat sink (fins) located in wax. the wax will melt and cool the fins.
do you think this solver can solve this problem?
my Gmail is aerospace1365@gmail.com.
I am looking forward to hearing from you.
regards

Skaiwalker December 17, 2020 08:42

OF8 solidificationMeltingSource with erf
 
2 Attachment(s)
Hello all,

I want to port the solidification solver to OF8 to utilize the tabulated thermophysicalProperties in my bachelor's thesis. "solidificaitionMeltingSource" looked like a good starting point to me, so I changed the "update" and "apply" functions according to the formulation in Fabian Röslers Solver and made some minor changes like deleting alpha1e and relax factor. The code is attached in the tar file.

---
Question 1: Is there missing a negative sign in the paper in equation 10? In the uploaded solver post 19 there is an additional negative sign in the upper numerator of TEqn, as noted in the equation snippet below. Implementation according to the paper throws a floating point exception error.

\frac{4 \cdot exp( ( \frac{!!-!!4(T-T_m)}{(T_l-T_s)})^2)}{{...}} \cdot ...
---

I ran some cases but the results are terrible as can be seen in the attached picture (as in the paper the timesteps 2, 6, 10 and 17 min are plotted). The melt front is way too fast and doesn't show curving like the results from the paper. Out of curiosity I tested the standard implemented linear fvOption with some cranked up numerics and ran the same settings again for the erf fvOption:
  • linear fvOption differs from the results in the paper in melt front position and shape increasingly with time. Adjusting the model parameters helps a bit in later time steps with the shape but the initial deviation stays the same.
  • erf fvOptoin with cranked up numerics moves the melt front a bit in the right direction, but is far from accurate.

---
Question 2: Does anybody have an idea where this behavior comes from? I even programmed it a second time from the scratch to avoid typos, but the results were the same. And this doesn't explain the behavior of the linear model as well.
---

For post processing of the melt front run "pvpython writeMeltFront.py" in the case directory and point plotMeltFront.py to meltFrontPosition directory in corresponding case directory. I left the results in the myCases cases for an easy first impression.

Thanks in advance and have a nice day!

Zonk90 December 18, 2020 07:50

Hello Kai,


Regarding your first question: the derivative of erf(x) is \frac{2e^{-x^2}}{\pi}, so I think yes there should be a minus in equation 10.

And regarding your second question. The erf-Solver is rather mediocre. Even if everything is implemented correctly you will need a very small time step, since the very strong non-linearity of the equation is not handled properly. You can take a look at: https://www.mdpi.com/1996-1073/12/5/868 for a better implementation.


Best,
Moritz

Skaiwalker January 7, 2021 09:59

Hello again forum!

Moritz posted an interesting approach, I will look further into it. But in the mean time, does anyone of you have an Idea where especially the deviation of the linear model comes from?

Thanks in advance!

fabian_roesler January 15, 2021 03:55

Hi,
This is my first post since years. The erf function was the first more or less running version we developed at the thermodynamics chair in Bayreuth. The more sophisticated version is in my PhD thesis. The latest version seems to be the one in Moritz's article. I had no time to reed through the article yet and I'm out of this topic since 7 years :).
What deviation do you mean?
Cheers
Fabian

Skaiwalker January 19, 2021 02:55

Hi Fabian,

thanks for your reply, I received your PhD thesis yesterday and it looks very helpful from what I've read until now! Especially the parts about sinking solid and literature review.

The deviation I'm talking about are the more narrow expansion in x of the linear model compared to yours and Brent and Voller's simulations and what is the most significant difference in my opinion is the shape of the phase front. The more "wave-like" character up until 360 s and the pronounced bulge from then on.

But I missed a paper Moritz sent me in an E-Mail which explains these results, shame on me :eek: Hannoun et al. published "Resolving the controversy over tin and gallium melting in a rectangular cavity heated from the side" and state, that Brent and Voller's results are not grid-converged. So the positions of vortexes are wrong and in the early stages of the simulation, when vortexes are small, they are not resolved at all.
Further the experiment of Gau and Viskanta drained the fluid portion to measure the phase position, so we have different bc's in the experiment and in the simulation.

I will look into your thesis for the theory behind phase change but most likely adopt Moritz's approach because it is the most advanced and computational cost may be reduced.

Vincy_ January 19, 2021 04:54

kOmegaSSTIDDES in OpenFOAM-v2012(pisoFoam)
 
Hi:

Has anyone encountered the following problems?
I guess the boundary conditions are set incorrectly? But I have tried many, still have this problem.



--> FOAM FATAL ERROR: (openfoam-2012)
Attempt to cast type calculated to type nutWallFunction at index 2

From To& Foam::refCast(From&, Foam::label) [with To = const Foam::nutWallFunctionFvPatchScalarField; From = const Foam::fvPatchField<double>; Foam::label = int]
in file /home/user2/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/typeInfo.H at line 162.

FOAM aborting

#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::error::exitOrAbort(int, bool) at ??:?
#2 Foam::nutWallFunctionFvPatchScalarField::nutw(Foam ::turbulenceModel const&, int) at ??:?
#3 Foam::omegaWallFunctionFvPatchScalarField::calcula te(Foam::turbulenceModel const&, Foam::List<double> const&, Foam::fvPatch const&, Foam::Field<double>&, Foam::Field<double>&) at ??:?
#4 Foam::omegaWallFunctionFvPatchScalarField::calcula teTurbulenceFields(Foam::turbulenceModel const&, Foam::Field<double>&, Foam::Field<double>&) at ??:?
#5 Foam::omegaWallFunctionFvPatchScalarField::updateC oeffs() at ??:?
#6 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::Boundary::updateCoeffs() at ??:?
#7 Foam::kOmegaSSTBase<Foam::LESModels::DESModel<Foam ::IncompressibleTurbulenceModel<Foam::transportMod el> > >::correct() at ??:?
#8 ? at ??:?
#9 __libc_start_main in /lib64/libc.so.6
#10 ? at ??:?
Aborted (core dumped)



Thanks in advance

mikulo January 22, 2021 06:33

Thesis
 
Quote:

Originally Posted by fabian_roesler (Post 500016)
Hi steph

I did exactly that within by PhD thesis. I defended the thesis one month ago and it will be published soon. Unfortunately it is written in German. I combined the compressibleInterFoam solver with my new melting solver based on the convMeltFoam. The density of the PCM is no longer described by means of a boussinesq approximation but by a temperature dependent density in all terms of the conservation equations. This makes it possible to simulate volume change during melting and solidification in a closed volume/capsule.
As soon as my thesis is published, I will post at least parts of the solver here.

Cheers

Fabian

Hello Fabian, is it okay to have a copy of your thesis. Would it be better if it is written in English but if not, then I will try to find a way to translate it. Thanks

Vincy_ January 22, 2021 07:19

Quote:

Originally Posted by Vincy_ (Post 793707)
Hi:

Has anyone encountered the following problems?
I guess the boundary conditions are set incorrectly? But I have tried many, still have this problem.



--> FOAM FATAL ERROR: (openfoam-2012)
Attempt to cast type calculated to type nutWallFunction at index 2

From To& Foam::refCast(From&, Foam::label) [with To = const Foam::nutWallFunctionFvPatchScalarField; From = const Foam::fvPatchField<double>; Foam::label = int]
in file /home/user2/OpenFOAM/OpenFOAM-v2012/src/OpenFOAM/lnInclude/typeInfo.H at line 162.

FOAM aborting

#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::error::exitOrAbort(int, bool) at ??:?
#2 Foam::nutWallFunctionFvPatchScalarField::nutw(Foam ::turbulenceModel const&, int) at ??:?
#3 Foam::omegaWallFunctionFvPatchScalarField::calcula te(Foam::turbulenceModel const&, Foam::List<double> const&, Foam::fvPatch const&, Foam::Field<double>&, Foam::Field<double>&) at ??:?
#4 Foam::omegaWallFunctionFvPatchScalarField::calcula teTurbulenceFields(Foam::turbulenceModel const&, Foam::Field<double>&, Foam::Field<double>&) at ??:?
#5 Foam::omegaWallFunctionFvPatchScalarField::updateC oeffs() at ??:?
#6 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::Boundary::updateCoeffs() at ??:?
#7 Foam::kOmegaSSTBase<Foam::LESModels::DESModel<Foam ::IncompressibleTurbulenceModel<Foam::transportMod el> > >::correct() at ??:?
#8 ? at ??:?
#9 __libc_start_main in /lib64/libc.so.6
#10 ? at ??:?
Aborted (core dumped)



Thanks in advance



I have solved this problem, my boundary conditions are set incorrectly, mainly because I have to be careful about the setting of inlet, outlet and wall.

zhaohb11_cfd January 23, 2021 05:30

Question about the parallel calculation
 
1 Attachment(s)
Hi everyone
I want to cpuple interfoam and the solidification model to simulate the droplet freezing. Thus I put the T equation in the interFoam solver and compiled. The solver works fine in serial mode. But when I run in parallel. There is error:
//////////////////////////////////////////////////////////////////////////////
Fatal error in MPI_Recv: Message truncated, error stack:
MPI_Recv(224).....................: MPI_Recv(buf=0x1da60c0, count=6400, MPI_BYTE, src=8, tag=1, comm=0x84000002, status=0x7ffec83b2e40) failed
MPIDI_CH3U_Receive_data_found(131): Message from rank 8 and tag 1 truncated; 19200 bytes received but buffer size is 6400
Fatal error in MPI_Recv: Message truncated, error stack:
MPI_Recv(224).....................: MPI_Recv(buf=0x18748a0, count=6400, MPI_BYTE, src=10, tag=1, comm=0x84000002, status=0x7ffe00c99a10) failed
MPIDI_CH3U_Receive_data_found(131): Message from rank 10 and tag 1 truncated; 19200 bytes received but buffer size is 6400
Fatal error in MPI_Recv: Message truncated, error stack:
MPI_Recv(224).....................: MPI_Recv(buf=0x236adb0, count=6400, MPI_BYTE, src=11, tag=1, comm=0x84000002, status=0x7ffd32387010) failed
MPIDI_CH3U_Receive_data_found(131): Message from rank 11 and tag 1 truncated; 19200 bytes received but buffer size is 6400
Fatal error in MPI_Recv: Message truncated, error stack:
MPI_Recv(224).....................: MPI_Recv(buf=0x2a4f080, count=6400, MPI_BYTE, src=9, tag=1, comm=0x84000002, status=0x7ffd606c04e0) failed
MPIDI_CH3U_Receive_data_found(131): Message from rank 9 and tag 1 truncated; 19200 bytes received but buffer size is 6400
//////////////////////////////////////////////////////////////////////////////////
the attachmen is the T Equation file. Can someone know the reason why this error happens

zhaohb11_cfd January 24, 2021 21:34

Error in parallel runnnig
 
Hello, everyone, have you succeeded in running cases in parallel when using the fabian_roesler code. I have followed fabian_roesler's code and it is successful in serial running but failed in paralleling running. I do not know the reason. Have someone met and fixed this problem?


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