Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Matlab and Ansys Interface

Status
Not open for further replies.

regi

Civil/Environmental
Feb 21, 2003
3
I am working on optimization with Matlab, I have a program written in Matlab for optimization of a structure.For Analysis I have ansys. I have to continuously interface Matlab and Ansys,such as input file from Matlab to Ansys,running Ansys,and results file from ansys to Matlab this process is continuous.
Please someone can help me how to do this ?
 
Replies continue below

Recommended for you

What command line command do you need to use to call Ansys with your input files?

What Matlab command do you need to make a command line call?







Cheers

Greg Locock

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
 
I want to create geometry of a truss in ansys from matlab
I have a matlab file consisting of node number,X and Y coordinates, E (modulus of elasticity) and Area of cross-section of each member. This input file I have to pass to ansys from matlab and run the truss in ansys and get the results and these results file I have to pass again to matlab
 
Hi,
the best you can do, I think, is to manage this via text in / out files. Embedding Ansys batch inside a Matlab script, or calling Matlab from within Ansys are, in my opinion, very complex tasks that don't pay for the time needed to implement them.

Regards
 
Well, horses for courses. My optimisation runs create 80 models and then runs them and then graphs the results. I wouldn't like to do that by hand!

Cheers

Greg Locock

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
 
Hi,
GregLocock, sounds very interesting: you mean you have managed to call Ansys batch from another program? Once I tried with MathLink and I gave up...
I agree that tens of back-and-forth runs would be a pain to do by hand.
Regi, is the Matlab routine calling mathematical functions which you could not reproduce with APDL? If not, then re-writing the routine with Ansys' APDL would probably be faster (and also faster from an execution point of view). Just an idea, though...

Regards
 
Hallo Regi,

Are you working in Model Updating? It seems to me after reading your post.
I'm developing a FEMU code using ANSYS and Scilab.
It is rather easy to manage this by employing the /SYS command in ANSYS and by executing ANSYS from the command line from Scilab.

Andrea

-------------------------------------------
Andrea Mordini, Civil Engineer, Ph.D.
-------------------------------------------
 
No, I don't use Ansys but would find it remarkable if the solver could not be called from the command line.

Cheers

Greg Locock

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor