two-way coupling with the lagrangian module

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
Becker Ralf

two-way coupling with the lagrangian module

Post by Becker Ralf »

Hello,
I've a question concerning the two-way coupling of  the particle tracking code.
According to the documentation the two-way coupling on mass is activated by setting  IILAGR = 2 and LTSMAS = 1 in the subroutine uslag1().
But,  while doing so, I've found that no mass is added to  the continuous phase, even if TSLAGR(,ITSMAS) is unequal from zero.
Searching the base code of Code_Saturne I've detected that the mass source terms arising from the lagrangian calculation are only respected, if
the flag IRNPNW is not equal one (-> resolp()) .
Is is save to alter IRNPNW to zero from the default value one ? Or, is there another way of activating the mass coupling ?
Thank you in advance.
Kind regards,
Ralf Becker
 
Mickael Hassanaly

Re: two-way coupling with the lagrangian module

Post by Mickael Hassanaly »

Hello,
Do you set IMPVAR or IDPVAR equal to one? If not, mass source terms won't be taken into account.
Regards
Mickaël
Becker Ralf

Re: two-way coupling with the lagrangian module

Post by Becker Ralf »

Hello Mickael,
 
thank you for the suggesting.
You are right, setting IDPVAR and IMPVAR enable the appropriate particle evolution equations and the difference of mass/diameter will result in
a mass source term.
But, I don't believe this will solve my problem.
In the base code there are only a few places where the lagrangian source terms stored in TSLAGR() are accounted for.
TSLAGR(,ITSMAS) is used in two lines in resolp(), where one of the two lines is executed only if IRNPNW = 0.
 
If I set IRNPNW=1 (default) and TSLAGR(,ITSMAS) is for some elements nonzero, the code does not account for the mass source
terms by correcting the cell velocity. Moreover the mass flow at the outlet does not differ from the inlet mass flow for the continuous phase.
But by setting IRNPNW = 0 the mass source terms will result in a velocity change (reasonable!) and hence the outlet mass flow is larger than the inlet mass flow.
 
My difficulties arise from the fact that IRNPNW is not listed in the documentation and I'm not sure about the side effects by setting IRNPNW=0.
 
Kind regards
Ralf Becker
 
 
 
Mickael Hassanaly

Re: two-way coupling with the lagrangian module

Post by Mickael Hassanaly »

Hello Ralf,
Could you send us your mesh, set up files and subroutines?
 
Best regards
 
Mickaël Hassanaly
Becker Ralf

Re: two-way coupling with the lagrangian module

Post by Becker Ralf »

Hello Mickael,

below you will find my setup.

Some explanations:
- In usproj.f90 the grand total of the lagrangian mass sources and the decrease of the total mass of the particles is evaluated.
- lagimp.f90 is included as there are no provisions in the code to access the constants of the mass evolution equation.
- usini1.f90: You may alter the previously mentioned parameter IRNPNW to zero (line 1196) to account for the mass source terms.   By doing so you will notice that the outlet mass flow balances the mass source terms.
 
Thank you for the help.
 
Ralf Becker
Attachments
twowaycoupling.tgz
(551.5 KiB) Downloaded 214 times
Post Reply