Openvsp Interface with Matlab

514 views
Skip to first unread message

Julián González

unread,
Aug 15, 2018, 12:51:57 AM8/15/18
to OpenVSP
Hi All,

We are currently working on a project related to CFD and Matlab. One of our step is to set up an interface between Matlab and Open VSP to create and adjust the location of a multi-body geometry. So I am wondering if there is any specific commands or functions to achieve such a goal. The CFD software that we are planing to use is Cart3D therefore I was wondering too if there was any specific commands to create a .tri geometry from matlab

Kind Regards 
Julian 

Ruipeng Xu

unread,
Aug 15, 2018, 12:53:12 AM8/15/18
to OpenVSP
Oh, I am having the same question. Could anyone provide any suggestions? Thanks alot

在 2018年8月15日星期三 UTC+10下午2:51:57,Julián González写道:

Rob McDonald

unread,
Aug 15, 2018, 1:04:28 AM8/15/18
to ope...@googlegroups.com
Are you using the Cart3D optimization framework, or are you looking to drive more holistically through Matlab?

Have you succeeded in writing a *.tri file from OpenVSP and using it with Cart3D?

I'm trying to get a better idea of where you already are -- what are your real questions...

Rob


--
You received this message because you are subscribed to the Google Groups "OpenVSP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openvsp+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Julián González

unread,
Aug 15, 2018, 1:13:17 AM8/15/18
to OpenVSP
What we are actually trying to do is write a script file for a geometry creation through openvsp without using the Guide User Interface (GUI) that then we can call up on a Matlab code that under the same directory will put the geometry through a Cart3D Simulation.

Currently we have successfully created a geometry through the GUI and has successfully been run on Cart3D simulation through a Matlab code, what we want to do is we want to be able to change the geometry without using the GUI

Kind Regards

Rob McDonald

unread,
Aug 15, 2018, 1:30:38 AM8/15/18
to ope...@googlegroups.com
If you just want to vary parameters for a baseline geometry, the I suggest you use the 'Design Variable' functionality.  It allows you to choose which variables to vary and provides an easy way to 'apply' those changes to your baseline file.  You can then use a simple *.vspscript to automate whatever analysis/export you need from OpenVSP.

The same functionality can be used with *.DES files or *.XDDM files -- the latter is an XML format defined by the Cart3D optimization framework -- i.e. OpenVSP is a drop-in geometry engine for Cart3D shape optimization.

If you need more sophisticated 'driving' of OpenVSP from Matlab, there are a couple of ways you might proceed.  This is the way to go if you need to generate models from scratch (no baseline files), or perform more complex use of the OpenVSP API.

It should be possible to call OpenVSP directly from Matlab in two ways.  You will need to be able to compile OpenVSP yourself -- and you'll need to be a bit of a hacker....  SWIG is a wrapper interface generator that OpenVSP uses to create the Python wrapper.  It can also generate Java wrappers and in recent development versions, Matlab wrappers.  Matlab can call the Java wrappers if need be -- or perhaps the development Matlab version could be made to work.

However, I suggest you try just using the *.des file and see how far you can get.

Rob




--
Reply all
Reply to author
Forward
0 new messages