System state not sized correctly for ANCF beams

49 views
Skip to first unread message

Haifei Chen

unread,
Aug 29, 2024, 2:36:52 PM8/29/24
to ProjectChrono
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.

    // 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

Radu Serban

unread,
Aug 30, 2024, 11:21:43 AM8/30/24
to ProjectChrono

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

--
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 projectchron...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/projectchrono/e50a4344-38f0-4f27-bfc9-1ea73fb73738n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages