Git Product home page Git Product logo

Comments (14)

aufdenkampe avatar aufdenkampe commented on June 1, 2024

@sjordan29, thanks for creating this issue.

If I understand correctly from this issue and our previous discussions, the fundamental issue is that of which depth to use when converting from edge length to face area. Presently, the code only uses the average depth of the cell on one side of the edge. Therefore, the calculated area is different based on which side of the edge is used for depth. Is that right?

If so, it would make a lot of sense for us to use a weighted average approach, so that the edge/face area is identical regardless of which direction the calculation is "looking".

from clearwater-riverine.

sjordan29 avatar sjordan29 commented on June 1, 2024

@aufdenkampe Yes, that is correct. I can work on implementing that weighted average approach if you think that makes the most sense!

To confirm - are you thinking the average would be weighted by the distance of the cell centers to the edge? I'll have to think about how to tackle that.

from clearwater-riverine.

sjordan29 avatar sjordan29 commented on June 1, 2024

@jrutyna pointed out that cell volume and the total flow across a face are optional outputs from RAS, which would make this calculation irrelevant.

  • Add error messages when these items are not in the HDF output file that direct the user to add necessary outputs to RAS model run.

from clearwater-riverine.

aufdenkampe avatar aufdenkampe commented on June 1, 2024

@sjordan29, that's great news! Could @jrutyna, Jon, or Craig rerun the box model to get these outputs?

Can we also rerun the model that @TSteissberg added to the repo, to get those outputs?

from clearwater-riverine.

jrutyna avatar jrutyna commented on June 1, 2024

@sjordan29, I reran the box model and selected all of the available 2D output variables. I verified that "Cell Volume" and "Face Flow" are now showing up in the *.hdf output file. I also noticed that Cell and Face eddy viscosity are also present, I think someone mentioned they needed these output variables yesterday. Please see the "BoxModel.p02.hdf" file in the model directory: I:\2ERDC12\Task5_ClearWater\Box Model

image

from clearwater-riverine.

jrutyna avatar jrutyna commented on June 1, 2024

@aufdenkampe, I went looking for for the Muncie model HEC-RAS input files but I only found a HEC-RAS hdf output file and what appears to me some post-processing files related to Muncie. Please let me know if I have overlooked something or if we need to request the Munice HEC-RAS input files from @TSteissberg :

Muncie.p04.hdf:
ClearWater-riverine/riverine/tests/input_files at archive_2021 · EnvironmentalSystems/ClearWater-riverine (github.com)
ClearWater-riverine/tests/input_files at archive_2022-July · EnvironmentalSystems/ClearWater-riverine (github.com)

Post-processing Files:
ClearWater-riverine/riverine/tests/output_files at archive_2021 · EnvironmentalSystems/ClearWater-riverine (github.com)
ClearWater-riverine/tests/output_files at archive_2022-July · EnvironmentalSystems/ClearWater-riverine (github.com)

from clearwater-riverine.

aufdenkampe avatar aufdenkampe commented on June 1, 2024

@jrutyna, thanks for re-running the box model with Face Flow and Face Eddy Viscosity outputs turned on, above in #4 (comment).

My understanding is that Face Area = Face Flow / Face Velocity. Is that correct? I assume the units are explicit to confirm.

Also, my understanding is that Face Eddy Viscosity would allow us to calculate the eddy diffusivity (or dispersion coefficient) for each face. @jrutyna, can you share that conversion equation with us?

from clearwater-riverine.

aufdenkampe avatar aufdenkampe commented on June 1, 2024

@jrutyna, Thanks for looking closely at the Muncie model files. It appears that we indeed need to request the input files from @TSteissberg. I'll do that.

from clearwater-riverine.

aufdenkampe avatar aufdenkampe commented on June 1, 2024

From @TSteissberg:

That's great news and more great news! Awesome!

The fastest and best way for me to get those [Muncie model input files] to you is to point you to HEC's official download of example projects:

https://github.com/HydrologicEngineeringCenter/hec-downloads/releases/download/1.0.25/HEC-RAS_63_Example_Projects.zip

You should find everything you need for Muncie under the 2D example projects.

from clearwater-riverine.

jrutyna avatar jrutyna commented on June 1, 2024

