Page 1 of 1

Source term for periodic simulation

Posted: Mon Mar 28, 2016 6:01 pm
by CTrinca
Hello everyone,

I am having some troubles in running a simulation on a periodic domain. To drive the flow and to keep the flow rate at a constant value, I tried to adapt a subroutine written by Yvan Fournier I found in an old post (http://code-saturne.org/forum/viewtopic.php?f=2&t=1327). I have not had much success so far: although the mass flux reaches the desired value rather quickly, and is kept nicely steady for a while, at some point it starts to decrease, before going into pieces.
mass_flux_vs_iter.png
The simulation goes on for another few iterations, oscillating wildly until it crashes. I am attaching my version of the subroutine: does anyone find any mistake in it, or has any idea about the reason of this behaviour?
As you will see, I was trying to use a different control than that in the original script before I switched back to Yvan's formula, but this did not fix the problem.
Thanks in advance to anyone answering.
Best regards,

Cosimo

Re: Source term for periodic simulation

Posted: Tue Mar 29, 2016 10:41 am
by CTrinca
Sorry, I noticed a little mistake: in the plot I labelled the X axis as "iteration", while it actually represents the time steps.