Internal coupling and steady state

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
Luciano Garelli
Posts: 280
Joined: Fri Dec 04, 2015 1:42 pm

Internal coupling and steady state

Post by Luciano Garelli »

Hello,

I have been faced with a problem when try to use internal coupling and the steady state solver in CS6, due to that selected field to be coupled looks like it is not been coupled. If I switch to transient simulation the coupling and the solution is fine.

Looking at the cs_convection_diffusion.c in the case of steady simulation (idtvar<0) when the fluxes contribution are computed for the boundary faces are not been included the fluxes in case of IC (icoupl > 0), like in the case of unsteady simulation. This behavior is given for both, scalars and the thermal field (temperature). I have copy the same block of code used for the unsteady case for IC to the steady part and the results seems to be OK and the field is coupled, but I'm no sure if these fluxes are the correct.

Regards,
Luciano
Attachments
scalar_steady.png
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Internal coupling and steady state

Post by Yvan Fournier »

Hello Luciano,

Is the top left picture using the modified or unmodified version ?

On the right, I do not see the orange curve. Is it superimposed with another ?

Which modification did you need to add to the code ? Checking our verification test case, we seemed OK in the steady simulation, but since that test case is pure conduction, we might be going through a slightly different code path...

Best regards,

Yvan
Luciano Garelli
Posts: 280
Joined: Fri Dec 04, 2015 1:42 pm

Re: Internal coupling and steady state

Post by Luciano Garelli »

Hello Yvan,
Yvan Fournier wrote: Tue Sep 17, 2019 2:49 pm Hello Luciano,

Is the top left picture using the modified or unmodified version ?
The top left picture is the unmodified version from the master branch.
Yvan Fournier wrote: Tue Sep 17, 2019 2:49 pm On the right, I do not see the orange curve. Is it superimposed with another
Yes, the orange is superimposed with the another curves. This case is pure conduction.

I attach a diff of the cs_convection_diffusion file and the test case. I not sure that these modifications.

Regards,
Luciano
Attachments
cs_convection_diffusion.txt
(5.3 KiB) Downloaded 167 times
Test_case.zip
(240.05 KiB) Downloaded 148 times
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Internal coupling and steady state

Post by Yvan Fournier »

Hello Luciano,

OK thanks, I'll check that (probably with Erwan's or Martin's help) and get back to you soon.

Best regards,

Yvan
Luciano Garelli
Posts: 280
Joined: Fri Dec 04, 2015 1:42 pm

Re: Internal coupling and steady state

Post by Luciano Garelli »

Hello Yvan,

Thanks for the help, maybe my case setup is wrong.

Additionally, I get the same behavior when I use "anisotropic_turbulent_viscosity" in order to set anisotropic conductivities. I have added a quite similar block of code for the contribution of the boundary faces to the cs_anisotropic_diffusion_scalar() in cs_convection_diffusion.c to get the thermal field coupled.

Regards,
Luciano
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Internal coupling and steady state

Post by Yvan Fournier »

Hello Luciano,

Checking our verification test case, the "steady" case ignores unsteady terms in the equation, but uses the default time-stepping algorithm, so we do not go through the pseudo-steady time step option you used, which explains why we did not notice the issue before... but it is indeed a bug.

Your solution seems mostly OK, except that it ignores some relaxation terms present for internal faces, so convergence behavior may may slightly different from what you would obtain using an equivalent case with interior faces instead of internally coupled faces, but should be OK (I still need to confirm with Erwan).

I'll try to see how to do this cleany and in a maintainable way...

Best regards,

Yvan
Post Reply