Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't start from given time step #103

Open
mrp089 opened this issue Oct 6, 2021 · 1 comment
Open

Can't start from given time step #103

mrp089 opened this issue Oct 6, 2021 · 1 comment

Comments

@mrp089
Copy link
Member

mrp089 commented Oct 6, 2021

As a way to deal with #96, I created the following workflow:

  1. Run a 0D simulation with coronary BCs for nstep time steps until it reaches a periodic state
  2. Project 0D solution to 3D and generate restart.0.1 file
  3. Generate *HistCOR.dat.nstep files from the history of the 0D solution
  4. Run 3D simulation for one time step to generate restart.0.* files for each processor
  5. Rename restart.0.* files to restart.nstep.*
  6. Restart 3D simulation at time step nstep
  7. Have perfectly initialized simulation with coronary BCs
    ...
  8. Profit

My goal is thus to provide svSolver with initial conditions for flow and pressure and tricking it into thinking I'm restarting a simulation with coronary BCs at time step nstep with the history provided in *HistCOR.dat.nstep.

Unfortunately, whenever I run step 6, svSolver starts computing time step 1 and not time step nstep. I've uploaded my project here. @ktbolt Can you check if I'm doing something dumb that prevents me from restarting at the chosen time step? Thank you!!

@mrp089
Copy link
Member Author

mrp089 commented Oct 8, 2021

Still not working, but some lessons learned:

  1. Contrary to popular (mine) belief, restart.0.* does NOT contain a parallel distribution of initial conditions, i.e. "time step zero". Instead. it holds variable wall properties (in case those are defined):
    c.... open input files at t=0 to get varwallprop
    c.... varwallprop is stored in restart.0.proc only
    So I would have to use time step one to rename restart files in step 5 above.
  2. It seems that the time step itself is written into the restart files (not just the file name). Not sure where that happens but that messes up step 5 above.
  3. Variable lstep used to read/write *HistRCR.dat.nstep
    write (fname1, "(a13,I0)") "QHistCOR.dat.", lstep
    is not the same as numstep to read restart.nstep.* files
    open(unit=72,file='numstart.dat',status='old')
    read(72,*) irstart
    So you end up with displacements/velocities from a different time step than boundary condition history.

More investigation is needed...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant