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

조회 수: 9 (최근 30일)
Florian
Florian 2023년 12월 8일
댓글: Florian 2023년 12월 8일
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에서 Data Import and Analysis에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by