Skip to content
Snippets Groups Projects
Commit 59808ef9 authored by Feliks Kiszkurno's avatar Feliks Kiszkurno
Browse files

Added more infromation abount defining output timesteps

parent 23cf8bff
No related branches found
No related tags found
No related merge requests found
...@@ -209,7 +209,7 @@ They can be provided as absolute, relative or both. ...@@ -209,7 +209,7 @@ They can be provided as absolute, relative or both.
### Time discretizationn ### Time discretizationn
TODO: describe different options for time discretization <!-- TODO: describe different options for time discretization-->
For the time being only backward Euler time stepping scheme is available. For the time being only backward Euler time stepping scheme is available.
...@@ -225,9 +225,13 @@ The desired format for output files can be declared as follows: ...@@ -225,9 +225,13 @@ The desired format for output files can be declared as follows:
``` ```
The number of time steps at which the output files are written doesn't need to match the simulation time steps. The number of time steps at which the output files are written doesn't need to match the simulation time steps.
They can be defined in the same way as in [fixed time step time stepping](/docs/userguide/blocks/time_loop/#fixed-time-stepping).
If specific times of the simulation are of a special interest to the user, OpenGeoSys can write the output files at times provided in a list in `<fixed_output_times> </fixed_output_times>` tag: There are two ways how the times at which the output will be written can be specified: as fixed output times and timesteps.
The fixed output times can be defined in the same way as in [fixed time step time stepping](/docs/userguide/blocks/time_loop/#fixed-time-stepping).
This approach is suitable, if specific times of the simulation are of a special interest to the user.
In such a case, OpenGeoSys can write the output files at times provided in a list in `<fixed_output_times> </fixed_output_times>` tag:
```xml ```xml
<fixed_output_times> <fixed_output_times>
...@@ -241,6 +245,70 @@ If specific times of the simulation are of a special interest to the user, OpenG ...@@ -241,6 +245,70 @@ If specific times of the simulation are of a special interest to the user, OpenG
</fixed_output_times> </fixed_output_times>
``` ```
If output times are supposed to be cyclic, or follow some patterns, defining them as timesteps will be more convenient.
In order to do so, block ```xml <timesteps> </timesteps>```has to be placed in ```<output>```block.
It can contain arbitrary number of blocks ```xml <pair> </pair>```, which define a cyclical pattern each.
The block ```<pair>``` has to contain two tags: ```<repeat>``` and ```<each_steps>```.
```<repeat>``` defines how many outputs with spacing of ```<each_steps>``` timesteps should be written.
All pair defined in ```<timesteps>``` block share the same "counter".
This means, that the starting timestep for the next pair is the last timestep from the previous one.
Following example illustrates this:
```xml
<timesteps>
<pair> <!-- First pair -->
<repeat>1</repeat>
<each_steps>10</each_steps>
</pair>
<pair> <!-- Second pair -->
<repeat>1</repeat>
<each_steps>90</each_steps>
</pair>
<pair> <!-- Third pair -->
<repeat>1</repeat>
<each_steps>900</each_steps>
</pair>
</timesteps>
```
Using this block in the project file will result in the output being written at timesteps: 10, 100 and 1000.
First file would be written as result of the fist ```<pair>```.
It will write output once (as ```<repeat>``` has value of 1) after 10 timesteps (10 is the value provided in ```<each_steps>```).
Second pair will write an output file after 90 timesteps, but the counting starts not at timestep 0, but at the last timestep resulting from the previous pair.
In this cas this is timestep 10, hence second pair will write an output at 100 (10 timesteps from first pair plus 90 timesteps from second pair).
The same applies to the third pair.
It will write an output at 1000 as 1000 is the result of addition of 10, 90, and 900 from first, second and third steps respectively.
Note, that in this case the values in ```<each_steps>``` tag can be summed directly, as each pair is repeated only once.
Now, consider more complicated pattern.
Let's assume, that output has to be written at every timestep for range 1-10 timesteps, every tenth in range 10-100 timesteps and every hundredth for range 100-1000.
Block defining this pattern would be written as follows:
```xml
<timesteps>
<pair> <!-- First pair -->
<repeat>10</repeat>
<each_steps>1</each_steps>
</pair>
<pair> <!-- Second pair -->
<repeat>9</repeat>
<each_steps>90</each_steps>
</pair>
<pair> <!-- Third pair -->
<repeat>9</repeat>
<each_steps>100</each_steps>
</pair>
</timesteps>
```
This will result in output being written at timesteps: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 200, 300, 400, 500, 600, 700, 800, 900 and 1000.
Note, that since output at 10th timestep is the last one resulting from first pair, it will be the starting point for the second pair, therefore the second pair needs to be repeated only 9 times.
Otherwise last output from second pair would be written at timestep 110.
The same applied to third pair.
Output at timestep 100 is written by the second pair, therefore to get to 1000, third pair only needs to be repeated 9 times.
Regardless of the user defined output timesteps, OpenGeoSys will write the output files at $t=0$ and $t=t_{end}$.
The naming of output files written at different time steps is handled automatically by OpenGeoSys. The naming of output files written at different time steps is handled automatically by OpenGeoSys.
User can use two tags that allow control over how the file names are structured and what they contain: tags `<suffix> </suffix>` and `<prefix> </prefix>`. User can use two tags that allow control over how the file names are structured and what they contain: tags `<suffix> </suffix>` and `<prefix> </prefix>`.
The rules regarding their content are the same. The rules regarding their content are the same.
...@@ -275,7 +343,7 @@ If only temperature and pressure are important, this block can be defined as fol ...@@ -275,7 +343,7 @@ If only temperature and pressure are important, this block can be defined as fol
``` ```
The list of available variables differs between processes. The list of available variables differs between processes.
TODO: Create list of variables available in different processes <!-- TODO: Create list of variables available in different processes-->
In order to save space, the compression of output files can be enabled with: In order to save space, the compression of output files can be enabled with:
...@@ -311,4 +379,4 @@ $$ ...@@ -311,4 +379,4 @@ $$
$$ $$
\mathrm{max}_i |x_i| \mathrm{max}_i |x_i|
$$ $$
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment