[Dispersion in frozen flow] - issue with user scalar value at boundary

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
Matthieu G
Posts: 3
Joined: Fri May 14, 2021 12:10 pm

[Dispersion in frozen flow] - issue with user scalar value at boundary

Post by Matthieu G »

Hello,

I am trying to perform simulation with the atmospheric module in order to test dispersion scenari of user scalar with an Eulerian approach (concentration of pollutant in this special case)

The pollutant is quite dillute (very low volume fraction) and we are working in steady flow. Besides, many dispersion scenari are likely to be tested, so we would like to divide each cases as follows:
- simulation of flow without pollutant (monospecies)
- simulation of the pollutant dispersion through the previously calculated frozen carrier flow. Such a pollutant comes from a surface source at the domain border (modeled as smooth wall in the previous stage).

I try to work only with the GUI. Regarding the dispersion of pollutants, I choose a Dirichlet boundary condition imposing a constant concentration value at the source.

The flow simulation gives satisfactory results. Nevertheless, it seems that the dispersion case does not match the boundary condition at the source. Indeed, the simulation tends to underestimate the value I impose with the boundary conditions by ca 90%. Such a value is not even reached in the overall domain. Besides, the concentration profile at the surface is not uniform.

Is there something I am missing? I work on Code_Saturne v6.0.6.

Please find attached the complete project. (You can launch flow and dispersion with the runall.sh script in DATA folder. Just add the path where code_saturne executable is located)

Thanks for your attention. I’m looking forward to your reply.

Best regards,

Matthieu
Attachments
test_atmospheric_dispersion.tar.gz
(1.64 MiB) Downloaded 118 times
Martin FERRAND
Posts: 44
Joined: Wed Mar 14, 2012 10:06 am

Re: [Dispersion in frozen flow] - issue with user scalar value at boundary

Post by Martin FERRAND »

Hello,

I think you should impose a flux rather a Dirichlet BC because otherwise the ongoing value of scalar is only from diffusion flux.

Could test that?
There is also a possibility to perform scalar balance in the GUI.

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

Re: [Dispersion in frozen flow] - issue with user scalar value at boundary

Post by Yvan Fournier »

Hello,

I'll let Martin or another specialist of the atmospheric model complete my answer but in case there are issues with the frozen flow model (due to face mass fluxes not being recomputed), could you check if you have the same problem in a non-frozen flow ?

To my knowledge, most atmospheric dispersion computations I am aware of use a volume source term instead of boundary condition, so issues with BC's might have not been seen before, but I'll let specialists confirm that (and remind them to check).

Also, a few fixes have been done in the GUI for atmospheric flows recently, for v7.0, and a V7.0-RC1 release is imminent (within 1 week), so this might be of use to you.

Best regards,

Yvan
Matthieu G
Posts: 3
Joined: Fri May 14, 2021 12:10 pm

Re: [Dispersion in frozen flow] - issue with user scalar value at boundary

Post by Matthieu G »

Hello,

First of all, thank you for your time and reactivity!

I already tried to use a flux boundary condition instead of Dirichlet. I am facing the same issue regarding the concentration profile at the surface, which remains inhomogeneous. Can it be related to the fact that I imposed wall boundary conditions for the flow in the first stage?

How should I set the parametrization for scalar balance equation in the GUI? Should I add all scalars or only the user scalar? I am a bit confused...

I also tried to use a volumetric source term with routine. To the best of my knowledge, there is only an explicit term, which reads:



with target mass fraction at the source, cell volume, friction velocity and cell height (thickness in normal direction).

It still gives non-uniform concentration profiles at the pollutant source though. Please find attached the corresponding user file. Does it look correct? Do you think I should change it?

Another idea I had is use a source term for unsteady case:



with the time step.

Still, I encountered similar issues as the steady case.

I just tried to simulate dispersion in a non-frozen flow :
- with unchanged boundary conditions for the flow (wall at the pollutant source): imposing a Dirichlet boundary condition for the user scalar gives similar results as frozen flow case, as well as flux boundary condition.
- Switch from wall to inlet boundary condition for the flow at the pollutant source: imposing a Dirichlet boundary condition for the user scalar still leads to concentration values much lower than the one imposed by ca 90%, but the concentration profile tends to be homogeneous! (We can not impose a flux BC at the source for the user scalar in this case of course.)

I will also download Code_Saturne v7.0 in a near future. I'll keep you informed about further investigations!

Again, thank you for your replies.

Best regards,

Matthieu
Attachments
cs_user_source_terms.f90
(31.54 KiB) Downloaded 113 times
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: [Dispersion in frozen flow] - issue with user scalar value at boundary

Post by Yvan Fournier »

Hello,

The subroutine seems ok (I did not ee any obvious errors).

This behavior is strange, as things should be conservative. Do you have a small test case you could share which illlustrates the problem (especially to see if the non-uniform behavior wth BC's is a postprocessing artifact, or a bug) ?

You may also try using a convective inlet for injection of the scalars instread of a regular inlet, so as to avoid diffusion effects in the injection cells.

Best regards,

Yvan
Matthieu G
Posts: 3
Joined: Fri May 14, 2021 12:10 pm

Re: [Dispersion in frozen flow] - issue with user scalar value at boundary

Post by Matthieu G »

Hello,

Thank you for your advice.

I just put a convective inlet BC at the source as you suggested, for dispersion in a non-frozen flow. The concentration profile is quite homogeneous. Though the max value (near pollutant source) remains under the prescribed concentration at the source by ca an order of magnitude. I attached a screenshot of results, focused on the pollutant concentration near surface source (diskus shape) at the ground. I prescribed value of 0.001.

Actually, the aforementioned case is the one I shared yesterday. It is not so heavy: the mesh comprises ca 90.000 cells.

I run all calculations on 4 local cpus.

For flow simulation without dispersion, such calculations last ca 1 minute for 200 iterations. Regarding the dispersion case, it also takes around 1 minute for the simulation to be achieved (800 iterations). For dispersion simulation in a non-frozen flow, calculations last 4 minutes for 500 iterations. Changing BCs does not lead to substantial change in duration.

As complementary file, please find also attached the setup case corresponding to the dispersion of pollutant in non-frozen flow.

Again, thank you very much for your help and time.

Best regards,

Matthieu
Attachments
setup_atmospheric_flow_dispersion.xml
(17.46 KiB) Downloaded 107 times
concentration_dispersion_nonFrozenFlow.png
Post Reply