Error reading files generated by Ansys Fluent (CFD Software)

3 ビュー (過去 30 日間)
Pablo Díez
Pablo Díez 2020 年 7 月 9 日
INTRODUCTION
I am simulating the landing of a rocket for which I need to solve the dinamycal equations. These equations depends on the aerodynamical forces and moments due to atmosphere action. So I have created a matlab script that waits for FLUENT to return those values for every snapshot of the rocket in the landing. Later, Matlab solves the equations that define the rocket's motion with a runge-kutta of order 4.
While Matlab is waiting, FLUENT generates two files, one for the moments and another one for the forces. The interesting values of these files (with .frp extension) are extracted by the function obtener_datos(), that is located in the class called: MisFunciones.m.
Since FLUENT is called every snapshot, obtener_datos() internally deletes those two files every instance.
The iterative proccess of the simulator is described below:
-Matlab calls FLUENT to obtain the aerodynamical forces and moments for the initial position.
- Matlab waits for FLUENT.
- FLUENT returns two files.
- Matlab extracts the interesting values and deletes the files (with MisFunciones.obtener_datos).
- Matlab solves the equations of motion and calculates the next snapshot of the rocket in a step time.
- Matlab calls FLUENT to obtain the aerodynamical forces and moments for that position.
These loop is repeteated indefinitedly until the rocket lands on the Earth surface.
THE PROBLEM:
The problem that I am facing is that in one of iterations Matlabs returns this ERROR:
Iteration number:
35
Error using strsplit (line 80)
First input must be either a character vector or a string scalar.
Error in MisFunciones.obtener_datos (line 433)
dato=strsplit(linea,' ');
The strange thing is that when I run the same function in the Command Window it runs correctly, despite of the warning displayed:
Warning: File not found or permission denied
> In MisFunciones.obtener_datos (line 440)
ans =
1.0e-09 *
-0.0072 -0.2596 -0.2569 0 0 0 0
I have tried everything but I can not find the error.
PLEASE I HAVE BEEN STUCK IN THIS PROBLEM FOR TWO WEEKS, I NEED HELP.

回答 (0 件)

カテゴリ

Help Center および File ExchangeComputational Fluid Dynamics (CFD) についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by