Changeset 5506
- Timestamp:
- Jul 16, 2008, 11:42:15 AM (16 years ago)
- Location:
- anuga_core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/documentation/user_manual/anuga_user_manual.tex
r5484 r5506 191 191 (bathymetry and topography), the initial water level (stage), 192 192 boundary conditions such as tide, and any forcing terms that may 193 drive the system such as wind stress or atmospheric pressure193 drive the system such as rain_fall, abstraction of water, wind stress or atmospheric pressure 194 194 gradients. Gravity and frictional resistance from the different 195 195 terrains in the model are represented by predefined forcing terms. 196 See section \ref{sec:forcing terms} for details on forcing terms available in ANUGA. 196 197 197 198 The built-in mesh generator, called \code{graphical\_mesh\_generator}, … … 266 267 (bathymetry and topography), the initial water level, boundary 267 268 conditions such as tide, and any forcing terms that may drive the 268 system such as wind stress or atmospheric pressure gradients.269 system such as rain_fall, abstraction of water, wind stress or atmospheric pressure gradients. 269 270 Frictional resistance from the different terrains in the model is 270 271 represented by predefined forcing terms. In this example, the … … 2293 2294 2294 2295 2295 %\section{Forcing Functions} 2296 % 2297 %\anuga provides a number of predefined forcing functions to be used with ..... 2296 \section{Forcing Terms} 2297 \label{forcing terms} 2298 2299 \anuga provides a number of predefined forcing functions to be used with simulations. 2300 Gravity and friction are always calculated using the elevation and friction quantities, but the user may additionally add forcing terms to the list 2301 \code{domain.forcing_terms} and have them affect the model. 2302 2303 Currently, predifiend forcing terms are 2304 2305 \begin{funcdesc}{General_forcing}{} 2306 Module: \module{shallow\_water.shallow\_water\_domain} 2307 2308 This is a general class to modify any quantity according to a given rate of change. 2309 Other specific forcing terms are based on this class but it can be used by itself as well (e.g.\ to modify momentum). 2310 2311 The General\_forcing class takes as input: 2312 \begin{itemize} 2313 \item \code{domain}: a reference to the domain being evolved 2314 \item \code{quantity\_name}: The name of the quantity that will be affected by this forcing term 2315 \item \code{rate}: The rate at which the quantity should change. The parameter \code{rate} can be eithe a constant or a 2316 function of time. Positive values indicate increases, 2317 negative values indicate decreases. 2318 The parametr \code{rate} can be \code{None} at initialisation but must be specified 2319 before forcing term is applied (i.e. simulation has started). 2320 The default value is 0.0 - i.e.\ no forcing. 2321 \item \code{center, radius}: Optionally restrict forcing to a circle with given center and radius. 2322 \item \code{polygon}: Optionally restrict forcing to an area enclosed by given polygon. 2323 \end{itemize} 2324 Note specifying both center, radius and polygon will cause an exception to be thrown. 2325 2326 Example: 2327 {\scriptsize \begin{verbatim} 2328 xmom = General_forcing(domain, 'xmomentum', polygon=P) 2329 ymom = General_forcing(domain, 'ymomentum', polygon=P) 2330 2331 xmom.rate = f 2332 ymom.rate = g 2333 2334 domain.forcing_terms.append(xmom) 2335 domain.forcing_terms.append(ymom) 2336 \end{itemize}} 2337 Here, \code{f}, \code{g} are assumed to be defined as functions of time providing a time dependent rate of change for xmomentum and ymomentum respectively. 2338 P is assumed to be polygon, specified as a list of points, e.g. a square \code{P = [[x0, y0], [x1, y0], [x1, y1], [x0, y1]]}. 2339 2340 \end{funcdesc} 2341 2342 2343 \begin{funcdesc}{Inflow}{} 2344 Module: \module{shallow\_water.shallow\_water\_domain} 2345 2346 This is a general class for infiltration and abstraction of water according to a given rate of change. 2347 This class will always modify the \code{stage} quantity. 2348 2349 Inflow is based on the General_forcing class so the functionality is similar. 2350 2351 The Inflow class takes as input: 2352 \begin{itemize} 2353 \item \code{domain}: a reference to the domain being evolved 2354 \item \code{rate}: The flow rate in $m^3/s$ at which the stage should change. The parameter \code{rate} can be eithe a constant or a 2355 function of time. Positive values indicate inflow, 2356 negative values indicate outflow. 2357 2358 Note: The specified flow will be divided by the area of 2359 the inflow region and then applied to update the 2360 stage quantity. 2361 \item \code{center, radius}: Optionally restrict forcing to a circle with given center and radius. 2362 \item \code{polygon}: Optionally restrict forcing to an area enclosed by given polygon. 2363 \end{itemize} 2364 2365 Example: 2366 {\scriptsize \begin{verbatim} 2367 hydrograph = Inflow(center=(320, 300), radius=10, 2368 rate=file_function('QPMF_Rot_Sub13.tms')) 2369 2370 domain.forcing_terms.append(hydrograph) 2371 \end{itemize}} 2372 Here, \code{'QPMF_Rot_Sub13.tms') is assumed to be a NetCDF file in the format \code{tms} defining a timeseries for a hydrograph. 2373 \end{funcdesc} 2374 2375 2376 \begin{funcdesc}{Rainfall}{} 2377 Module: \module{shallow\_water.shallow\_water\_domain} 2378 2379 This is a general class for implementing rainfall over the domain, possibly restricted to a given circle or polygon. 2380 This class will always modify the \code{stage} quantity. 2381 2382 Rainfall is based on the General_forcing class so the functionality is similar. 2383 2384 The Rainfall class takes as input: 2385 \begin{itemize} 2386 \item \code{domain}: a reference to the domain being evolved 2387 \item \code{rate}: Total rain rate over the specified domain. 2388 Note: Raingauge Data needs to reflect the time step. 2389 For example: if rain gauge is mm read every \code{dt} seconds, then the input 2390 here is as \code{mm/dt} so 10 mm in 5 minutes becomes 2391 10/(5x60) = 0.0333mm/s. 2392 2393 This parameter can be either a constant or a 2394 function of time. Positive values indicate rain being added (or be used for general infiltration), 2395 negative values indicate outflow at the specified rate (presumably this could model evaporation or abstraction). 2396 \item \code{center, radius}: Optionally restrict forcing to a circle with given center and radius. 2397 \item \code{polygon}: Optionally restrict forcing to an area enclosed by given polygon. 2398 \end{itemize} 2399 2400 Example: 2401 {\scriptsize \begin{verbatim} 2402 2403 catchmentrainfall = Rainfall(rain=file_function('Q100_2hr_Rain.tms')) 2404 domain.forcing_terms.append(catchmentrainfall) 2405 2406 \end{itemize}} 2407 Here, \code{'Q100_2hr_Rain.tms') is assumed to be a NetCDF file in the format \code{tms} defining a timeseries for the rainfall. 2408 \end{funcdesc} 2409 2410 2411 2412 \begin{funcdesc}{Culvert\_flow}{} 2413 Module: \module{culver\_flows.culvert\_class} 2414 2415 This is a general class for implementing flow through a culvert. 2416 This class modifies the quantities \code{stage, xmomentum, ymomentum} in areas at both ends of the culvert. 2417 2418 The Culvert\_flow forcing term uses \code{Inflow} and {General\_forcing} to update the quantities. The flow direction is determined on-the-fly so 2419 openings are referenced simple as opening0 and opening1 with either being able to take the role as Inflow and Outflow. 2420 2421 The Culvert\_flow class takes as input: 2422 \begin{itemize} 2423 \item \code{domain}: a reference to the domain being evolved 2424 \item \code{label}: Short text naming the culvert 2425 \item \code{description}: Text describing it 2426 \item \code{end_point0}: Coordinates of one opening 2427 \item \code{end_point1}: Coordinates of other opening 2428 \item \code{width}: 2429 \item \code{height}: 2430 \item \code{diameter}: 2431 \item \code{manning}: Mannings Roughness for Culvert 2432 \item \code{invert_level0}: Invert level if not the same as the Elevation on the Domain 2433 \item \code{invert_level1}: Invert level if not the same as the Elevation on the Domain 2434 \item \code{culvert_routine}: Function specifying the calculation of flow based on energy difference between the two openings (see below) 2435 \end{itemize} 2436 2437 The user can specify different culvert routines. Hower ANUGA currently specifies one, namely the \code{boyd\_generalised\_culvert\_model} as used in the example below. 2438 2439 Example: 2440 {\scriptsize \begin{verbatim} 2441 from anuga.culvert_flows.culvert_class import Culvert_flow 2442 from anuga.culvert_flows.culvert_routines import boyd_generalised_culvert_model 2443 2444 culvert1 = Culvert_flow(domain, 2445 label='Culvert No. 1', 2446 description='This culvert is a test unit 1.2m Wide by 0.75m High', 2447 end_point0=[9.0, 2.5], 2448 end_point1=[13.0, 2.5], 2449 width=1.20,height=0.75, 2450 culvert_routine=boyd_generalised_culvert_model, 2451 verbose=True) 2452 2453 culvert2 = Culvert_flow(domain, 2454 label='Culvert No. 2', 2455 description='This culvert is a circular test with d=1.2m', 2456 end_point0=[9.0, 1.5], 2457 end_point1=[30.0, 3.5], 2458 diameter=1.20, 2459 invert_level0=7, 2460 culvert_routine=boyd_generalised_culvert_model, 2461 verbose=True) 2462 2463 domain.forcing_terms.append(culvert1) 2464 domain.forcing_terms.append(culvert2) 2465 2466 2467 \end{itemize}} 2468 \end{funcdesc} 2469 2470 2298 2471 2299 2472 … … 4341 4514 Mercator) coordinate. & \\ 4342 4515 4516 4343 4517 \indexedbold{points file} & A PTS or CSV file & \\ \hline 4344 4518 -
anuga_core/source/anuga/shallow_water/shallow_water_domain.py
r5450 r5506 1696 1696 1697 1697 domain 1698 flow[m^3/s]: Total flow rate over the specified area.1698 rate [m^3/s]: Total flow rate over the specified area. 1699 1699 This parameter can be either a constant or a 1700 1700 function of time. Positive values indicate inflow, 1701 1701 negative values indicate outflow. 1702 1702 The specified flow will be divided by the area of 1703 the inflow region and then applied to update the 1704 quantity in question. 1703 the inflow region and then applied to update stage. 1705 1704 center [m]: Coordinates at center of flow point 1706 1705 radius [m]: Size of circular area … … 1732 1731 1733 1732 hydrograph = Inflow(center=(320, 300), radius=10, 1734 flow=file_function('Q/QPMF_Rot_Sub13.tms'))1733 rate=file_function('Q/QPMF_Rot_Sub13.tms')) 1735 1734 1736 1735 domain.forcing_terms.append(hydrograph)
Note: See TracChangeset
for help on using the changeset viewer.