CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   U, phi (https://www.cfd-online.com/Forums/openfoam-programming-development/114663-u-phi.html)

ariaballack March 15, 2013 04:44

U, phi
 
hi everybody,
I am solving concentration using diffusion equation and for the convection term I need the velocity (U) . but after 2 seconds, the velocity remains constant (steady) and solving it anymore is just wasting time. Does anyone know how can I read phi after 2 second and continue without solving U anymore?
thanks

Bernhard March 15, 2013 05:29

I don't know how important your start-up phase is (I assume it isn't important), but you can

*write a solver that first calculates the velocity field, and afterwards calculate the diffusion/convection.
* update the present solver with an if( t>2 ) around the solution step for U
* use a solver for flow first, then switch to a seperate solver for convection/diffusion.

JimKnopf March 21, 2013 15:32

A not so elegant but very fast way would be, to write a if statement around the #include "uEqn.H" or the code where you solve the momentum equation. You should also stopp solving the pressure correction.

This approch increases the computational work by one if statement every iteration, wouldn't be very flexible and only valid if U and p are constant after some time. But it is done within a minute.

Greets
Jim


All times are GMT -4. The time now is 04:42.