Error reading files generated by Ansys Fluent (CFD Software)
조회 수: 3 (최근 30일)
이전 댓글 표시
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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Computational Fluid Dynamics (CFD)에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!