Changeset 4062
- Timestamp:
- Dec 6, 2006, 5:15:13 PM (18 years ago)
- Location:
- anuga_core/documentation/user_manual
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/documentation/user_manual/anuga_user_manual.tex
r4040 r4062 979 979 supporting data is found in the ASCII grid, \code{cairns.asc}, which 980 980 has been sourced from the publically available Australian Bathymetry 981 and Topography Grid 2005, \cite{grid250}. 981 and Topography Grid 2005, \cite{grid250}. The required resolution 982 for inundation modelling will depend on the underlying topography and 983 bathymetry; as the terrain becomes more complex, the desired resolution 984 would decrease to the order of tens of metres. 982 985 983 986 \begin{figure}[hbt] … … 1096 1099 The function returns the water displacement for all \code{x} and 1097 1100 \code{y} in the domain. The water displacement is a double Gaussian 1098 function that depends on the characteristics of the sl ump(length,1099 thickness, slope, etc), its location (origin) and the depth at that1100 location. 1101 1101 function that depends on the characteristics of the slide (length, 1102 width, thickness, slope, etc), its location (origin) and the depth at that 1103 location. For this example, we choose to apply the slide function 1104 at a specified time into the simulation. 1102 1105 1103 1106 \subsubsection{Friction} … … 1161 1164 1162 1165 With the basics established, the running of the `evolve' step is 1163 very similar to the corresponding step in \file{runup.py}. Here, 1164 the simulation is run for five hours (10000 seconds) with 1165 the output stored every two minutes (120 seconds). 1166 very similar to the corresponding step in \file{runup.py}. For the slide 1167 scenario, 1168 the simulation is run for 5000 seconds with the output stored every five seconds. 1169 For this example, we choose to apply the slide at 60 seconds into the simulation. 1166 1170 1167 1171 {\small \begin{verbatim} 1168 1172 import time t0 = time.time() 1169 1173 1170 for t in domain.evolve(yieldstep = 120, duration = 10000): 1171 print domain.timestepping_statistics() 1172 print domain.boundary_statistics(tags = 'bottom') 1173 1174 print 'That took %.2f seconds' %(time.time() 1174 1175 for t in domain.evolve(yieldstep = 5, finaltime = 60): 1176 domain.write_time() 1177 domain.write_boundary_statistics(tags = 'ocean_east') 1178 1179 # add slide 1180 thisstagestep = domain.get_quantity('stage') 1181 if allclose(t, 60): 1182 slide = Quantity(domain) 1183 slide.set_values(tsunami_source) 1184 domain.set_quantity('stage', slide + thisstagestep) 1185 1186 # save every two mins leading up to wave approaching land 1187 for t in domain.evolve(yieldstep = 5, finaltime = 5000, 1188 skip_initial_step = True): 1189 domain.write_time() 1190 domain.write_boundary_statistics(tags = 'ocean_east') 1191 \end{verbatim}} 1192 1193 For the fixed wave scenario, the simulation is run to 10000 seconds, 1194 with the first half of the simulation stored at two minute intervals, 1195 and the second half of the simulation stored at ten second intervals. 1196 This functionality is especially convenient as it allows the detailed 1197 parts of the simulation to be viewed at higher time resolution. 1198 1199 1200 {\small \begin{verbatim} 1201 1202 # save every two mins leading up to wave approaching land 1203 for t in domain.evolve(yieldstep = 120, finaltime = 5000): 1204 domain.write_time() 1205 domain.write_boundary_statistics(tags = 'ocean_east') 1206 1207 # save every 30 secs as wave starts inundating ashore 1208 for t in domain.evolve(yieldstep = 10, finaltime = 10000, 1209 skip_initial_step = True): 1210 domain.write_time() 1211 domain.write_boundary_statistics(tags = 'ocean_east') 1212 1175 1213 \end{verbatim}} 1176 1214 … … 1180 1218 As described earlier, the user may run animate to view a three-dimensional representation 1181 1219 of the simulation. 1220 1221 The user may also be interested in a maximum inundation map. This simply shows the 1222 maximum water depth over the domain and is achieved with the function sww2dem (described in 1223 Section \label{sec:basicfileconversions}). 1224 \file{ExportResults.py} demonstrates how this function can be used: 1225 1226 \verbatiminput{demos/cairns/ExportResults.py} 1227 1228 The script generates an maximum water depth ASCII grid at a defined 1229 resolution (here 100 m$^2$) which can then be viewed in a GIS environment, for 1230 example. The parameters used in the function are defined in \file{project.py}. 1231 Figures \ref{fig:maxdepthcairnsslide} and \ref{fig:maxdepthcairnsfixedwave} show 1232 the maximum water depth within the defined region for the slide and fixed wave scenario 1233 respectively. 1234 The user could develop a maximum absolute momentum or other expressions which can be 1235 derived from the quantities. 1236 1237 \begin{figure}[hbt] 1238 \centerline{\includegraphics[scale=0.5]{graphics/slidedepth.jpg}} 1239 \caption{Maximum inundation map for the Cairns side scenario.} 1240 \label{fig:maxdepthcairnsslide} 1241 \end{figure} 1242 1243 \begin{figure}[hbt] 1244 \centerline{\includegraphics[scale=0.5]{graphics/fixedwavedepth.jpg}} 1245 \caption{Maximum inundation map for the Cairns fixed wave scenario.} 1246 \label{fig:maxdepthcairnsfixedwave} 1247 \end{figure} 1182 1248 1183 1249 The user may also be interested in interrogating the solution at a particular spatial … … 1206 1272 verbatiminput{demos/cairns/GetTimeseries.py} 1207 1273 1208 The user may also be interested in a maximum inundation map. This simply shows the 1209 maximum water depth over the domain and is achieved with the function sww2dem (described in 1210 Section \label{sec:basicfileconversions}). 1211 \file{ExportResults.py} demonstrates how this function can be used: 1212 1213 \verbatiminput{demos/cairns/ExportResults.py} 1214 1215 Here, the maximum water depth is shown for the region defined in \file{project.py} and 1216 is shown in Figures \ref{fig:maxdepthcairnsslump} and \ref{fig:maxdepthcairnsfixedwave}. 1217 The user could develop a maximum absolute momentum or other expressions which can be 1218 derived from the quantities. 1274 Here, the time series for the quantities stage and speed will be generated for 1275 each gauge defined in the gauge file defined in file{\project.py}. As an example output, 1276 Figure \ref{fig:trinitybeach} shows the time series for the quantity stage for the 1277 Trinity Beach location. 1219 1278 1220 1279 \begin{figure}[hbt] 1221 1280 %\centerline{\includegraphics[scale=0.5]{graphics/}} 1222 \caption{Maximum inundation map for the Cairns slump scenario.} 1223 \label{fig:maxdepthcairnsslump} 1224 \end{figure} 1225 1226 \begin{figure}[hbt] 1227 %\centerline{\includegraphics[scale=0.5]{graphics/}} 1228 \caption{Maximum inundation map for the Cairns fixed wave scenario.} 1229 \label{fig:maxdepthcairnsfixedwave} 1281 \caption{Time series information of the quantity stage for the Trinity Beach location.} 1282 \label{fig:trinitybeach} 1230 1283 \end{figure} 1231 1284
Note: See TracChangeset
for help on using the changeset viewer.