[MBDyn-users] Generate modal joint data for MBDyn in Code_Aster 15.6.0

MBDyn users list mbdyn-users at mbdyn.org
Mon Jan 15 22:16:50 CET 2024


Dear Benny,

OK, I see.

Now I have fixed at least the import statements and the definition of 
the macro command, although the catalog definition is still missing.

You can find the current state here:

https://public.gitlab.polimi.it/DAER/mbdyn/-/blob/fix-code-aster-cms.py/contrib/CodeAster/cms/cms.py

Unfortunately it seems that there were a lot of changes in the syntax of 
Code_Aster command files since 2016, and my old test models do not work 
any more. So, I would like to ask you, if you have a model for 
Code_Aster 15.6 (command file and mesh) which you could share? It should 
include minimum two RBE3 or RBE2 elements.

Reinhard

On 02.01.24 22:13, MBDyn users list wrote:
> Dear Reinhard,
>
> I did not run cms.py as a script, I only opened it in vscode to better understand what the "IndentationError" means.
> To run the macro I used Astk and the files "cms00000.comm" and "cms.mail" from the MBDyn gitlab.
>
> Therefore I am sure that the macro is called from Code_Aster and the error messages from below are taken from the file "cms.mess" which is the message output file from the solver.
>
> I will have a look at the attached beam example.
>
> Thanks and kind regards
> Benny
>
> Gesendet: Dienstag, 02. Januar 2024 um 20:55 Uhr
> Von: "MBDyn users list" <mbdyn-users at mbdyn.org>
> An: mbdyn-users at mbdyn.org
> Betreff: Re: [MBDyn-users] Generate modal joint data for MBDyn in Code_Aster 15.6.0
> Dear Benny,
>
> Well, I think that you should not consider cms.py as a standard Python
> library or script. So, you won't be able to run it from Python at all.
> Instead you need to call it from a Code-Aster command file. Then you
> need launch Code-Aster via an Astk job including your command file and
> mesh.
>
> At least that was the procedure until Code-Aster 12.5. See the attached
> file as an example on how to call cms.py.
>
> If you have any questions about mboct-fem-pkg, please let me know!
>
> Best regards,
>
> Reinhard
>
> On 02.01.24 20:16, MBDyn users list wrote:
>> Hello Reinhard,
>>
>> thanks for fixing the python "IndentationError" in the macro. I should have had a look at the macro in vscode because there the identation problems are highlighted.
>> Anyway the script runs now until line 826 and then stops:
>>
>> ----------------------------------------------------------------------------------------------------------------------
>> Traceback (most recent call last):
>> File "./cms00000.comm.changed.py", line 107, in <module>
>> from cms import CMS
>> File "/path_to/cms.py", line 826, in <module>
>> CMS = MACRO( nom = "CMS",
>> NameError: name 'MACRO' is not defined
>>
>> EXECUTION_CODE_ASTER_EXIT_42305=1
>>
>>
>>
>> ------------------------------------------------------------
>> --- DIAGNOSTIC JOB : <F>_ABNORMAL_ABORT
>> ------------------------------------------------------------
>> ----------------------------------------------------------------------------------------------------------------------
>>
>> I installed Code_Aster by following this guide: https://code-aster.org/V2/spip.php?article303
>> First you have to download the container with Code_Aster version 15.6.0: https://code-aster.org/FICHIERS/singularity/salome_meca-lgpl-2022.1.0-1-20221225-scibian-9.sif[https://code-aster.org/FICHIERS/singularity/salome_meca-lgpl-2022.1.0-1-20221225-scibian-9.sif]
>> Then you have to install "apptainer" to run the container. Instructions for the apptainer installation can be found here: https://apptainer.org/docs/admin/latest/installation.html#installation-on-linux[https://apptainer.org/docs/admin/latest/installation.html#installation-on-linux]
>> The container also includes the full build environment for Code_Aster and the source code is now hosted here: https://gitlab.com/codeaster[https://gitlab.com/codeaster]
>> But it is not necessary to build Code_Aster 15.6.0 from scratch since it is included in the container.
>>
>> To answer your question from the December thread, my plan is to use Code_Aster to generate flexible bodies for MBDyn.
>> I know that there are alternatives like mboct (https://github.com/octave-user[https://github.com/octave-user]) but I also have some problems to get this running.
>> I will post my questions related to mboct directly in the issues section on github.
>>
>> Kind regards,
>> Benny
>>
>> Gesendet: Montag, 01. Januar 2024 um 21:54 Uhr
>> Von: "MBDyn users list" <mbdyn-users at mbdyn.org>
>> An: mbdyn-users at mbdyn.org
>> Betreff: Re: [MBDyn-users] Generate modal joint data for MBDyn in Code_Aster 15.6.0
>> Dear Benny,
>> It would be nice if you could provide a few instructions, on how to install Code_Aster. When I installed it the last time, the whole build system was completely different.
>> So, far I have cloned Code-Aster from source-forge using this command:
>> hg clone http://hg.code.sf.net/p/codeaster/src[http://hg.code.sf.net/p/codeaster/src] codeaster-src
>> However, I did not find any tag for version 15.6.0.
>> If I type this command, those are the only versions I can see.
>> hg tags | grep '15\.'
>> 15.5.3                         13354:03eac3d09c83
>> 15.5.2                         13287:f1f519a87d56
>> 15.5.1                         13127:268728295c96
>> 15.5.0                         13068:db385d8de366
>> hg tags | grep '16\.'
>> 16.1.8                         13361:7d0a85e8d397
>> 16.1.7                         13339:5edc545a1739
>> 16.1.6                         13318:7df205a15c38
>> 16.1.5                         13283:a8b7f6bdac25
>> Furthermore, it seems that ./waf configure cannot find a file called med.h, although libmedc-dev from EDF is installed.
>> Checking for library med                 : yes
>> Checking for header med.h                : no
>> If it is true, that med is still the main data format of Code-Aster, probably Code-Aster would be almost useless without med.
>> Best regards,
>> Reinhard
>>
>>
>> On 29.12.23 13:05, MBDyn users list wrote:
>>
>> Hello,
>>
>> I tried to use the "cms.py" macro from the MBDyn GitLab (https://public.gitlab.polimi.it/DAER/mbdyn/-/tree/develop/contrib/CodeAster/cms[https://public.gitlab.polimi.it/DAER/mbdyn/-/tree/develop/contrib/CodeAster/cms][https://public.gitlab.polimi.it/DAER/mbdyn/-/tree/develop/contrib/CodeAster/cms[https://public.gitlab.polimi.it/DAER/mbdyn/-/tree/develop/contrib/CodeAster/cms]]) in combination with Code_Aster 15.6.0.
>> It looks like that the macro is not compatible with this newer release of Code_Aster since it produces the following error:
>> ------------------------------------------------------------
>> Traceback (most recent call last):
>> File "./cms00000.comm.changed.py", line 107, in <module> from cms import CMS File "/path_to/cms.py", line 391 eps = data[4]; ^IndentationError: unexpected indentEXECUTION_CODE_ASTER_EXIT_31240=1--------------------------------------------------------------- DIAGNOSTIC JOB : <F>_ABNORMAL_ABORT------------------------------------------------------------
>>
>> I also openend a thread on the Code_Aster forum where you can find more details about the problem:
>>
>> https://code-aster.org/forum2/viewtopic.php?id=27151[https://code-aster.org/forum2/viewtopic.php?id=27151][https://code-aster.org/forum2/viewtopic.php?id=27151[https://code-aster.org/forum2/viewtopic.php?id=27151]]
>>
>> It would be great to have this macro working again so that we can create data for modal joints with Code_Aster.
>>
>> Thanks for your answer and your ongoing work on the MBDyn project.
>>
>> Kind regards,
>> Benny
>> _______________________________________________MBDyn-users mailing listMBDyn-users at mbdyn.org[mailto:MBDyn-users at mbdyn.org]https://mail.mbdyn.org/cgi-bin/mailman/listinfo/mbdyn-users[https://mail.mbdyn.org/cgi-bin/mailman/listinfo/mbdyn-users]
>> _______________________________________________ MBDyn-users mailing list MBDyn-users at mbdyn.org https://mail.mbdyn.org/cgi-bin/mailman/listinfo/mbdyn-users[https://mail.mbdyn.org/cgi-bin/mailman/listinfo/mbdyn-users][https://mail.mbdyn.org/cgi-bin/mailman/listinfo/mbdyn-users[https://mail.mbdyn.org/cgi-bin/mailman/listinfo/mbdyn-users]]
>>
>>
>> _______________________________________________
>> MBDyn-users mailing list
>> MBDyn-users at mbdyn.org
>> https://mail.mbdyn.org/cgi-bin/mailman/listinfo/mbdyn-users_______________________________________________[https://mail.mbdyn.org/cgi-bin/mailman/listinfo/mbdyn-users_______________________________________________]
> MBDyn-users mailing list
> MBDyn-users at mbdyn.org
> https://mail.mbdyn.org/cgi-bin/mailman/listinfo/mbdyn-users[https://mail.mbdyn.org/cgi-bin/mailman/listinfo/mbdyn-users]
>   
>   
> _______________________________________________
> MBDyn-users mailing list
> MBDyn-users at mbdyn.org
> https://mail.mbdyn.org/cgi-bin/mailman/listinfo/mbdyn-users


More information about the MBDyn-users mailing list