steady state version of twophaseeulerfoam
Hi,
I am using the twophaseeeulerfoam solver to simulate air bubbles in water. I want to have a steady state version of the solver. Solution1 According to what I have read, I should first try to underrelax the resolution and raise the time step. I do not understand why? In fact I do not understand the role of underrelaxtion factor in an unsteady solver. Does anyone have a point on the subject or some documentation of the relaxation process in Openfoam (and in general, reading is never bad!)? This could help me to understand. Solution2 On the other hand if I want to change the solver to be steady witch library I was thinking to do so  Remove time dependence in the solver  Change the velpress scheme (I was thinking using simple scheme)  Modify the fvsol and fvscheme dict. Does this seem correct? Does this seem an affordable task for an OF newbee? Thanks for your opinions and help. Regards, 
Hi
I have tried the first solution but it seems that putting a subdict for relaxation at the end of fvSolution has no effect. I am not sure if it is taken into account. So I switched to the coding of a steady twophaseeluerfoam solver. I am tryning to understand how the solver is coded. I have a few questions and my sorry in advance if it seems to easy but my C++ is very bad. 1.fvVectorMatrix UbEqn(Ub, Ub.dimensions()*dimVol/dimTime) Is it possible to modify the definition of fvVectorMatrix like that: fvVectorMatrix UbEqn(Ub, Ub.dimensions())
What is the definition and the purpose of rUaA and UaEqn.A() ? Is this related to the first guess on momentum equation in the PIMPLE algorithm?
4. DDTU.h What is the purpose of having a special file for the equation on UA and UB? Can it be included in my SIMPLE loop since I will move the scheme from pimple to simple. Thanks for any help. Regards, 
for the moderator: I have placed this thread in a more apropriate forum. But i did not manage to delete it.
Sorry for that. regards 
Quote:
In OpenFOAM 2.0.x, the PIMPLE algorithm is used in twoPhaseEulerFoam. If you really have a steadystate in your system, relaxing and increasing the time step should work. First however you have to answer the question "does a steady state exist?". If the answer is "no", the only solution is to perform the simulation dynamically, and average over time. Best, 
Hi,
Thanks for your help as usual ! I agree with you on the difficulty to consider a real steady state in a multiphase flow. Nevertheless, I know the system I want to simulate has already been simulated on FLUENT with the steady state euler/euler solver. Concerning the possibility of including under relaxation to increase my timestep I have two questions please: 1. My actual time step is 0.0002s. What can I expect with underrelaxation? To multiply the timestepd by 2 or 5 or more? I know this question may seem silly. 2. Can you please give me an example of the subdict I need to ad in fvScheme dict. I have tried it before but I think my syntax was bad. Thanks a lot for you help. Miles P.S.: I do not understand the role of underrelaxation in a unsteady simulation… It’s a bit confusing. 
Quote:
It this the case of the air injection in liquid? Quote:
It depends on the system. I would say the rule of thumb is "as much as it is possible without having instabilities". The multifluid equations are a pain to solve due to their mathematical nature. Steadystate solvers rely on a set of tricks to stabilize the solution (local relaxation, heavy global relaxation, ...). 2. Quote:
Code:
relaxationFactors Quote:
It is exactly the same as in the steadystate one: it slows down the changes in the solution while you iterate to find the converged solution for that timestep. To have time accuracy you should not relax at the last iteration (OF takes care of this). Best, 
Hi,
This is indeed the case of the air injected in the water box I have posted earlier. A question about the relaxation script you have posted (thanks for that BTW): Do I have to put the script inside the PIMPLE subdict i.e Code:
PIMPLE Code:
PIMPLE Sydney 
Second choice :)

Thanks alberto.
The strange thing is I did not get any error message with the first syntax! Anyway I have tried the to underrelax. I am still not abble to raise the time step. I still cannot go further than 0.001s. My fv scheme and fvsolutions look like this. If you have the kindness to tell me if they seem correct to you I would appreciate. Thanks for your help anyway. Miles Code:
/** C++ **\ Code:
/** C++ **\ 
Hi Miles,
Your time step will always be bounded by the max courant number in your domain : the faster the bubbles are, the smaller your timestep will be (on a same mesh). You can try to change the grid if you want to get a higher time step. 
Quote:
Best, 
Hi Alberto,
I was looking at bubbleFoam and on the few tests I ran, I had to decrease the time step to keep the courant number under ~0,4. With any higher value, I got some crashs : ( Aurélien 
What Courant number was controlling the timestep? One of the phases or the one depending on Ur?
Best, 
I am talking about the "Max Ur Courant Number". The "Courant Number mean" value is 10 times less than the Ur based one (at least on my case).

Yes, that's usually the problem. I implemented the Partial Elimination Algorithm (PEA) of Spalding to fix that, and it improves things quite a bit.

Hi Alberto,
Sorry to ask you that on this thread. I'm trying to add a source term for the dispersed phase equation in bubbleFoam (or twoPhaseEulerFoam) and I have a problem with my pressure equation. I don't understand how the code is handling the surface projection of the continuity equation to get the pressure equation. I have already opened a thread at this URL : http://www.cfdonline.com/Forums/ope...tml#post329169 If you have few time for some help, it would be really welcome. Thank you. 
All times are GMT 4. The time now is 05:21. 