Git Product home page Git Product logo

Comments (4)

sjordan29 avatar sjordan29 commented on June 13, 2024

When I put boundary conditions into external cells, there was a lot of E. Coli buildup within the model domain that was unexpected. At first, I thought that E. Coli was not leaving the model domain. However, after some exploration, I found that when E. Coli is placed in a ghost cell (outside the model domain), the E. Coli doesn't flush out of the model domain as quickly as (I think) we should expect. I ran a test by putting some E. Coli in an upstream ghost cell at two distinct timesteps (t=1 and t=500). The results of that are shown below, with each line being an E. Coli concentration timeseries for a single cell in the model domain:

bokeh_plot (18)

I compared this with placing the same amount of E. Coli at the same two timesteps at two upstream cells that are within the model domain:

bokeh_plot (19)

Zoomed into see downstream cells better:
bokeh_plot (20)

This seems more in line with what I would expect, with peaks that flush out relatively quickly.

My current theory is that this is due to how ghost cells are currently configured in the model. The 'volume' (which is technically 0 in the HDF output) in the ghost cells as is currently calculated as the total flow across the edge between the real cell and ghost cell in a given timestep. However, this results in very high volumes for ghost cells (see a comparison of volume for an external/ghost cell and an internal cell on opposite sides of a boundary face below):

bokeh_plot (21)

I believe the calculation of ghost cell volume should be adjusted so that the load entering the model domain is not so high. Will continue to explore this issue.

from clearwater-riverine.

sjordan29 avatar sjordan29 commented on June 13, 2024

Note: this is all a comparison for ghost cell 4013 (edge = 6453).

I compare face flows in RAS output with the values calculated by Jason for input, and they are the same, as expected:

bokeh_plot (25)

However, when I compare the loads that I calculate in RAS to the loads that Jason calculated from the qser and dser files, my loads are way too high! I calculate loads as concentration * volume / dt. The volume is calculated based on the flow across the edge and dt.

bokeh_plot (23)

When I adjust the calculation to use concentration and face flow, and see that the load calculated is in line with the values calculated by Jason:

bokeh_plot (24).

Clearly something is going wrong in this calculation where I get a value several orders of magnitude higher. Perhaps a unit conversion. Will investigate further.

from clearwater-riverine.

sjordan29 avatar sjordan29 commented on June 13, 2024

In the comment referenced above, the issue with E. Coli building over time was actually due to adding boundary conditions to the solution array:

solution += inp[t][:]

rather than replacing solution array values with boundary conditions:

solution[inp[t].nonzero()] = inp[t][inp[t].nonzero()]

within the RHS class's updateValues function.

Fixing this issue results in much stronger alignment between RAS and EFDC output:

example-1

from clearwater-riverine.

sjordan29 avatar sjordan29 commented on June 13, 2024

Addressed in Release 0.4.0

from clearwater-riverine.

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.