Hi Haifei,

Thanks for bringing these issues to our attention.

I pushed changes to address all of them:

  *   The ANCF elements perform some additional initial setup operations, and 
these were only done during the system initialization (itself done 
automatically at the first call to DoStepDynamics or similar functions).  As 
such, a call to ChSystem::Setup is not enough to properly set the number of 
states for systems that include FEA meshes with ANCF elements.  That is now 
fixed, and your code below should report the expected number of states.
  *   There was no particular reason why a beam builder for ANCF_3243 elements 
was not available. I added ChBuilderBeamANCF_3243 and renamed the old 
ChBuilderBeamANCF to ChBuilderBeamANCF_3333.
  *   I also fixed the order of the nodes as cached in ChMesh and in the beam 
builder class so that they match (using the ordering in the latter, meaning 
that the nodes have increasing indices as you move along the beam).

--Radu


From: [email protected] <[email protected]> On Behalf 
Of Haifei Chen
Sent: Thursday, August 29, 2024 8:37 PM
To: ProjectChrono <[email protected]>
Subject: [chrono] System state not sized correctly for ANCF beams

Hello,

I'm trying to save/load chrono system state. Before time stepping, I added the 
following code to beamsEuler and beamsANCF in FEA demos, to check the state 
size.  Euler beam returned the correct sizes, but not ANCF beam. Could someone 
provide some clues about this?

Also, is there a specific reason ChBuilderBeamANCF_3243 was not provided? For 
ChBuilderBeamANCF_3333, the nodes were added to the mesh and the beam_nodes in 
different order. Adding them in the same sequence might be convenient for, eg., 
bookkeeping purposes if there are many beams.
https://github.com/projectchrono/chrono/blob/main/src/chrono/fea/ChBuilderBeam.cpp#L376<https://urldefense.com/v3/__https:/github.com/projectchrono/chrono/blob/main/src/chrono/fea/ChBuilderBeam.cpp*L376__;Iw!!Mak6IKo!KOqPrk_I1iF30AVZBoyJGiEbivj3fxUjJLihoojJ4d-1Grq-MYytSWMydtIFKG6bBgl64aS0z-HpBX7trg$>

https://github.com/projectchrono/chrono/tree/main/src/demos/fea<https://urldefense.com/v3/__https:/github.com/projectchrono/chrono/tree/main/src/demos/fea__;!!Mak6IKo!KOqPrk_I1iF30AVZBoyJGiEbivj3fxUjJLihoojJ4d-1Grq-MYytSWMydtIFKG6bBgl64aS0z-EF-UcANg$>
    // Initialize system state, if not setup first, pos 0, vel 0
    sys.Setup();

    std::cout << "\nInitialize system state, pos " << sys.GetNumCoordsPosLevel()
        << ", vel " << sys.GetNumCoordsVelLevel()
        << std::endl << std::endl;

    ChState X(sys.GetNumCoordsPosLevel(), &sys);
    ChStateDelta V(sys.GetNumCoordsVelLevel(), &sys);

    // double tmpT = sys.GetChTime();
    // sys.StateGather(X, V, tmpT);
    // sys.StateGatherAcceleration(A);

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]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/projectchrono/e50a4344-38f0-4f27-bfc9-1ea73fb73738n%40googlegroups.com<https://urldefense.com/v3/__https:/groups.google.com/d/msgid/projectchrono/e50a4344-38f0-4f27-bfc9-1ea73fb73738n*40googlegroups.com?utm_medium=email&utm_source=footer__;JQ!!Mak6IKo!KOqPrk_I1iF30AVZBoyJGiEbivj3fxUjJLihoojJ4d-1Grq-MYytSWMydtIFKG6bBgl64aS0z-FXZQTvOw$>.

-- 
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/CH3PPF46CDC2185FD6CBF80231F37B12478A7972%40CH3PPF46CDC2185.namprd06.prod.outlook.com.

Reply via email to