regmeasures / hapuamodel Goto Github PK
View Code? Open in Web Editor NEWPhysically based model of hāpua morphodynamics
License: GNU General Public License v3.0
Physically based model of hāpua morphodynamics
License: GNU General Public License v3.0
At the moment all the river sediment gets deposited onto the shoreline in an evensplit between the transects either side of the outlet channel. At time of high discharge this can create a localised bump and is quite unrealistic.
Need to differentiate beach from cliff on open coast
Also runup height?
Time = 2015-08-19 09:00:00
Time = 2015-08-19 10:00:00
Outlet channel elongated rightwards across transect line x=-280.000000
Truncating lagoon end of outlet channel (due to erosion)
Outlet intersects lagoon at 1 transects - adding channel width into lagoon
Outlet closed
Velocity change in cross-section 87 equals -0.315295 (greater than WarnTol)
Velocity change in cross-section 66 equals 0.199807 (greater than WarnTol)
Velocity change in cross-section 87 equals -0.110328 (greater than WarnTol)
Outlet closed
Outlet closed
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\ProgramData\Anaconda3\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Projects\HapuaModel\hapuamod\__main__.py", line 42, in <module>
main(ArgsIn.ModelConfigFile, ArgsIn.Overwrite)
File "C:\Projects\HapuaModel\hapuamod\core.py", line 160, in main
ChanFlag, Closed)
File "C:\Projects\HapuaModel\hapuamod\riv.py", line 550, in storeBedload
LagoonBedload[OnlineLagoon] = Bedload[ChanFlag[:-1]==1]
ValueError: shape mismatch: value array of shape (70,) could not be broadcast to indexing result of shape (71,)```
Summarising the inputs would allow quick sensibility checking:
Need to handle:
Maybe transfer channel hydraulics (depth and velocity) to new variables the same size as lagoon/outlet bed elevation then transfer back after adjusting morphology and interpolate new/null values as necessary.
Currently the netCDF file is getting quite large as it is being written to every morphological timestep.
Should be quite easy to fix with a new parameter in the config file.
This would make the model output animation comparable to the timelapse camera animation...
A pre-requisite to doing this is adding bdy condition data to the netCDF file (#44)
Need to resolve what happens when an outlet channel closes
Leave for now but likely important in some circumstances...
This could be an easy way to speed things up during stable periods.
Within Flood Modeller Pro timestep adjustment is triggered based on the number of iteration required to achieve convergence:
http://help.floodmodeller.com/floodmodeller/Technical_Reference/Simulation_Tab/Simulation_Tab.htm#advancedp
Develop test script to put the main mor code through a series of tests.
Needs to check:
Ideally checks should include some mass balance calcs!
Maybe put the linalg.solve_banded line into a try except statement and just warn + add noise if it returns this error?
So far none of my river hydraulics includes a momentum coefficient (β) (also termed Boussinesq coefficient) to correct for non-uniform velocity distribution. This should be fixed.
Barrier seepage needs to be incorporated in order to allow the possibility of long duration closure. It can be included by modifying the unsteady flow equations.
Need to deal with zero width outlet channel but different height inner and outer barrier (is the outer barrier always going to be lower?)
Similarish bug to #49 but different...
The barrier between the outlet channel and sea is not widening/raising due to overtopping/overwashing once the outlet migrates into transects beyond the end of the lagoon. E.g.
At the moment when the outlet channel re-elongates into a place it has already been it resets the channel position and width, even if this is making it narrower...
Probably fixed rate of erosion (or advance).
Currently breaching always results in a straight channel but this is not realistic in the case of transitory closure. Need to:
Needs to include:
Should be able to hotstart by reading in from netCDF and model input parameters.
Test bench for unsteady solver to benchmark speed, accuracy and stability under different conditions. Should include tests for:
Lagoon backshore and cliff position will be the same in the model, but where there is no lagoon I should track cliff line separately from shoreline. Currently I read in:
I should change this to
When the downstream end of the outlet channel is widening the erosion could be weighted towards the outside of the bend rather than split 50/50 as it is currently. An extra input parameter specifying the weighting would be required. This could help replicate the preferential migration which occurs once the channel is offset?
Possibly by relaxing part of the momentum equation at high froude numbers or by implementing an adaptive timestep?
Currently I track the outlet channel centreline as a free-form line in XY space defined by node (cross-section) locations along its length. This allows quite a bit of flexibility but it creates a number of headaches when trying to track the width of the channel and how this interacts with things (e.g. checking for truncations, working out which river-cross-section to deposit overwash sediment in, extending a approximately shore parallel outlet etc.)
As an alternative, I could track the outlet channel using the same shore profile lines as used for the shore position and lagoon width. There are a number of advantages and disadvantages:
Advantages of tracking outlet with shore-profiles | Disadvantages |
---|---|
Simpler to move sediment between model domains | Harder to add bank erosion due to outlet channel curvature (if wanted/needed to in future) |
More consistent with overall model scheme | Have started coding existing method |
Works well for long shore-parallel outlets | Need to work out how a totally straight outlet channel will work (i.e. it needs length>0!) |
Easier to track migration of ends | |
Easier to find and deal with truncation of channel |
Overall I think this change would resolve a number of issues I am facing with my original approach but I need to think it through fully as it is a bit of a change. In particular I need a plan for:
Using flags in argparse would be the best way to do this - although I need to make sure the main model code remains runable from python as well as commandline.
This would make it much easier for people to interpret animation and shouldn't be too difficult to do.
I need to export animations (or alternatively be able to create them by post processing).
Reducing morphological timestep at times of high sediment flux would help stabilise model
Need to think about how it will interact with outlet channel and how volume changes will be calculated.
Create process to create new outlet channel when barrier is overtopped
Current shoreline position adjustment only accounts for volume below mean sea level (i.e. closure depth * Dx) but need to account for barrier height in calculation as well.
similar to the below but generated from real model data for a specified transect and without the dimension lines.
It probably makes sense to use some vertical exaggeration otherwise it will be very flat - could just let the plot auto-scale or could specify vertical exaggeration as an input parameter.
Need to be able to see what time it is in the animation somehow.
They seem very small from what I'm seeing at the moment - Need to check against previous calcs for the Marine Geology paper. This could be a bug or maybe I just need a bigger K coefficient?
From Murray's Okarito report one approach is to apply the EurOtop (2007) “influence factor” to adjust for obliquely-approaching waves. I need to do some more reading...
EurOtop (2007) Wave overtopping of sea defences and related structures: Assessment manual. www.overtopping-manual.com, August 2007.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.