How to import result data from OpenFOAM to matlab?

조회 수: 93 (최근 30일)
Mahendra Devagiri
Mahendra Devagiri 2018년 4월 19일
댓글: Arman Burkitbayev 2022년 9월 7일
hello, I want to import the result data from OpenFOAM which are compressed to matlab to plot the results and compare them with the results of other flow models. Can anyone please help me with the code?
Regards, Mahendra

답변 (2개)

Precise Simulation
Precise Simulation 2019년 5월 27일
Dear Mahendra,
If this is still relevant, you can both run OpenFOAM CFD simulations directly in MATLAB and import/export Foam and ParaView VTK results files from/to MATLAB with the FEATool Multiphysics Toolbox (as well as other formats).
  댓글 수: 3
Precise Simulation
Precise Simulation 2021년 2월 16일
Import is typically done automatically for you after the solution process but you can use the openfoam m-code function
in the Matlab CLI to import OpenFOAM data as:
sol.u = openfoam( fea, 'mode', 'import', ... );
Arman Burkitbayev
Arman Burkitbayev 2022년 9월 7일
can you please also let me know fro where can I find information about connecting my matlab model with OpenFOAM or ANsys models. I would like to run both simluations openfoam and matlab together as a input and output files.

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


Seyyed Ali
Seyyed Ali 2018년 5월 21일
Hi Mahendra,
Have you found anything? The only I have found so far is that you can convert data to VTK (foamToVTK) and read VTK in matlab using some VTK reader function. I have not found a better solution yet.
SAHM>
  댓글 수: 1
Arman Burkitbayev
Arman Burkitbayev 2022년 9월 7일
you might do it as a input and output files when you connect matlab and openfoam models.

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

카테고리

Help CenterFile Exchange에서 File Operations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by