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?
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.
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.
|All times are GMT -4. The time now is 10:02.|