Automation of Nastran NX FEM analysis using Matlab code

조회 수: 39 (최근 30일)
Alberto Mora
Alberto Mora 2017년 3월 27일
댓글: Boby Alexander 2024년 3월 18일
Hello,
I have to compute a large number of FEM analysis using NX-Nastran, modifying some parameters (geometry, stiffness), and than compute specific tasks (e.g. compute static deflection on a poin of the structure or compute an FRF in a specific DOF of strucute). Then I want to use such FEM results for perform some operations in MATLAB (for example a numerical optimization).
I think that it could be a good idea use Matlab code to automatize the optimization of the FEM model.
Basically this is the procedure that I want to get:
  1. I want to modify some parameters from MATLAB to my Nastran model (Maybe modify the input file *.dat file?).
  2. (eventual) re-mesh of the model.
  3. run the FEM analysis from MATLAB (i.e. run NASTRAN engine from MATLAB, passing the simulation input file and the mesh file)
  4. Save FEM results into a text file on the FEM folder.
  5. Read the results in Matlab and perform my analysis
  6. do it again until finish condition is met.
I notice that there are some tools for interact between matlab and FEM, but are not free.
How can I do such "driven optimization"?
  댓글 수: 5
Alberto Mora
Alberto Mora 2021년 3월 15일
Dear Katherinie, I would like to help you but at the moment I am not working on this topic. Anyhow in this page there are many tips from other users. It is very important that if you reach good results, you share here your knowledge here for help other people, as other users already done before you. Thank you and good luck!
Boby Alexander
Boby Alexander 2024년 3월 18일
Hi Katherinie, are you completed the integration of Nastran and Matlab?
Can you share your finding, results or code that use in Matlab here?
I am working on the coupling between Nastran and Matlab and figure out that it is very difficult. Maybe you can help me.
My email is : alexpnitb2000@gmail.com please share your achievement with me. Many thanks.

댓글을 달려면 로그인하십시오.

답변 (2개)

KSSV
KSSV 2017년 3월 27일
  댓글 수: 3
KSSV
KSSV 2017년 3월 27일
Read about system
Alberto Mora
Alberto Mora 2017년 3월 28일
I notice that the comand just open the program but do not run a specific simulation

댓글을 달려면 로그인하십시오.


V San
V San 2020년 8월 26일
Nastran's Quick Referece Manual is the key! I am using a similar approach as in the link shared above by @Alberto Mora in an optimization framework. Some helpful points in addition to what is highlighted there:
  1. The important sections in the Nastran .bdf file can be broken into the following sections
  • Case control
  • mesh - elements and grid points (nodes)
  • material and properties
  • boundary condition related (SPC, etc)
  • loads (forces, enforced displacements)
  • methods (e.g. in eigenvalue analysis)
There maybe other sections depending on your analysis, but these are the most common. If you are going to repeat analysis on the same model, the mesh will be same. Case control defines the IDs of the loads, boundary conditions, methods, etc in the analysis for each subcase. This is generally predefined.
So, you can create a "base" .bdf file with these details. You can also add any other detail that you know will remain same throughout in your analysis.
2. Good practice to create a copy of this "base" file, before editing with updated parameters. This way, you can use it multiple times without running into bugs. Copy, read, write, etc in Matlab are readily available functions. Depending on where you base files are stored and where you want to run nastran, make sure folder paths are defined correctly.
3. In writing data, make sure you stick to the "8-bit" (or 16 - nastran's Quick Referece Manual has details on this) format or use commas. For beginners, using a text editor like Notepad++ will go a long way (rather than Notepad or Wordpad)!!
3. If you are going to run different types of anlysis, e.g SOL103, SOL105, etc on the same model, create .dat or .bdf files separately for mesh elements, nodes, material, etc. This way, in your main analysis .bdf files you would only have to use "INCLUDE" keyword to attach these details, rather than repeat everthing for each analysis file. Also, editing and debugging would be easier (Say, you want to change the material, you would only have to update in one place, not all the anlysis files). e.g.
INCLUDE node_list.dat
INCLUDE material_list.dat
4. If you need to include, for e.g. loads, from one anlysis as input to another anlysis, an option is to generate .pch output for that data in the first analysis and directly include it in the .bdf of second anlysis using "INCLUDE" keyword

카테고리

Help CenterFile Exchange에서 Genetic Algorithm에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by