CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Suppress twoPhaseEulerFoam energy

Register Blogs Community New Posts Updated Threads Search

Like Tree27Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 6, 2015, 12:11
Default Suppress twoPhaseEulerFoam energy
  #1
Senior Member
 
Robert Sawko
Join Date: Mar 2009
Posts: 117
Rep Power: 22
AlmostSurelyRob will become famous soon enough
I am playing with the new twoPhaseEulerFoam. We developed a general population balance class as a diameterModel similar to IATE model but we plan to have different methods there. For now we have some good comparisons with analytical solutions for the method of classes but would like to go to method of moments of various forms.

We are really trying hard to follow minimalilty of code and future maintainability, so we believe we have a fairly well abstracted class structure. The twoPhaseEulerFoam solve is untouched and we only add our PBE library to controlDict in order to make our PBE diameter model selectable.

So far so good.

I really like the current implementation of twoPhaseEulerFoam but I still haven't grasped everything. In particular I still haven't dived into thermophysical side of it which is fairly new to me. Thermophysics shouldn't be really playing any role in my PBE cases so I am trying to suppress it as occasionally my cases diverge because of energy equation. Is there a way to do it?

At the moment I switched off all interfacial terms related to temperature and fixed temperature or each boundary of my domain to constant uniform value. Same for internal mesh.

