GithubHelp home page GithubHelp logo

Comments (8)

josephzhang8 avatar josephzhang8 commented on August 16, 2024

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.

from schism.

miaocb avatar miaocb commented on August 16, 2024

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.

from schism.

josephzhang8 avatar josephzhang8 commented on August 16, 2024

from schism.

miaocb avatar miaocb commented on August 16, 2024

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

from schism.

josephzhang8 avatar josephzhang8 commented on August 16, 2024

from schism.

miaocb avatar miaocb commented on August 16, 2024

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.

from schism.

josephzhang8 avatar josephzhang8 commented on August 16, 2024

Hi Paul:

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

from schism.

josephzhang8 avatar josephzhang8 commented on August 16, 2024

from schism.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.