Git Product home page Git Product logo

Comments (7)

sayerhs avatar sayerhs commented on June 11, 2024

Wouldn't turning on shared library ON in CMake allow using openfastlib.so with Simulink?

from openfast.

HaymanConsulting avatar HaymanConsulting commented on June 11, 2024

@sayerhs, yes you are correct (I didn't know this until reading your comment), for cmake builds, but there is currently no equivalent build for visual studio. (The vs-build of the FASTlib, does not include the FAST_Library.f90 file, and the vs-build output is only a static library)

from openfast.

bjonkman avatar bjonkman commented on June 11, 2024

A couple of differences with the openfastlib.so as it seems to be implemented in CMake:

  • It should use the Matlab libmex library so that all messages that normally get written to the screen appear in the Matlab command window. On Windows with Intel Fortran, we replace SysIVF.f90 with SysMatlab.f90 (which calls Matlab routines for printing) and link with libmex.lib from the Matlab installation. As far as I know, no one has modified the other Sys*.f90 files for other platforms/compilers.
  • It should use the COMPILE_SIMULINK preprocessor directive.

Instructions for how this is supposed to work are on pages 54-55 of the FAST8 ReadMe

from openfast.

bjonkman avatar bjonkman commented on June 11, 2024

One other thing to note here is that FAST_Library.h is used in FAST_SFunc.c (which gets compiled in MATLAB as a mex file). It looks like the interfaces defined in the header file have changed, but the code that calls those routines in FAST_SFunc.c has not.

from openfast.

gantech avatar gantech commented on June 11, 2024

Thanks @bjonkman.

@ghaymanNREL This may have to be addressed to have Simulink work again with OpenFAST. I was not aware that Simulink uses the "OpenFOAM" module in OpenFAST.

from openfast.

bjonkman avatar bjonkman commented on June 11, 2024

@gantech Simulink doesn't use the OpenFOAM module. However, it does use some of the same FAST_Library.f90 interface routines (e.g., the Sizes, Start, Update, and End routines). FAST_Library.f90 and FAST_Library.h were originally created for the Simulink interface; I just expanded them a bit when we needed a similar interface to link with OpenFOAM.

from openfast.

bjonkman avatar bjonkman commented on June 11, 2024

@rafmudaf , since this has been merged into OpenFAST/dev I think this issue can be closed.

from openfast.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.