Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems in calculating tracers with source #79

Open
miaocb opened this issue Aug 30, 2022 · 8 comments
Open

Problems in calculating tracers with source #79

miaocb opened this issue Aug 30, 2022 · 8 comments

Comments

@miaocb
Copy link

miaocb commented Aug 30, 2022

"vsource" and "msource" are used to calculate tr_el (schism_step.F90, line 7469-7487).
According to my understanding, "vsource" used here should be real sources associated with msource, not the sum of vsource, vsink, precipation and evaporation (schism_step.F90, 1602-1641).

@josephzhang8
Copy link
Member

No, vsource in the code is the sum. If it's negative (net sink), tracer mass would leave the domain so msource should not be applied.

@miaocb
Copy link
Author

miaocb commented Aug 31, 2022

Let's consider some scenarios:

(1) A grid element has one source ( 0.1m^3/s ) with tracer and one sink (-0.1m^3/s ), no precipation and evaporation. vsource=source+sink=0. "vsource" is zero, but the tracer can still be taken into the water, just like a bowl of water with one pipe putting ink into the bowl and one pipe taking water out of the bowl. The source and sink are in the same grid emelent, but are separated from each other.

(2) A grid element has one source (0.1m^3/s) with tracer, and evaporation is -0.1m^3/s,no sink, no precipation. vsource=source+evaporation=0. "vsource" is zero, but tracers can also be taken into water because evaporation does not take tracers out.

(3) A grid element has one source (0.1m^3/s) with tracer, and precipation is 0.1m^3/s with no tracer,no sink, no evaporation. vsource=source+precipation=0.2m^3/s. Precipation does not take tracers into water, so "vsource" can not be the sum of source and precipation in the calculation of tr_el.

@josephzhang8
Copy link
Member

josephzhang8 commented Sep 1, 2022 via email

@miaocb
Copy link
Author

miaocb commented Sep 5, 2022

A simple experiment is prepared for testing.
Main configuration:
1 element with size 10mx10m, no open boundary, depth is 5m
initial condition: temperature(20 degC), salinity(0)
1 source, no sink
vsource: 0 m^3/s
msource: temperature (20 degC), salinity (35)
impose_net_flux=1, precipation-evaporation: 0.001kg/m^2/s

The source is 0 m^3/s, and as we know precipation does not take salinity to the water, salinity should be 0, but salinity increases with time as below.
图片

Files of the experiment is attached below.
coarse_prec.zip

@josephzhang8
Copy link
Member

josephzhang8 commented Sep 5, 2022 via email

@miaocb
Copy link
Author

miaocb commented Sep 10, 2022

Hi Joseph,
I know that there may be no perfect method, but I think using vsoure <0 only for original sources is a slightly better choice.
(1) case1, one grid element with size 10mx10m, the source and sink are in the same element.
Results show salt are not taken into the water ( salinity is 0, top right panel in the figure ), since vsource and vsink cancel out according to current method.
图片

(2) case2, refine the grid, with 4 grid elements of size 5mx5m. After refining the grid, the source and sink are in two separate elements. Results show that salt are taken into the water ( salinity reaches 35, top right panel in the figure ),. The results of case1 and case2 are not consistent.
图片

(3) case3, same to case1 except using vsource <0 only for original sources.
The result is now consistent with case2 ( top right panel in the figure ).
图片

I will check how other models (EFDC, Delft3d, Mike, etc.) deals with the case when sink and source are in the same element if needed.

@josephzhang8
Copy link
Member

Hi Paul:

I’d argue that Cases 1 and 2 should NOT give same results; mesh resolution and placement of source/sinks do matter.

@josephzhang8
Copy link
Member

josephzhang8 commented Oct 11, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants