Effacer les filtres
Effacer les filtres

How can I import a mesh / nodes from Matlab into Ansys?

8 vues (au cours des 30 derniers jours)
Florian
Florian le 8 Déc 2023
Commenté : Florian le 8 Déc 2023
Hi there
May you have any advice how I can create an input file which can be used by Ansys for further analysis?
My aim is to set-up a script to parametrise my model and then automatically alter all the parameters and execute the analysis in Ansys.
My initial draft from last year is generating an ABAQUS input file, but I couldn´t find any information how I can import into Ansys.
Example of my draft (Matlab + main file) and the import of the rolled-up structure in ABAQUS attached:
  2 commentaires
Dyuman Joshi
Dyuman Joshi le 8 Déc 2023
Please copy and paste the code here, as the image is not clear.
Florian
Florian le 8 Déc 2023
Code in Matlab:
file=fopen('nodes.inp','w');
fprintf(file,'%12.f, %12.8f, %12.8f, %12.8f\n',nodes');
fclose(file);
file=fopen('elements.inp','w');
fprintf(file,'%12.f, %12.f, %12.f, %12.f, %12.f, %12.f, %12.f, %12.f, %12.f\n',elements');
fclose(file);
file=fopen('sets.inp','w');
for i=1:1:length(sets)
fprintf(file,['*Elset, elset=set',num2str(i),'\n'],elements');
fprintf(file,'%12.f, %12.f, %12.f, %12.f, %12.f, %12.f, %12.f, %12.f, %12.f, %12.f, %12.f, %12.f, %12.f, %12.f, %12.f, %12.f\n',sets{1,i}');
fprintf(file,'\n');
end
fclose(file);
Code in main:
*Node
*Include, input=nodes.inp
*Element, type=C3D8
*Include, input=elements.inp
*Include, input=sets.inp

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Automotive dans Help Center et File Exchange

Produits


Version

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by