File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -117,12 +117,12 @@ This block contains a ``forceDt`` attribute that will be used later to choose as
117
117
118
118
The "outputs" event triggers the output of the vtk files. The attribute "timeFrequency" has the same value as "forceDt"
119
119
so we can use the same timestep for the solver and the outputs.
120
- To start, we will set the time to 0.0 and trigger one output of the vtk files .
120
+ To start, we will set the time to 0.0 and the cycle number to 0 .
121
121
122
122
.. code-block :: python
123
123
124
124
time = 0.0
125
- solver.outputVtk( time )
125
+ cycle = 0
126
126
127
127
128
128
------------------------------------------------------------------
@@ -135,9 +135,12 @@ Once done, the simulation is ended by calling the ``cleanup`` method.
135
135
.. code-block :: python
136
136
137
137
while time < solver.maxTime:
138
- solver.execute ( time )
139
- solver.outputVtk ( time )
138
+ solver.outputVtk ( time, cycle )
139
+ solver.execute ( time, cycle )
140
140
time += solver.dt
141
+ cycle += 1
142
+
143
+ solver.outputVtk( time, cycle )
141
144
solver.cleanup( time )
142
145
143
146
You can’t perform that action at this time.
0 commit comments