1
Fork 0

Merge branch 'master' into swash

This commit is contained in:
Edgar P. Burkhart 2022-03-30 10:55:58 +02:00
commit 54d2cbb04e
Signed by: edpibu
GPG Key ID: 9833D3C5A25BD227
3 changed files with 39 additions and 2 deletions

View File

@ -5,3 +5,38 @@ displacement at the Artha breakwater on February 28, 2017"
[Report](https://kalliope.edgarpierre.fr/latex/m2cce/internship/report.pdf)
## Configuration
Each part can be run in their respective directories.
```
$ python -m processing.swash -h
usage: swash.py [-h] [-v] [-c CONFIG]
Run swash model
options:
-h, --help show this help message and exit
-v, --verbose
-c CONFIG, --config CONFIG
```
## Bathymetry
* Insert database in `data/data`
* Run `processing.subdomain` to generate 2D data in a smaller domain
* Run `processing.projection` to generate a 1D bathymetry
## Swash
* Run `processing.swash` to run the Swash model
* Run `processing.sws_npz` to convert Swash output to Numpy files
* Run `processing.post` to plot wave height at a point, water level at an
instant, reflection coefficient at a point
* Run `processing.animate` to plot an animation of water level
* Run `processing.layers` to plot an animation of layers with flow velocity
## OlaFlow
* Run `processing.bathy` to generate stl input files
* Run `blockMesh`, `snappyHexMesh -overwrite`, copy `0.org` to `0`, `setFields`
* Run `processing.sws_ola` to convert Swash output to OlaFlow input

View File

@ -8,6 +8,7 @@ psize=Psize.dat
hires_step=0.5
[out]
margin=0.005
#no_breakwater=True
root=out
sub=bathy_sub.npy

View File

@ -26,8 +26,9 @@ domain = np.stack((artha, buoy))
domain.sort(axis=0)
log.debug(f"domain: {domain}")
domain[0] -= 0.002
domain[1] += 0.002
margin = config.getfloat("out", "margin", default=0.002)
domain[0] -= margin
domain[1] += margin
log.debug(f"domain: {domain}")
inp_root = pathlib.Path(config.get("inp", "root"))