Skip to content

restart a run #388

@miniufo

Description

@miniufo

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions