Coder Social home page Coder Social logo

Comments (9)

smolins avatar smolins commented on August 20, 2024

Saubhagya,

I believe the qmass,source is in units of m/s. Can you point out where in the code you see this problem?
Thanks

Sergi

from ats.

ecoon avatar ecoon commented on August 20, 2024

Did this get solved?

from ats.

ecoon avatar ecoon commented on August 20, 2024

Ok, I think I see the confusion. If this is surface flow, we often use m/s as the mass source unit (e.g precipitation is typically recorded in m/s). But in the subsurface we assume that the mass source is in units of mol/m^3/s. And more generally, because our mass flow equation conserves mols of water, we require sources in mol/(volume unit)/s. So it is somewhat of an accident that this works as is for surface water.

I think I agree with Saubhagya here that we're missing a factor of 1/density, at least by default, and the user should have to tell us if they want to give a mass source in m/s.

from ats.

smolins avatar smolins commented on August 20, 2024

from ats.

saubhagya-gatech avatar saubhagya-gatech commented on August 20, 2024

Once this issue is closed and changed are merged in the master, the input file for one of the sorption regression test need to be updated. Value of molar density of water need to be changed from 1 to 55500.
https://github.com/saubhagya-gatech/ats-regression-tests/blob/7bd34016dbb8e00432427ccad358b0a26f1bc90c/07_reactive_transport/reactive_transport-subsurface_sorption_logical.xml#L402

from ats.

ecoon avatar ecoon commented on August 20, 2024

Note this test has now been merged into ats-regression-tests master, so we'll have to update the test when @dasvyat rt-fixes branch pull request comes in.

from ats.

ecoon avatar ecoon commented on August 20, 2024

@smolins Sergi, I just wanted to point out that this is now closed for real, which likely breaks your test. For surface flow and coupled reactive transport, the "water source in meters" must be set to false, and the units of the water source must be in [mol m^-2 s^-1]. I recognize that this may be a bit annoying, but it is the natural unit of the source (as every other PDE is defined this way). If I can, I will try to find a way to have the MPC check for this option, and ensure it is correctly set in the flow PK.

I now believe that setting "water source in meters" to default to true was a mistake, and hopefully will likely change that default to false soon. It is a bit hard to change defaults though, because it is hard to catch input files that depended upon it...

The easiest way to fix your test would be to simply create an evaluator, e.g.:

   <ParameterList name="water_source" type="ParameterList">
     <Parameter name="field evaluator type" type="string" value="multiplicative evaluator" />
     <Parameter name="evaluator dependencies" type="Array(string)" value="{surface-precipitation_rain, surface-molar_density_liquid}" />
   </ParameterList>

Or something similar that multiples your current source (in m/s) times the density (mol / m^3) to get the right units (mol / m^2 / s).

from ats.

ecoon avatar ecoon commented on August 20, 2024

Ok, maybe I'm backtracking on this and will add a matching option to transport "water source in meters". This thing must however default to false (because it makes no sense in the subsurface case, it cannot be true there). So if you're doing surface transport, you can set this to true manually, which matches the default in flow.

from ats.

smolins avatar smolins commented on August 20, 2024

from ats.

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.