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. 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
Source term for periodic simulation
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
Source term for periodic simulation
- Attachments
-
- cs_user_source_terms.f90
- (8.86 KiB) Downloaded 231 times
Re: Source term for periodic simulation
Sorry, I noticed a little mistake: in the plot I labelled the X axis as "iteration", while it actually represents the time steps.