Skip to content

Can't restart a simulation in svFSI #118

@luigamo

Description

@luigamo

Description

I wanted to restart a simulation in an specifically time step in svFSI. The simulation was stopped correctly using the file STOP_SIM, but after when I wanted to restart it setting "true" in "Continuous previous simulation" parameter on the input file, appeared the following error: "[31mERROR: Number of nodes <2207> does not match with Bechmark-CM-50mV/stFile_last.bin <2135>[0m"

I looked on the source code, specifically on the file INITIALIZE.f. There is a part where are checked some variables before restart the simulation and there is defined the error that appears to me:

! First checking all variables on master processor, since on the
! other processor data will be shifted due to any change on the
! sizes
IF (cm%mas()) THEN
IF (tStamp(1) .NE. stamp(1)) err = "Number of processors <"//
2 tStamp(1)//"> does not match with "//
3 TRIM(fName)//" <"//stamp(1)//">"
IF (tStamp(2) .NE. stamp(2)) err = "Number of equations <"//
2 tStamp(2)//"> does not match with "//
3 TRIM(fName)//" <"//stamp(2)//">"
IF (tStamp(3) .NE. stamp(3)) err = "Number of meshes <"//
2 tStamp(3)//"> does not match with "//
3 TRIM(fName)//" <"//stamp(3)//">"
IF (tStamp(4) .NE. stamp(4)) err = "Number of nodes <"//
2 tStamp(4)//"> does not match with "//
3 TRIM(fName)//" <"//stamp(4)//">"

IF (tStamp(5) .NE. stamp(5)) err = "Number of cplBC%x <"//
2 tStamp(5)//"> does not match with "//
3 TRIM(fName)//" <"//stamp(5)//">"
IF (tStamp(6) .NE. stamp(6)) err = "Number of dof <"//
2 tStamp(6)//"> does not match with "//
3 TRIM(fName)//" <"//stamp(6)//">"
IF (tStamp(7) .NE. stamp(7)) err = "dFlag specification"//
2 " <"//tStamp(7)//"> does not match with "//
3 TRIM(fName)//" <"//stamp(7)//">"
END IF

Looking up what is "stamp(4)", I found out is referred to the variable 'tnNo' which is the "Total number of nodes". I printed this variable to see what kind of values it had and I discovered that between each time step, its value change constantly:

EP 1-1 7.9E-2 [ 0 1.00000 1.00000 4.62E-7] [ 17 -146 10]
EP 1-2 1.3E-1 [-126 4.63E-7 4.63E-7 5.87E-4] [ 11 -74 8]
6246
5961
6366
6211
6211
6282
6003
6226
6158
6157
6319
6114
I don't understand why is constantly changing.

Reproduction

The simulation that I did was using CEP equation. You can try to do a simple proof stopping the simulation in any time step with the file STOP_SIM and try to restart it. It will take the file "stFile_last.bin" to restart the simulation.

Expected behavior

I expected that after setting the following parameters in the input file, the simulation was restarted correctly from the last time step that was done before stop the simulation.

#----------------------------------------------------------------

General simulation parameters

Continue previous simulation: t
Number of spatial dimensions: 3
Number of time steps: 200000
Time step size: 0.01
Spectral radius of infinite time step: 0.50
Searched file name to trigger stop: STOP_SIM

Save results to VTK format: t
Name prefix of saved VTK files: result
Increment in saving VTK files: 100
Start saving after time step: 1

Starting time step: 0
Restart file name: stFile
Overwrite restart file: f
Increment in saving restart files: 100
Convert BIN to VTK format: f

Save results in folder: restart_results

Verbose: 1
Warning: 1
Debug: 0

#----------------------------------------------------------------

Additional context

I don't know if the problem is in how I state the "General simulation parameters" on the input file or is an inner problem of the code related to the variable 'tnNo'.

Code of Conduct

  • I agree to follow this project's Code of Conduct and Contributing Guidelines

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions