| 11 | == Can I start the simulation at an arbitrary time? == |
| 12 | |
| 13 | Yes, using {{{domain.set_time()}}} you can specify an arbitrary |
| 14 | starting time. This is for example useful in conjunction with a |
| 15 | file_boundary, which may start hours before anything hits the model |
| 16 | boundary. By assigning a later time for the model to start, |
| 17 | computational resources aren't wasted. |
| 18 | |
| 19 | == Can I change values for any quantity during the simulation? == |
| 20 | |
| 21 | Yes, by using {{{domain.set_quantity()}}} inside the domain.evolve |
| 22 | loop you can change values of any quantity. This is for example |
| 23 | useful if you wish to let the system settle for a while before |
| 24 | assigning an initial condition. Another example would be changing |
| 25 | the values for elevation to model e.g. erosion. |
| 26 | |
| 27 | == Can I change boundary conditions during the simulation? == |
| 28 | |
| 29 | Yes, see the example in the section "Changing boundary conditions on the fly" in the |
| 30 | [http://datamining.anu.edu.au/~ole/anuga/user_manual/anuga_user_manual.pdf User Manual]. |
| 31 | |
| 32 | == How do I access model time during the simulation? == |
| 33 | |
| 34 | The variable {{{t}}} in the evolve for loop is the model time. |
| 35 | For example to change the boundary at a particular time (instead of basing this on the state |
| 36 | of the system as in the "Changing boundary conditions on the fly" section of the manual) |
| 37 | one would write something like |
| 38 | {{{ |
| 39 | for t in domain.evolve(yieldstep = 0.2, duration = 40.0): |
| 40 | if Numeric.allclose(t, 15): |
| 41 | print 'Changing boundary to outflow' |
| 42 | domain.set_boundary({'right': Bo}) |
| 43 | }}} |
| 44 | The model time can also be accessed through the public interface {{{domain.get_time()}}}, |
| 45 | or changed (at your own peril) through {{{domain.set_time()}}}. |
| 46 | |
| 47 | == Why does a file_function return a list of numbers when evaluated? == |
| 48 | |
| 49 | Currently, file_function works by returning values for the conserved |
| 50 | quantities {{{stage}}}, {{{xmomentum}}} and {{{ymomentum}}} at a given point in time |
| 51 | and space as a triplet. To access, or example, {{{stage}}} one must specify element 0 of the |
| 52 | triplet returned by file_function, to access {{{xmomentum}}} one must specify element 1 of the triplet, etc. |
| 53 | |
| 54 | == How do I use a DEM in my simulation? == |
| 55 | |
| 56 | You use {{{dem2pts}}} to convert your DEM to the required .pts format. This .pts file is then called |
| 57 | when setting the elevation data to the mesh in {{{domain.set_quantity}}}. |
| 58 | |
| 59 | == What sort of DEM resolution should I use? == |
| 60 | |
| 61 | Try and work with the '''best''' you have available. Onshore DEMs |
| 62 | are typically available in 25m, 100m and 250m grids. Note, offshore |
| 63 | data is often sparse, or non-existent. |
| 64 | |
| 65 | Note that onshore DEMS can be much finer as the underlying datasets from which they |
| 66 | are created often contain several datapoints per squate metre. |
| 67 | It may be necessary to thin out the data so that it can be imported |
| 68 | without exceeding available memory. One tool available on the net is called 'decimate'. (Need reference?). |
| 69 | |
| 70 | |
| 71 | |
| 72 | |