Closed piyueh closed 5 years ago
Hi @mandli, this is a new PR for a new feature: Darcy-Weisbach frictions. I'm wondering if you could review it when you have time? Thank you very much!!
The docker file for this PR is Dockerfile-PR9
. And there's an image in our DockerHub repo with the tag PR9
.
I am in the midst of the review but one thing that caught my attention was that you seem to be reimplementing a significant amount of functionality for reading in solutions and plotting them. This is not inherently bad but I am wondering what functionality the clawpack.pyclaw.solution.Solution
does not contain that you need.
Thanks for the information! I didn't realize I can use PyClaw for the solution I/O. I can definitely use the API in PyClaw for post-processing. Given the tight schedule of this project, however, I think I'll have to leave this task to the future after required functionalities are implemented in the flow solver.
The plotting scripts are very specific to each example and are not designed to be used outside those examples. So I guess it's okay to keep them there for now and migrate to PyClaw API in the future for better integration into the Clawpack ecosystem.
@piyueh Have not forgotten about this, just happens to be midterms around here and I have been tied up with a bunch of deadlines. This isn't blocking you on any other improvements is it?
No worries! This is non-blocking PR. Thank you!
@piyueh This can be merged whenever at this point I would say.
@mandli Got it! Thank you!! The remaining issues are addressed in Issue #11 and #12 .
Changes
1. Six Darcy-Weisbach friction models
Six different ways to assign or calculate Darcy-Weisbach coefficients are provided. Use
DarcyWeisbachData.type
to set the type (seesetrun.py
in examples):type = 0
: No Darcy-Weisbach friction. Use GeoClaw's original Manning's friction.type = 1
: assign a constant coefficient everywhere in the domain. Required subsequent parameter:coefficient
: (float) the coefficients of the blockstype = 2
: assign blockwise constants. The followings are parameters required when choosing this type:n_blocks
: (integer) number of blocksxlowers
: (list) x coords of the lower corners of the blocksxuppers
: (list) x coords of the upper corners of the blocksylowers
: (list) y coords of the lower corners of the blocksyuppers
: (list) y coords of the upper corners of the blockscoefficients
: (list) the coefficients of the blocksdefault_coefficient
: (float) the coefficient for areas that are not covered by the blockstype = 3
: cell-wise varying coefficients. Parameters:default_coefficient
: (float) the coefficient for areas not covered by the file.type = 4
: calculate the coefficients on the fly based on local Reynolds numbers and local roughness. We use a three-regime model (analytical solution, Blasius eq., and Swamee & Jain approx. for laminar, transient, and turbulence, respectively) for the coefficients. Parameters:filename
: (string) an Esri ASCII file for roughness datadefault_roughness
: (float) roughness for areas not covered by the filetype = 5
: the same astype = 4
, except that we use Churchill's model to calculate the coefficients.type = 6
: the same astype =5
, except a two-regime model is used: 1) for the laminar regime, we use analytical solution, and 2) for both transition and turbulence regimes, we solve the Colebrook-White formula directly. This means the performance will be somehow worse than other types because we solve the formula iteratively for each cell. The reason for this type is to do validations against some literature.2. A
roughness.txt
in Utah exampleThere is a new file called
roughness.txt
in the Utah example. But since there's no data for roughness in the real case, so the roughness data is fake.3. A new example: silicon oil on an inclined plane, 2.5 degree
This example simulates silicon oil flow with a point source on an inclined plane which has an angle of 2.5 degrees. The simulation results can be compared with the experimental data from Lister (1992).
4. Setting kinematic viscosity of working fluids in
setrun.py
Some Darcy-Weisbach models require the viscosity of the working fluids, so users can now set the value in
setrun.py
. The kinematic viscosity will be read intogeoclaw_module
.5. A new docker file for this pull request (PR9)