Krande/adapy

[Feature request] Add minimal functional support for Code Aster export

Closed this issue · 1 comments

Note to self!

Finish the support for writing Code Aster input file by completing the implementation at

p = get_fem_model_from_assembly(assembly)
write_to_med(p, analysis_dir)
write_export_file(analysis_dir, p.name, 2)
# TODO: Finish .comm setup based on Salome meca setup
with open(analysis_dir.with_suffix(".comm"), "w") as f:
f.write('mesh = LIRE_MAILLAGE(FORMAT="MED", UNITE=20)\n\n')
f.write(
"""model = AFFE_MODELE(
AFFE=_F(
MODELISATION=('3D', ),
PHENOMENE='MECANIQUE',
TOUT='OUI'
),
MAILLAGE=mesh
) \n"""
)
print(f'Created a Code_Aster input deck at "{analysis_dir}"')

Tip is to download and use Salome Meca to build the necessary input files and see what is needed to add in the .comm file and\or med file.

When finalized it should be able to run the same cantilever example as demonstrated for abaqus and calculix in the README.md file.

Functional Code Aster support was added with #12