My `thermophysicalProperties' for both phases

Code:
thermoType
{
    type            heRhoThermo;
    mixture         pureMixture;
    transport       const;
    thermo          hConst;
    equationOfState rhoConst;
    specie          specie;
    energy          sensibleInternalEnergy;
}
as I want both of my phases to be imcompressible for testing purposes. This still causes small fluctuations of temperature and an occasional 1000 iterations in the water phase energy equation. On some runs this leads to a simulation crash.

At the moment I just set under relaxtion to 0 and will see how this works, but is there a way to actually supress completely the solution of the energy equation under the new solver without changing the code of the solver?
AlmostSurelyRob is offline   Reply With Quote

Old   July 2, 2015, 08:39
Default
  #2
New Member
 
Benoit Soubelet
Join Date: Feb 2015
Posts: 5
Rep Power: 11
bsoubelet is on a distinguished road
Hello,

Due to repeating crashes with twoPhaseEulerFoam and the energy equations also, we found a way around by by-passing the solution of these equations in the fvSolution file:

Code:
    "e.*"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        //tolerance       1e-7;
        relTol          2;
        minIter         0;
    }
This way you don't solve at all the energy equations, but you don't have to re-write the code.
After several thousands of iterations, I was able to switch them on again with:

Code:
    "e.*"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance       1e-7;
        relTol          0;
        minIter         1;
    }
Hope it will help!
xpqiu, ancolli, BlnPhoenix and 5 others like this.
bsoubelet is offline   Reply With Quote

Old   July 2, 2015, 11:54
Talking
  #3
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 849
Rep Power: 18
sharonyue is on a distinguished road
Quote:
Originally Posted by bsoubelet View Post
Hello,

Due to repeating crashes with twoPhaseEulerFoam and the energy equations also, we found a way around by by-passing the solution of these equations in the fvSolution file:

Code:
    "e.*"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        //tolerance       1e-7;
        relTol          2;
        minIter         0;
    }
This way you don't solve at all the energy equations, but you don't have to re-write the code.
After several thousands of iterations, I was able to switch them on again with:

Code:
    "e.*"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance       1e-7;
        relTol          0;
        minIter         1;
    }
Hope it will help!
Um, thats quite smart. haha. Interesting.

masimasiqi likes this.
__________________
My OpenFOAM algorithm website: http://dyfluid.com
By far the largest Chinese CFD-based forum: http://www.cfd-china.com/category/6/openfoam
We provide lots of clusters to Chinese customers, and we are considering to do business overseas: http://dyfluid.com/DMCmodel.html
sharonyue is offline   Reply With Quote

Old   November 5, 2015, 17:47
Default
  #4
aee
Member
 
Andrew Eisenhawer
Join Date: Nov 2012
Location: Alberta, Canada
Posts: 35
Rep Power: 14
aee is on a distinguished road
Robert,
Could you elaborate a bit on your PBE implementation?

I would like to model emulsion separation in the presence of surfactants, and am feeling pushed towards a PBE solution rather than a modification of the IATE model.

Would you be willing to share code?

Andrew
aee is offline   Reply With Quote

Old   January 10, 2016, 10:37
Default
  #5
Senior Member
 
Join Date: Aug 2014
Location: Germany
Posts: 292
Rep Power: 14
BlnPhoenix is on a distinguished road
I used this work around succesfuly in OF2.3.x. Now that i wanted to do the same in OF3.0.1 it doesn' t work anymore.

When i set:

"e.*"
{
solver smoothSolver;
smoother symGaussSeidel; //
tolerance 1e-7;
relTol 2;
minIter 0;
}

The solver is still solving for "e.air" and "e.water" and calculating "min T.air" and "min T.water". Normally that would not bother me but i suspect it to be the reason twophaseeulerfoam crashes after 4.3 seconds of simulation time.

Is there another possibilty to turn off energy in twophaseeulerfoam OF3.0.1?
BlnPhoenix is offline   Reply With Quote

Old   January 11, 2016, 09:45
Default
  #6
Member
 
Ali
Join Date: Oct 2013
Location: Scotland
Posts: 66
Rep Power: 13
ali.m.1 is on a distinguished road
You can use reactingTwoPhaseEulerFoam, and make the problem isothermal.

This is done by using 'pureIsothermalPhaseModel' in constant/phaseProperties.
ali.m.1 is offline   Reply With Quote

Old   January 11, 2016, 10:32
Default
  #7
Senior Member
 
Join Date: Aug 2014
Location: Germany
Posts: 292
Rep Power: 14
BlnPhoenix is on a distinguished road
Thanks. I will look into that.

I also found out that setting air phase diameter model to "constant" and setting min inter for e.water and e.air to "0" yields quasi-isothermal running. Temperatures are constant during solving.
BlnPhoenix is offline   Reply With Quote

Old   March 17, 2016, 08:15
Default
  #8
Senior Member
 
rdbisme's Avatar
 
Ruben Di Battista
Join Date: May 2013
Location: Paris
Posts: 137
Rep Power: 13
rdbisme is on a distinguished road
Quote:
Originally Posted by BlnPhoenix View Post
I used this work around succesfuly in OF2.3.x. Now that i wanted to do the same in OF3.0.1 it doesn' t work anymore.

When i set:

"e.*"
{
solver smoothSolver;
smoother symGaussSeidel; //
tolerance 1e-7;
relTol 2;
minIter 0;
}

The solver is still solving for "e.air" and "e.water" and calculating "min T.air" and "min T.water". Normally that would not bother me but i suspect it to be the reason twophaseeulerfoam crashes after 4.3 seconds of simulation time.

Is there another possibilty to turn off energy in twophaseeulerfoam OF3.0.1?
I'm in the same situation. Did you figure it out how to shut down energy?
rdbisme is offline   Reply With Quote

Old   March 17, 2016, 09:04
Default
  #9
Senior Member
 
Join Date: Aug 2014
Location: Germany
Posts: 292
Rep Power: 14
BlnPhoenix is on a distinguished road
Hi,

yes, i think i tried what i posted on January 11th:

Quote:
Originally Posted by BlnPhoenix View Post
Thanks. I will look into that.

I also found out that setting air phase diameter model to "constant" and setting min inter for e.water and e.air to "0" yields quasi-isothermal running. Temperatures are constant during solving.
You can try that also. And don't get confused that the solver will show actual temperatures. They should remain constant though during the simulation. Don't forget also to set the same temperature for each phase, e.g. 300 K.
BlnPhoenix is offline   Reply With Quote

Old   March 17, 2016, 09:08
Default
  #10
Senior Member
 
rdbisme's Avatar
 
Ruben Di Battista
Join Date: May 2013
Location: Paris
Posts: 137
Rep Power: 13
rdbisme is on a distinguished road
Quote:
Originally Posted by BlnPhoenix View Post
Hi,

yes, i think i tried what i posted on January 11th:



You can try that also. And don't get confused that the solver will show actual temperatures. They should remain constant though during the simulation. Don't forget also to set the same temperature for each phase, e.g. 300 K.
Thanks for the answer!

Yes, I tried that but I still get
Code:
smoothSolver:  Solving for e.*, Initial residual = 0.997813, Final residual = 0.000848293, No Iterations 6
messages. It seems that the solver ignores the minIter 0 and still solves the energy equation.

The temperature fluctuates around the 300K.
rdbisme is offline   Reply With Quote

Old   March 17, 2016, 10:06
Default
  #11
Senior Member
 
Join Date: Aug 2014
Location: Germany
Posts: 292
Rep Power: 14
BlnPhoenix is on a distinguished road
Hm, if u have set both diameter models to constant i'm afraid i don't know what's causing this. Maybe instead of "minIter" you can try "maxIter"?! Sorry that i can't be of any better help.
BlnPhoenix is offline   Reply With Quote

Old   March 17, 2016, 10:11
Default
  #12
Senior Member
 
rdbisme's Avatar
 
Ruben Di Battista
Join Date: May 2013
Location: Paris
Posts: 137
Rep Power: 13
rdbisme is on a distinguished road
Quote:
Originally Posted by BlnPhoenix View Post
Hm, if u have set both diameter models to constant i'm afraid i don't know what's causing this. Maybe instead of "minIter" you can try "maxIter"?! Sorry that i can't be of any better help.
Thanks for your answer. I will check on that!
rdbisme is offline   Reply With Quote

Old   March 30, 2016, 06:26
Default
  #13
Senior Member
 
rdbisme's Avatar
 
Ruben Di Battista
Join Date: May 2013
Location: Paris
Posts: 137
Rep Power: 13
rdbisme is on a distinguished road
Quote:
Originally Posted by ali.m.1 View Post
You can use reactingTwoPhaseEulerFoam, and make the problem isothermal.

This is done by using 'pureIsothermalPhaseModel' in constant/phaseProperties.
I also managed to avoid energy equation solving with following settings in fvSolutions:

Code:
"(h|e).*"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance       1;
        relTol          0;
        minIter         0;
    maxIter        0;
    }
It's somehow hacky but does the job.
sundaero, xpqiu, ali.m.1 and 9 others like this.
rdbisme is offline   Reply With Quote

Old   March 30, 2017, 05:33
Default
  #14
Member
 
Ali
Join Date: Oct 2013
Location: Scotland
Posts: 66
Rep Power: 13
ali.m.1 is on a distinguished road
Hey

Has anyone managed to make the solver not solve alphat? I don't want temperature to be solved at all, but this still has values, which means it must be affected somehow?

Cheers

Ali
ali.m.1 is offline   Reply With Quote

Old   March 30, 2017, 05:54
Default
  #15
Senior Member
 
rdbisme's Avatar
 
Ruben Di Battista
Join Date: May 2013
Location: Paris
Posts: 137
Rep Power: 13
rdbisme is on a distinguished road
Quote:
Originally Posted by ali.m.1 View Post
Hey

Has anyone managed to make the solver not solve alphat? I don't want temperature to be solved at all, but this still has values, which means it must be affected somehow?

Cheers

Ali
alphat is the turbulent thermal diffusivity. It's retrieved from the turbulence model. With the post just before yours you can make the solver to not solve the energy equation (so related to temperature).

What are you trying to achieve?

Sent from my LeTv x500 (BB72 ROM)
rdbisme is offline   Reply With Quote

Old   March 30, 2017, 06:03
Default
  #16
Member
 
Ali
Join Date: Oct 2013
Location: Scotland
Posts: 66
Rep Power: 13
ali.m.1 is on a distinguished road
Hi

Thanks for the information.

The temperatures do not change anymore with the above post, so thanks for that.

I'm trying to model a slurry flow (2 phase) submerged jet impingement, but the solver is struggling to converge. I'm just looking for tips for convergence!

It seems to be the turbulence which is blowing up all the time, as omega (KOmegaSST) is up to 1000ish.

Alasdair
lourencosm likes this.
ali.m.1 is offline   Reply With Quote

Old   March 30, 2017, 06:28
Default
  #17
Senior Member
 
rdbisme's Avatar
 
Ruben Di Battista
Join Date: May 2013
Location: Paris
Posts: 137
Rep Power: 13
rdbisme is on a distinguished road
Quote:
Originally Posted by ali.m.1 View Post
Hi

Thanks for the information.

The temperatures do not change anymore with the above post, so thanks for that.

I'm trying to model a slurry flow (2 phase) submerged jet impingement, but the solver is struggling to converge. I'm just looking for tips for convergence!

It seems to be the turbulence which is blowing up all the time, as omega (KOmegaSST) is up to 1000ish.

Alasdair
As a general suggestion checklist:
  1. Check your mesh (run checkMesh utility). Too high aspect ratios produce lots of troubles. Check also orthogonality.
  2. Check BCs.
  3. Try to use the adjustableRunTime constraint on the time-stepping with a low target Courant number (0.5 or lower)
  4. try to use diffusive schemes (i.e. upwind)

Let us know how it goes and if you manage to solve the problem (and how!!)
jylee4 likes this.
rdbisme is offline   Reply With Quote

Old   July 11, 2017, 16:00
Default
  #18
Member
 
Hooman
Join Date: Apr 2011
Posts: 35
Rep Power: 15
hooman.4028 is on a distinguished road
Quote:
Originally Posted by tidusuper91 View Post
As a general suggestion checklist:
  1. Check your mesh (run checkMesh utility). Too high aspect ratios produce lots of troubles. Check also orthogonality.
  2. Check BCs.
  3. Try to use the adjustableRunTime constraint on the time-stepping with a low target Courant number (0.5 or lower)
  4. try to use diffusive schemes (i.e. upwind)

Let us know how it goes and if you manage to solve the problem (and how!!)
Hello Ruben,

I have problems using twoPhaseEulerFoam/reactingTwoPhaseEulerFoam. My p_rgh blows up and my temperatures go to very high numbers. This is confusing to me, since I set maxIter and minIter both to zero for h/e equations. Can you please guide me on this? Relaxation factor: 0.5, maxCo 0.5. OF 4.1.


Thanks!
hooman.4028 is offline   Reply With Quote

Old   July 11, 2017, 16:02
Default
  #19
Senior Member
 
rdbisme's Avatar
 
Ruben Di Battista
Join Date: May 2013
Location: Paris
Posts: 137
Rep Power: 13
rdbisme is on a distinguished road
Quote:
Originally Posted by hooman.4028 View Post
Hello Ruben,

I have problems using twoPhaseEulerFoam/reactingTwoPhaseEulerFoam. My p_rgh blows up and my temperatures go to very high numbers. This is confusing to me, since I set maxIter and minIter both to zero for h/e equations. Can you please guide me on this? Relaxation factor: 0.5, maxCo 0.5. OF 4.1.

Thanks!
Dear hooman, generally that means that something wrong is happening. Describe better your geometry and the boundary conditions you configured on it.

Most probably the computation is diverging somewhere else influencing also the value of the temperature somehow.

Try also to post an excerpt of the log so we can see what is happening...

Sent by my Honor 8 using Tapatalk
rdbisme is offline   Reply With Quote

Old   July 11, 2017, 16:13
Default
  #20
Member
 
Hooman
Join Date: Apr 2011
Posts: 35
Rep Power: 15
hooman.4028 is on a distinguished road
Quote:
Originally Posted by tidusuper91 View Post
Dear hooman, generally that means that something wrong is happening. Describe better your geometry and the boundary conditions you configured on it.

Most probably the computation is diverging somewhere else influencing also the value of the temperature somehow.

Try also to post an excerpt of the log so we can see what is happening...

Sent by my Honor 8 using Tapatalk
I appreciate the quick response. It is a simple fluidized bed case (3D). The files are in the following link:

https://www.dropbox.com/s/2lrcoyzymx...files.rar?dl=0
hooman.4028 is offline   Reply With Quote

Reply


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
energy in sonicFoam joern OpenFOAM Running, Solving & CFD 1 September 24, 2019 01:15
energy spectra from LES simulations kumar OpenFOAM Post-Processing 2 February 23, 2016 13:25
Natural convection, problems with total energy balance MdoNascimento STAR-CCM+ 0 March 13, 2014 13:15
ATTENTION! Reliability problems in CFX 5.7 Joseph CFX 14 April 20, 2010 16:45
SIMPLE and energy equation convergence Fabio Main CFD Forum 0 June 1, 2007 07:06


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