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

Suppress twoPhaseEulerFoam energy

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

Like Tree5Likes
  • 2 Post By bsoubelet
  • 3 Post By tidusuper91

Reply
 
LinkBack Thread Tools Display Modes
Old   May 6, 2015, 11:11
Default Suppress twoPhaseEulerFoam energy
  #1
Senior Member
 
Robert Sawko
Join Date: Mar 2009
Posts: 117
Rep Power: 14
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, 07:39
Default
  #2
New Member
 
Benoit Soubelet
Join Date: Feb 2015
Posts: 5
Rep Power: 4
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 and BlnPhoenix like this.
bsoubelet is offline   Reply With Quote

Old   July 2, 2015, 10:54
Talking
  #3
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Torino, Italy
Posts: 750
Rep Power: 9
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.

__________________
Im the translator of OpenFOAM User Guide Chinese Edition! But always newbie on CFD.

http://dyfluid.com/en.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: 30
Rep Power: 6
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
Member
 
Join Date: Aug 2014
Location: Berlin
Posts: 61
Rep Power: 4
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: 47
Rep Power: 5
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
Member
 
Join Date: Aug 2014
Location: Berlin
Posts: 61
Rep Power: 4
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
Member
 
tidusuper91's Avatar
 
Ruben Di Battista
Join Date: May 2013
Location: Milan
Posts: 93
Rep Power: 5
tidusuper91 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?
tidusuper91 is offline   Reply With Quote

Old   March 17, 2016, 09:04
Default
  #9
Member
 
Join Date: Aug 2014
Location: Berlin
Posts: 61
Rep Power: 4
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
Member
 
tidusuper91's Avatar
 
Ruben Di Battista
Join Date: May 2013
Location: Milan
Posts: 93
Rep Power: 5
tidusuper91 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.
tidusuper91 is offline   Reply With Quote

Old   March 17, 2016, 10:06
Default
  #11
Member
 
Join Date: Aug 2014
Location: Berlin
Posts: 61
Rep Power: 4
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
Member
 
tidusuper91's Avatar
 
Ruben Di Battista
Join Date: May 2013
Location: Milan
Posts: 93
Rep Power: 5
tidusuper91 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!
tidusuper91 is offline   Reply With Quote

Old   March 30, 2016, 05:26
Default
  #13
Member
 
tidusuper91's Avatar
 
Ruben Di Battista
Join Date: May 2013
Location: Milan
Posts: 93
Rep Power: 5
tidusuper91 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 and BlnPhoenix like this.
tidusuper91 is offline   Reply With Quote

Reply

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
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 15:45
energy in sonicFoam joern OpenFOAM Running, Solving & CFD 0 June 16, 2009 15:53
SIMPLE and energy equation convergence Fabio Main CFD Forum 0 June 1, 2007 06:06


All times are GMT -4. The time now is 03:14.