|
From: <Gar...@ga...> - 2011-10-07 00:04:12
|
Hi Rajesh,
Here are a few thoughts on your questions - note that there are many different ways to use ANUGA, and the suggestions below may not be the only (or best) way to do these things.
1. How to differentiate a particular region from domain like flood water source with a finite volume of water at starting time of simulation with a specified stage, village.
See the answer to 3 below.
2. Speed of water is automatically set by ANUGA. Is ANUGA library considering atmospheric pressure, elevation of water source, gravity, volume of water discharge from lake and other physical quantities which can affect the speed.
ANUGA is solving the shallow water equations [see the ANUGA manual for a description of the equations]. These are a very commonly used model of water flow, so you should be able to find quite a few references on the web. Basically, ANUGA assumes a constant atmospheric pressure throughout the modelled domain (although I believe some users have made adjustments for variable atmospheric pressure, which are still experimental). The shallow water equations automatically account for gravity / elevation of water source / water volume etc - they are actually approximations of the more general principles of 'conservation of mass' and 'conservation of momentum' for the fluid.
3. How to release a specified amount of volume from a specified flood water source ?
There are several ways that might be appropriate depending on your problem. Here are some methods:
a) You can impose a given initial water elevation over the particular region of your domain by appropriately defining the stage initial condition (see the 'Getting Started' part of the manual for examples of defining the initial stage). Then, this will evolve according to the shallow water equations, so will flow into other parts of your domain if the topography dictates this.
b) You can impose a certain rate of 'rainfall' over a given area of the domain, see the function anuga.shallow_water.forcing.Rainfall. As above, this will then flow through the domain according to the shallow water equations.
c) You can impose a certain rate of 'inflow' through a given cross-section, using the 'Inlet_operator' in 'anuga.structures.inlet_operator'.
d) You can force a given momentum flux along the boundaries (e.g. by using a dirichlet boundary condition). There are a number of ways to do this, see the functions in 'abstract_2d_finite_volumes/generic_boundary_conditions.py' and in 'shallow water.boundaries'
... and there are probably other ways. To understand how to use these, look at the manual (chapters 4-5-6) and the code itself. Their appropriateness will depend on your particular simulation.
4. What does it mean by inner polygon, interior regions, interior holes, file_function and use of these terms ?
In general, if you come across a term that you don't understand, there are 2 good approaches to finding it. 1) Do a 'find' in the user manual, to see if there is a discussion of the term. If that fails, try 2) Do a 'grep' in the code, assuming you have the source installed and have the 'grep' program (should be on most linux distributions, and can probably be installed on windows). For example, if my source tree is in /trunk/anuga_core/source, then if I open a terminal in that directory and then type 'grep -r "mysearchterm" ./*' (without the single quotes), then you can find wherever the term 'mysearchterm' is mentioned in the code. It may appear often - if so, look for where it is defined in the code (e.g. if you are searching for a function, then the term 'def' will appear where it is defined).
5. How to get quantities such as depth at any particular point/polygon after simulation from .sww files ?
Here's one way - there are probably others:
The sww files are actually netcdf files, which is a standard binary file format [ lots of info on the web about these]. I typically use a python library called Scientific.IO.NetCDF to read the sww files. These will give you stage (over time) and elevation (just at a single time, because it doesn't change), and you can then compute depth at a given time by subtracting these 2 quantities. Again you will probably have to google on how to read the netcdf files, but an example is:
# Open ncdf connection
fid=NetCDFFile('sww_filename_goes_here')
# Read variables
x=fid.variables['x']
x=x.getValue()
y=fid.variables['y']
y=y.getValue()
stage=fid.variables['stage']
stage=stage.getValue()
elev=fid.variables['elevation']
elev=elev.getValue()
xmom=fid.variables['xmomentum']
xmom=xmom.getValue()
ymom=fid.variables['ymomentum']
ymom=ymom.getValue()
time=fid.variables['time']
time=time.getValue()
vols=fid.variables['volumes']
vols=vols.getValue()
# Extract depth at the 10th output step.
Depth10= stage[10,:] - elev
So Depth10 will contain the depth values at the 10th output step, with coordinates corresponding to x & y. If you find the index of the coordinate you want in the x,y vectors (e.g. by calculating the distance of all points from the point you want and finding the index of the minimum), then you can extract the depth there.
If i want to break a wall of dam, during simulation how can i do it. If i know the dimension (height, length, width) of that wall.
If you want the dam to break at the very start of the simulation, then you can just define the initial stage as though the dam were present, but ignore the dam in the underlying topography - the shallow water equations will do the rest. This is typically what people do when computing idealised 'dam break' solutions to the shallow water equations.
To actually have a dam for a time, and then remove it, would be more complex - I can't suggest an easy method. The idea would be to figure out how to redefine the topography mid-simulation (should be doable, but would probably require a good knowledge of the code).
Hope this helps,
Gareth.
Gareth Davies
Hydrodynamic Modeller
Regional Risk Section,
International Group
Geoscience Australia.
Ph: (02) 6249 9655
From: rajesh tailor [mailto:tai...@gm...]
Sent: Tuesday, 4 October 2011 4:35 PM
To: anu...@li...
Subject: [Anuga-user] quries related to anuga
Hi All,
I am using anuga in my project for simulation.
Can anyone help me regarding question i have....
I am a programmer and dont know anything which is related to geography.
I am using DEM data to generate mesh topography using create_domain_from_regions() function to create domain.
1. How to differentiate a particular region from domain like flood water source with a finite volume of water at starting time of simulation with a specified stage, village.
2. Speed of water is automatically set by ANUGA. Is ANUGA library considering atmospheric pressure, elevation of water source, gravity, volume of water discharge from lake and other physical quantities which can affect the speed.
3. How to release a specified amount of volume from a specified flood water source ?
4. What does it mean by inner polygon, interior regions, interior holes, file_function and use of these terms ?
5. How to get quantities such as depth at any particular point/polygon after simulation from .sww files ?
I got maximum inundation location and elevation of that location using get_maximum_inundation_location() and get_maximum_inundation_elevation() functions.
If i want to break a wall of dam, during simulation how can i do it. If i know the dimension (height, length, width) of that wall.
regards
rajesh tailor
|