@aufdenkampe, yes the Face Area can be calculated as you prescribed. An alternate method to calculate Face Area would be to use Face Water Surface and the Faces Area Elevation Values variable in the Geometry section of the hdf file. I have not needed to perform either of these calculations myself but it might provide us confidence if we check to see if both methods give us the same answer.

It appears to me that HEC-RAS uses the term "Eddy Viscosity" to represent the diffusion coefficient according the following statement from the HEC-RAS manual: "The sum of horizontal molecular and turbulent mixing and dispersion are referred to simply as mixing here and are simulated as a Fickian diffusive process with a diffusion coefficient represented by the eddy viscosity." https://www.hec.usace.army.mil/confluence/rasdocs/r2dum/latest/running-a-model-with-2d-flow-areas/2d-computation-options-and-tolerances

It should also be noted that HEC-RAS's default option is to have turbulence turned off since the model has some numerical diffusion inherent in its calculations already. By having turbulence turned off the Face Eddy Viscosity and both Cell Eddy Viscosity outputs will show all zeros as in the current Box model output I provided (something I just learned). HEC-RAS only recommends turning turbulence on when the gird and time step becomes fine, and also recommends calibrating these turbulence modeling coefficients to spatially distributed velocity measurements. I have not needed to enable the turbulence model on any HEC-RAS model I developed yet, and my guess is most HEC-RAS model will not enable the turbulence model. I think we might want to provide a Clear Water water quality input for a diffusion coefficient when the HEC-RAS simulation's turbulence model is turned off. The Delft3D Water Quality model has an input for dispersion separate from the hydraulic model that may provide a similar example to what we want...I will need to dig into the Delft3D manuals more to provide further insight (let me know if this is something we want to look into).

from clearwater-riverine.

aufdenkampe avatar aufdenkampe commented on June 1, 2024

@jrutyna, that is very helpful info!

Regarding Face Area, it would indeed be interest to determine if both ways of calculating it give the same answer. Can you do that in a way that can be shared and preserved, perhaps by creating a new Jupyter Notebook or adding to one that @sjordan29 has developed? If the two approaches produce identical results, then we can which is best under different circumstances.

Regarding Face Eddy Viscosity, it is interesting to hear that the the HEC-RAS manual states that they consider eddy viscosity equivalent to the eddy diffusion coefficient. From my reading, those quantities are proportional (at a given temperature) but not equivalent. Regardless, it is also interesting to know that HEC-RAS recommends keeping these calculations turned off for most cases. Will the velocity field outputs be different when eddy viscosity is turned on? Do we need to rerun our models with it both on and off?

from clearwater-riverine.

sjordan29 avatar sjordan29 commented on June 1, 2024

@jrutyna, FYI in the commit you see above I compare the face flow calculated using the face area determined from Face Water Surface and Faces Area Elevation Values based on the first cell in a pair defining an edge, as Todd laid out in this notebook with the value printed to the HDF output and get pretty different results.

I'm guessing we will want to re-do this comparison calculation (using information about cells on both sides of an edge), but Todd's notebook linked above may be a useful resource as you work on this calculation! The cell volume calculation in Todd's notebook is very close to the value provided in the HDF output, as shown here.

As an aside, the RAS HDF output contains volumes for ghost cells (which appear to be positive if a cell is receiving flow from real cells and negative if a cell is flowing into the real cells).

from clearwater-riverine.

jrutyna avatar jrutyna commented on June 1, 2024

@aufdenkampe and @sjordan29, I created a new function to calculate the face area from the Face Water Surface and HEC-RAS face area-elevation lookup tables called compute_face_areas_from_faceWSE in the ras2dwq.py module. Please see this notebook for how to use this function and a comparison between the two methods to calculate face areas. It looks like the method that uses face flow and face velocity breaks down at faces at the edge of the modeling domain. In these cases it looks like the better method will be this new function. Please review and let me know if you need anything else.

from clearwater-riverine.

aufdenkampe avatar aufdenkampe commented on June 1, 2024

@jrutyna, thanks for creating that function and sharing it with commit cc9ed2f. Your new /examples/dev_sandbox/check_faceArea.ipynb notebook is great at documenting the different approaches and how they compare. Thanks!

I think we can close this issue!

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.