Sorry, I didn't find any information here about how to restart a simulation. For a high-resolution simulation, I need to check the spectrum to be the one I need after a spinup. Then I will decide to continue the run or not. So this is useful for my case.
I just got a 2D NS problem:
prob = TwoDNavierStokes.Problem(dev; nx=n, Lx=L, ν, nν, μ, nμ, dt, stepper="RK4",
calcF=calcF!, stochastic=true)
After spinup, I can get the solution prob.sol or prob.vars.ζh and output to a (jld2) file. Then if I need to continue the simulation, I could define a new problem and its initial state as the one from the (jld2) file:
prob_new = TwoDNavierStokes.Problem(dev; nx=n, Lx=L, ν, nν, μ, nμ, dt, stepper="RK4",
calcF=calcF!, stochastic=true)
TwoDNavierStokes.set_ζ!(prob_new, Array(prob.vars.ζh)) # this cause error because of array size
TwoDNavierStokes.set_ζ!(prob_new, Array(prob.vars.ζ)) # this works fine
Just want to make sure set_ζ works with ζ (in grid space), not ζh (in spectral space).
Sorry, I didn't find any information here about how to restart a simulation. For a high-resolution simulation, I need to check the spectrum to be the one I need after a spinup. Then I will decide to continue the run or not. So this is useful for my case.
I just got a 2D NS problem:
After spinup, I can get the solution
prob.solorprob.vars.ζhand output to a (jld2) file. Then if I need to continue the simulation, I could define a new problem and its initial state as the one from the (jld2) file:Just want to make sure
set_ζworks withζ(in grid space), notζh(in spectral space).