Replies: 1 comment
-
I am curious about restarting a simulation / calculation as well. I am interested in knowing if we can resume a case with modified configuration (e.g. modified flow condition, rotation rate, etc.) instead of start from scratch. Thank you. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
Refer to the rotorhover tutorial, which mentions the code for interrupting and continuing, and the relevant part of the code:
_**# Restart simulation
restart_file = nothing
NOTE: Uncomment the following line to restart a previous simulation.
Point it to a particle field file (with its full path) at a specific
time step, and
run_simulation
will start this simulation with theparticle field found in the restart simulation.
restart_file = "/path/to/a/previous/simulation/rotorhover-example_pfield.360"
----- RESTART OPTIONS -----------------
Modify the simple wing code to try to continue running after the interruption, but the calculated data that continues to run after the interruption cannot be connected to the connection before the interruption. Here are some of the modifications and results of the attempts:
Restart simulation
#restart_file = nothing
NOTE: Uncomment the following line to restart a previous simulation.
Point it to a particle field file (with its full path) at a specific
time step, and
run_simulation
will start this simulation with theparticle field found in the restart simulation.
restart_file = "/data-path/wing-example/wing-example_pfield.100"
------------- 5) RUN SIMULATION ----------------------------------------------
println("Running simulation...")
uns.run_simulation(simulation, nsteps;
# ----- SIMULATION OPTIONS -------------
Vinf=Vinf,
rho=rho,
# ----- SOLVERS OPTIONS ----------------
p_per_step=p_per_step,
max_particles=max_particles,
sigma_vlm_solver=sigma_vlm_solver,
sigma_vlm_surf=sigma_vlm_surf,
sigma_rotor_surf=sigma_vlm_surf,
sigma_vpm_overwrite=sigma_vpm_overwrite,
shed_starting=shed_starting,
vlm_rlx=vlm_rlx,
extra_runtime_function=monitor_wing,
# ----- RESTART OPTIONS -----------------
restart_vpmfile=restart_file,
# ----- OUTPUT OPTIONS ------------------
save_path=save_path,
run_name=run_name
);
However, CL and CD data are not calculated on the basis of the interrupt, but are recalculated.
There is also a problem where the data processing is not very convenient, the run_name must be redefined to continue running, and in the new folder, the generated .vlm and .xmf files are renamed according to the number of iteration steps, rather than adding up on the basis of the pre-interruption.
In order not to change the max_particles, a new variable nsteps_new was added after the break so that it was equal to nsteps minus the number of steps that were calculated before the break, but the pfield is not very correct.
I would like to ask how to continue to run the code correctly after the interruption, so that can achieve data coherence and calculate the continuity of file naming.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions