Hello Haifei,
We can restore and recover the system state via simply mimicking the
operations in time steppers. Taking the HHT stepper as example, to restore
the system state at time instant T, we can do:
ChIntegrableIIorder* mintegrable =
(ChIntegrableIIorder*)hht_stepper->GetIntegrable();
// Setup main vectors
mintegrable->StateSetup(X, V, A);
L.setZero(mintegrable->GetNumConstraints());
// State at current time T
mintegrable->StateGather(X, V, T); // state <- system
mintegrable->StateGatherAcceleration(A); // <- system
mintegrable->StateGatherReactions(L); // <- system
After one time step, or in fact at any time instant as you like, to recover
the system state, you can do:
// Scatter state -> system doing a full update
mintegrable->StateScatter(X, V, T, true);
// Scatter auxiliary data (A and L) -> system
mintegrable->StateScatterAcceleration(A);
mintegrable->StateScatterReactions(L);
Best regards,
PENG Chao
在2024年3月25日星期一 UTC+1 23:03:42<[email protected]> 写道:
> Hello Chrono developers,
>
>
> To ensure a tighter coupling between (mesh or particle-based ) CFD solver
> and Chrono, it may be necessary to conduct several iterations per time
> step. Is there a function in ChSystem that can simply restore the system
> state (bodies, links, FEA, contact, etc) to the previous time step?
>
>
> The current archives and (de)serialization write the system to an external
> file (binary, json, xml), which I suppose supports a restart simulation.
> https://api.projectchrono.org/tutorial_demo_archive.html
>
> Every time a system state is deserialized through such a file, the
> predefined bodies and links are, however, not restored to the previous time
> step. Could the Chrono system be serialized directly into the memory, or
> even better, can the system restore the states of all its children to a
> previous time step, while still using all of the children’s predefined
> pointers/references? Is this possible, or did I misunderstand something?
>
>
> I notice that the current FSI module adopts a loose coupling approach. No
> fluid-solid iteration is to be performed within every time step.
>
>
> Thank you,
>
> Haifei
>
>
--
You received this message because you are subscribed to the Google Groups
"ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/projectchrono/ce445fcb-8714-42fd-a51e-2b10a73876bfn%40googlegroups.com.