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/)
-   -   Adjuting oulet pressure till inlet pressure reaches a certain value in timestep (https://www.cfd-online.com/Forums/openfoam-solving/206531-adjuting-oulet-pressure-till-inlet-pressure-reaches-certain-value-timestep.html)

pvpnrao September 8, 2018 20:33

Adjuting oulet pressure till inlet pressure reaches a certain value in timestep
 
Dear Foamers

I am using icofoam in openFOAM 5.x to simulate transient laminar flow. My geomentry contains single inlet and multiple outlets. At inlet I am using timeVaryingMappedFixedValue boudary condition for the velocity. This is because I have a pulsating inlet velocity. The pressure BC at the inlet is zeroGradient.

At the outlets I have zeroGradient BC for velocity and for pressure I use an expression that applies the pressure as a function of the outlet area. In the pressure formula there is an adjustment factor which is basically a scalar multiple.

Previously, I was running a steady inlet velocity cases and I created a dictionary with READ_IF_MODIFIED option through which, during the iterations, I was chaging the adjustment factor (which in turn adjusted the outlet pressure) till I achived the desired pressure at the inlet.

Now, with pulsatile inlet velocity, I wish to adjust the oulet pressure in each time iteration (prior going to the next time-step) till the desired inlet pressure is achieved . But, I am getting stuck on how to getting this functionality to work.

What I wish to do (in Icofoam) is:
read velocity from constant/boundaryData/inlet/<timefolder>/U >> evaluate the pressure and velocity field >> check the inlet pressure >> if the inlet pressure is not within certain range >> change the adjustment factor at outlet >> recalcualate the new pressure and velocity field >> check the inlet pressure >> if inlet pressure is within desired range >> go to the next time step.


Any help, or leads pointing me in the right direction, will be highly appreaciated

pvpnrao September 10, 2018 12:25

If I use pimpleFOAM solver.
Then: can I add the bundary condition updating code within the nOuterCorrector loop.


Will the solver then update the boundary condition after each pimple loop?

pvpnrao September 11, 2018 10:14

In understand this must be trivial issue. But, I have been stuck on this for past two weeks.


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