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

8 次查看(过去 30 天)
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 个评论
Dyuman Joshi
Dyuman Joshi 2023-12-8
Please copy and paste the code here, as the image is not clear.
Florian
Florian 2023-12-8
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

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Automotive 的更多信息

产品


版本

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by