Skip to content

Commit

Permalink
update slide and dependency graphs
Browse files Browse the repository at this point in the history
  • Loading branch information
levuvietphong committed Nov 12, 2024
1 parent 33f3150 commit 644a112
Show file tree
Hide file tree
Showing 5 changed files with 219 additions and 108 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ git clone https://github.com/amanzi/ats-hands-on-transport.git
### 4. Workshop Outline :memo:
* **Introduction to Hydrology and Transport PKs in ATS:**
- Overview of governing equations
- Review of ATS input files

* **Hands-On Session: Building Transport Simulations:**
- Step-by-step guidance on developing transport simulations in ATS based on the integrated hydrology model*
Expand Down
8 changes: 8 additions & 0 deletions docs/assets/sydney.css
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ To specify the margin of the first title h1
width: 72%;
}

.pull-left-64 {
float: left;
width: 58%;
}
.pull-right-46 {
float: right;
width: 38%;
}

/* use to position text at the bottom */
.pull-down {
Expand Down
4 changes: 2 additions & 2 deletions docs/imgs/dependency.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
</head>
<body>
<div id="htmlwidget_container">
<div class="visNetwork html-widget html-fill-item" id="htmlwidget-1c8565adf91cb5a36f7a" style="width:960px;height:500px;"></div>
<div class="visNetwork html-widget html-fill-item" id="htmlwidget-1c8565adf91cb5a36f7a" style="width:500px;height:300px;"></div>
</div>
<script type="application/json" data-for="htmlwidget-1c8565adf91cb5a36f7a">{"x":{"nodes":{"id":[1,2,3],"label":["MPC::flow coupler","PK::flow","PK::overland flow"],"shape":["box","box","box"],"color":[{"background":"coral"},{"background":"lightblue"},{"background":"lightblue"}],"title":["Strong coupling (PK Type: coupled water)","Richards Equation (PK Type: richards flow)","Diffusive Wave Equation (PK Type: overland flow, pressure basis)"],"x":[0,-100,100],"y":[-100,0,0]},"edges":{"from":[1,1],"to":[2,3]},"nodesToDataframe":true,"edgesToDataframe":true,"options":{"width":"100%","height":"100%","nodes":{"shape":"box","font":{"size":20}},"manipulation":{"enabled":true},"physics":{"enabled":false},"layout":{"randomSeed":1234}},"groups":null,"width":null,"height":null,"idselection":{"enabled":false,"style":"width: 150px; height: 26px","useLabels":true,"main":"Select by id"},"byselection":{"enabled":false,"style":"width: 150px; height: 26px","multiple":false,"hideColor":"rgba(200,200,200,0.5)","highlight":false},"main":null,"submain":null,"footer":null,"background":"rgba(0, 0, 0, 0)","opts_manipulation":{"datacss":"table.legend_table {\n font-size: 11px;\n border-width:1px;\n border-color:#d3d3d3;\n border-style:solid;\n}\ntable.legend_table td {\n border-width:1px;\n border-color:#d3d3d3;\n border-style:solid;\n padding: 2px;\n}\ndiv.table_content {\n width:80px;\n text-align:center;\n}\ndiv.table_description {\n width:100px;\n}\n\n.operation {\n font-size:20px;\n}\n\n.network-popUp {\n display:none;\n z-index:299;\n width:250px;\n /*height:150px;*/\n background-color: #f9f9f9;\n border-style:solid;\n border-width:1px;\n border-color: #0d0d0d;\n padding:10px;\n text-align: center;\n position:fixed;\n top:50%; \n left:50%; \n margin:-100px 0 0 -100px; \n\n}","addNodeCols":["id","label"],"editNodeCols":["id","label"],"tab_add_node":"<span id=\"addnode-operation\" class = \"operation\">node<\/span> <br><table style=\"margin:auto;\"><tr><td>id<\/td><td><input id=\"addnode-id\" type= \"text\" value=\"new value\"><\/td><\/tr><tr><td>label<\/td><td><input id=\"addnode-label\" type= \"text\" value=\"new value\"><\/td><\/tr><\/table><input type=\"button\" value=\"save\" id=\"addnode-saveButton\"><\/button><input type=\"button\" value=\"cancel\" id=\"addnode-cancelButton\"><\/button>","tab_edit_node":"<span id=\"editnode-operation\" class = \"operation\">node<\/span> <br><table style=\"margin:auto;\"><tr><td>id<\/td><td><input id=\"editnode-id\" type= \"text\" value=\"new value\"><\/td><\/tr><tr><td>label<\/td><td><input id=\"editnode-label\" type= \"text\" value=\"new value\"><\/td><\/tr><\/table><input type=\"button\" value=\"save\" id=\"editnode-saveButton\"><\/button><input type=\"button\" value=\"cancel\" id=\"editnode-cancelButton\"><\/button>"},"highlight":{"enabled":false,"hoverNearest":false,"degree":1,"algorithm":"all","hideColor":"rgba(200,200,200,0.5)","labelOnly":true},"collapse":{"enabled":false,"fit":false,"resetHighlight":true,"clusterOptions":null,"keepCoord":true,"labelSuffix":"(cluster)"},"events":{"doubleClick":"function(nodes) {\n // When a node is double-clicked, prompt the user for a color\n var nodeId = nodes.nodes[0];\n var newColor = prompt('Enter a color (e.g., lightblue, red, etc.):', 'lightblue');\n if (newColor) {\n var network = this;\n // Update the selected node's background color\n network.body.data.nodes.update({id: nodeId, color: {background: newColor}});\n }\n }"}},"evals":["events.doubleClick"],"jsHooks":[]}</script>
<script type="application/htmlwidget-sizing" data-for="htmlwidget-1c8565adf91cb5a36f7a">{"viewer":{"width":450,"height":350,"padding":15,"fill":true},"browser":{"width":960,"height":500,"padding":40,"fill":false}}</script>
<script type="application/htmlwidget-sizing" data-for="htmlwidget-1c8565adf91cb5a36f7a">{"viewer":{"width":350,"height":250,"padding":15,"fill":true},"browser":{"width":500,"height":300,"padding":40,"fill":false}}</script>
</body>
</html>
157 changes: 104 additions & 53 deletions docs/slides.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,19 @@ docker run -p 8888:8888 metsi/ideas-watersheds-all-hands-2024:latest

---
# Outlines

<br>

.large[
- Integrated hydrology model (2D & 3D)
- Transport model over the entire domain (2D & 3D)
- Transport model over the river network (1D)
]
#### .blockquote[Integrated hydrology:]
- Understand and run the model (2-D & 3-D)
- Visualize and interpret the outputs

#### .blockquote[Transport Modeling:]
- **Catchment scale:** 2-D & 3-D transport across the entire domain
- **River network scale:** 1-D transport within the river corridor
- .content-box-green[Develop and couple] transport models with integrated hydrology
- Visualize and interpret results


---
class: phong-dark
Expand Down Expand Up @@ -139,21 +145,21 @@ $$ \frac{\partial \Theta_g}{\partial t} + \nabla \cdot \vec{\mathbf{q}_g} = Q_g$

---
# Steps to Construct a Model
.pull-left-21[
.pull-left-64[
.font90[
- **.brand-blue[Simulation domains]** `r fontawesome::fa("map")`
- Where the processes happen

- **.brand-blue[Dependency graph]** `r fontawesome::fa("network-wired")`
- .content-box-green[**.brand-blue[Dependency graph]** `r fontawesome::fa("sitemap")`]
- Which `PKs` to use and how they are coupled


- **.brand-blue[Model parameters]** `r fontawesome::fa("cog")`
- **.brand-blue[Model parameters]** `r fontawesome::fa("sliders")`
- Physical and numerical properties

- **.brand-blue[Initial and boundary conditions]** `r fontawesome::fa("object-ungroup")` `r fontawesome::fa("clock")`
- State of the system at $t=0$
- How system behaves at the boundaries at $t>0$
- State of the system at $t=t_0$
- How system behaves at the boundaries at $t \ge t_0$

- **.brand-blue[Forcing, sources and sinks]** `r fontawesome::fa("cloud-sun-rain")`
- External forces that drive changes in the system
Expand All @@ -164,36 +170,32 @@ $$ \frac{\partial \Theta_g}{\partial t} + \nabla \cdot \vec{\mathbf{q}_g} = Q_g$

<br>

.pull-right-12[
.pull-right-46[

.small[
```xml
<ParameterList name="cycle driver">
<Parameter name="end cycle" type="int" value="10000" />
<Parameter name="start time" type="double" value=" 0" />
<Parameter name="start time units" type="string" value="s" />
<Parameter name="end time" type="double" value="86400" />
<Parameter name="end time units" type="string" value="s" />
<ParameterList name="PK tree">
<ParameterList name="flow coupler">
<Parameter name="PK type" type="string" value="coupled water" />
<ParameterList name="flow">
<Parameter name="PK type" type="string" value="richards flow" />
</ParameterList>
<ParameterList name="overland flow">
<Parameter name="PK type" type="string" value="overland flow, pressure basis" />
</ParameterList>
</ParameterList>
</ParameterList>
</ParameterList>
**ATS `xml` top level list includes:**
```r
Main
- mesh: ["mesh-typed-spec-list"]
- regions: ["region-typedinline-spec-list"]
- cycle driver: ["coordinator-spec"]
- PKs: ["pk-typedinline-spec-list"]
- state: ["state-spec"]
*- visualization: ["visualization-spec-list"]
*- checkpoint: ["checkpoint-spec"]
*- observations: ["observation-spec-list"]
```
]]
]
]

.footnote[[ATS Documentation](https://amanzi.github.io/ats/stable/input_spec/main.html)]

---

# Dependency Graph - Integrated Hydrology

.pull-left-21[
<iframe src="imgs/dependency.html" width="700" height="600" frameborder="0"></iframe>
.pull-left-64[
<iframe src="imgs/dependency.html" width="600" height="500" frameborder="1"></iframe>
]

.font70[
Expand All @@ -203,30 +205,33 @@ $$ \frac{\partial \Theta_g}{\partial t} + \nabla \cdot \vec{\mathbf{q}_g} = Q_g$

--

.pull-right-12[
.pull-right-46[
.font70[
```xml
<ParameterList name="PK tree">
<ParameterList name="flow coupler">
<Parameter name="PK type" type="string" value="coupled water" />
<ParameterList name="flow">
<Parameter name="PK type" type="string" value="richards flow" />
</ParameterList>
<ParameterList name="overland flow">
<Parameter name="PK type" type="string" value="overland flow, pressure basis" />
<ParameterList name="Main">
* OTHER LISTS...
<ParameterList name="PK tree">
<ParameterList name="flow coupler">
<Parameter name="PK type" type="string" value="coupled water" />
<ParameterList name="flow">
<Parameter name="PK type" type="string" value="richards flow" />
</ParameterList>
<ParameterList name="overland flow">
<Parameter name="PK type" type="string" value="overland flow, pressure basis" />
</ParameterList>
</ParameterList>
</ParameterList>
</ParameterList>

OTHER CODES...
* OTHER LISTS...

<ParameterList name="PKs">
<ParameterList name="flow coupler">
<Parameter name="PK type" type="string" value="coupled water" />
<Parameter name="PKs order" type="Array(string)" value="{flow, overland flow}" />
<ParameterList name="PKs">
<ParameterList name="flow coupler">
<Parameter name="PK type" type="string" value="coupled water" />
<Parameter name="PKs order" type="Array(string)" value="{flow, overland flow}" />
</ParameterList>
* OTHER SUB-LISTS...
</ParameterList>
OTHER CODES...
</ParameterList>
</ParameterList>
```
]]

Expand Down Expand Up @@ -271,11 +276,57 @@ $\Delta$z = [0.1, 0.1, 0.1, 0.2, 0.2, 0.4, 0.4]
.font60[.footnote[<a href="imgs/domain.html" target="_blank">```domain of simulation```</a>]]

---
# Simulation Time
.pull-left-21[
- 24 hours
# Model Parameters
.small[
.pull-left-64[
- Surface
$$ \frac{\partial \Theta_s}{\partial t} + \nabla \cdot \mathbf{q}_s = Q_s + Q_e$$
- Subsurface
$$ \frac{\partial \Theta_g}{\partial t} + \nabla \cdot \mathbf{q}_g = Q_g$$
]]

--
.footnotesize[.pull-right-46[
<br>
$$\mathbf{q}_s = -\eta h \frac{h^{4/3}} {n_{mann} \sqrt{|\nabla z|} } \nabla (\eta + z)$$

<br>

$$\mathbf{q}_g = -\frac{\eta}{\mu} k_r K (\nabla p + \rho g\mathbf{z})$$

.content-box-yellow[
- $n_{mann}$: Manning's roughness coefficient
- $k_r$: relative permeability
- $K$: absolute permeability
]]
]

--

.pull-left[
.font60[
```xml
<ParameterList name="state">
<ParameterList name="evaluators">
* OTHER EVALUATORS ...
<ParameterList name="surface-manning_coefficient">
<Parameter name="evaluator type" type="string" value="independent variable constant" />
<Parameter name="value" type="double" value="0.15" />
</ParameterList>
<ParameterList name="permeability">
<Parameter name="evaluator type" type="string" value="independent variable constant" />
<Parameter name="value" type="double" value="5e-13" />
</ParameterList>
<ParameterList name="relative_permeability">
<Parameter name="evaluator type" type="string" value="relative permeability, water retention model" />
<Parameter name="model parameters" type="string" value="WRM parameters" />
</ParameterList>
</ParameterList>
* OTHER EVALUATORS ...
</ParameterList>
```
]]

---
class: phong-dark
# .brand-orange[Transport hands-on]
Expand Down
Loading

0 comments on commit 644a112

Please sign in to comment.