Does anyone have the experienc
Does anyone have the experience dealing with outlet boundary condition by setting zero pressure gradient and zero velocity gradient. Some sigular point always arise and my job gets killed.
|
How are you setting the pressu
How are you setting the pressure-level given that the outlet no longer sets it? Do you have a reference cell in the domain? What code are you running?
|
I create a solver based on ico
I create a solver based on icoFoam.C by adding a piece of code before the pressure solution used to scale the flux on the outlet boundary to satisfy
global continuity (refered to Dr. Hrvoje Jasak's dissertation, thanks Hrv!). I do not use reference cell in the domain. |
If you have zero-gradient boun
If you have zero-gradient boundary conditions for p over all the boundaries and you are not using a reference cell how are you stopping the pressure level float?
|
Thanks Henry,
Probably this
Thanks Henry,
Probably this is the reason my job get killed. Is there any similar code in the OpenFoam package I could follow to set the reference cell? |
All the solvers include code l
All the solvers include code like:
fvScalarMatrix::reference pRef = pEqn.setReference(pRefCell, pRefValue); pEqn.solve(); pEqn.unsetReference(pRef); Which sets the pressure reference if necessary as dictated by the set of pressure boundary conditions. |
Oh, I do keep this part of cod
Oh, I do keep this part of code from icoFoam.C. So the problem is where should I provide the reference cell label and value? Is it in the file of 0/p or some where else? The default values seem to be pRefCell=0 and pRefValue=0.
|
The default is 0 and 0 but it
The default is 0 and 0 but it shouldn't matter what location or value you choose if the purpose is simply to stop the pressure level floating. However you can change them if you wish to; they are read from the PISO or SIMPLE sub-dictionaries of fvSolution.
|
Hi Henry,
Yes, I do not reall
Hi Henry,
Yes, I do not really care where is the reference zero pressure. I will just keep it to be default value. When I apply my solver to a simple 3 dimensional straight duct flow problem with one inlet and one outlet, it always get stuck when set the outlet to be zero pressure gradient. |
You might find it useful to st
You might find it useful to study the operation of the adjustPhi(phi, U, p) call in simpleFoam which I implemented to adjust the inlet and outlet fluxes to obey continuity during the solution of stready-state cases when the outlet pressure BC is not fixed-value. You will probably find it can be included directly into your icoFoam-based code for your case in the same way as it is used for simpleFoam. If you would like to look at the source for this function it is in OpenFOAM-1.1/src/cfdTools/adjustPhi.
|
Hi Henry,
Thanks for offering
Hi Henry,
Thanks for offering me so much help. In the tutorial's simpleFoam directory, there is a sample case "pitzDaily", the geometry is quite similar to my problem. The outlet pressure BC is "fixedValue, uniform 0" in the tutorial, it runs perfect with simpleFoam. Now I change it to be zeroGradient, it get stuck. Here is the erro message: --> FOAM FATAL ERROR : Continuity error cannot be removed by adjusting the outflow. Please check the velocity boundary conditions and/or run potentialFoam to initialise the outflow. Function: adjustPhi(surfaceScalarField& phi, const volVectorField& U,const volScalarField& p in file: adjustPhi/adjustPhi.C at line: 108. FOAM exiting |
What is the initial value for
What is the initial value for U? If it is (0 0 0) try either restarting from the solution you obtained with the fixedValue p outlet or set it to the inlet value.
|
Yes, the initial U was (0 0 0)
Yes, the initial U was (0 0 0). After I restart it from the solution of fixedValue p, it works;) So, can we conclude that the zeroGradient pressure BC is quite sensitive to the initial condition? Now a new problem arise;( if I have a multi-outlet domain, eventually, all of the outlets need to be set as zeroGradient pressure. How can I set the fixed pressure value for every outlets to get "predictor solution", all to be the same of zero?
|
The problem is that the outlet
The problem is that the outlet flux cannot be scaled to obey continuity if it's value is zero. If you want to use a continuity-adjusted outlet condition you need a sensible flow-field on which it can operate and a sensible choice is to start from is the potential-flow solution or at the very least some kind of mean value or the inlet value.
|
Hi Henry
Thanks for so many i
Hi Henry
Thanks for so many informative responses. I am running the simpleFoam for a pipe with multiple outlets. Can I still set all of the outlets to be zeroGradient pressure and velocity? Some strange result is obtained when I do that. One outlet branch's flux is almost zero which is wrong. |
I am not sure if the problem i
I am not sure if the problem is well-posed if you specify zeroGradient pressure and velocity on multiple outlets without further specification. I seem to remember people also specifying the outflow split for multiple outflows, are you familar with doing this? Have you run such cases with other codes?
|
I have not done the outflow sp
I have not done the outflow split stuff before. We run the same geometry with Fidap, it works. However, in Fidap, users only need to specify the velocity BCs for inlet and outlets (fixed flux for inlet and zeroGradient for outlets in our case).
|
You definitely need the outflo
You definitely need the outflow split, otherwise the split from the first iteration of the solver will be preserved. Since the solution after the first iteration is pretty bad, your solution probably looks silly.
Specifying just inlet and outlet gives you a class of equivalent solutions and nothing to correct it so you need additional specification. Other codes behave in various ways: Star uses outflow split and I am pretty sure Fidap uses pressure outlet oundary where this issue does not occur. Enjoy, Hrv |
Hi Hrv,
Thanks. Could you poi
Hi Hrv,
Thanks. Could you point out a reference dealing with the outflow split for me? |
Could you please explain in mo
Could you please explain in more detail the outlet boundary conditions you used in Fidap for both velocity and pressure because it is not clear from what you have written.
|
For Fidap, we set boundary con
For Fidap, we set boundary condition for outlets as:
BCFLUX( ADD, N3, ENTITY="outlet", CONSTANT=0.0 ) According to the Fidap manual: BCFLUX: "normal component of total normal stress", and "N3" is the outlet patches' normal direction. and we did not set pressure conditions. |
Does Fidap make an assumption
Does Fidap make an assumption about the outlet pressure or does it assume zero-gradient or some other kind of extrapolation?
|
I can not find it from the man
I can not find it from the manual. Probally they do it secretly;)
Thanks again for all your help! |
I've got an idea for you: try
I've got an idea for you: try solving potential flow (using potentialFoam) and then start the Navier-Stokes solution from that - it may give you what you expect.
Hrv |
Hi Hrvoje Jasak,
I am a n
Hi Hrvoje Jasak,
I am a new OpenFOAM user and I want to solve the continuity and 2 D navier stokes equations at steady state for incompressible flows. Where should I start? Can you give me some tips please. Regards adil |
Hi,
Use simpleFoam. Start
Hi,
Use simpleFoam. Start by reading the manuals and do the tutorial; if you want to know the algorithm, have a look at my Thesis (available on-line) or any standard CFD book like Ferziger and Peric for example. Good luck, Hrv |
Hi Jasak,
Thanks for your
Hi Jasak,
Thanks for your advice but many thanks for your Phd Thesis. Regards adil |
Hi,
I use interFoam to simula
Hi,
I use interFoam to simulate rising bubbles I am interested in the detachment of the bubble from the inlet (where air is injected), and its shape after detachment. But the calculation are stopped because of the outlet conditions. I just want the bubble to disappear from the domain so I set Neumann boundary condition for U, pd and gamma. If the mesh is small enought, the first bubble disappear from the outlet. but from the next one, there is 4 small amount of air that stay on the boundary and keep growing and slow the computation My colleague use a free surface with their own code, so I tried to set air in the last cells, but the results are very strange and it still slows too much the computation Does anyone has experienced this problem before? or could guess some better outlet conditions? Thank you Aurelia |
All times are GMT -4. The time now is 14:02. |