Problema com Ponto de Entrada...
03/08/2018
0
A Biblioteca:
LIBRARY Geral_Library;
USES
Windows;
{------------------------------------------------------------------------------------------------------------------------}
{ Definition of CLASS variables }
{------------------------------------------------------------------------------------------------------------------------}
{ Definition of property tables - Definition of CLASS variables }
TGeometry = CLASS
Public
{ Declaration of variables - Instance Variables }
imax,jmax : INTEGER;
xyn : TYPE1;
{ Definition of the constructor }
CONSTRUCTOR Coordinates; export;
END;
{ Declaration of constants }
CONST
g = 1.4E0; { Ratio of specific heats }
R_univ_gas = 1.987E0; { Definition of the universal gas constant in cal/(g-mol.K) }
PI = 3.141592654E0; { Nondimensional constant }
N_Av = 6.022045E23; { Avogrado constant in particles/(g-mol) }
VAR
imax,jmax : INTEGER;
Geometry : TGeometry;
{$R *.RES}
{--------------------------------------------------------------------------------------------------------------}
{ Defining External Constructors, Procedures, and Functions }
{--------------------------------------------------------------------------------------------------------------}
{--------------------------------------------------------------------------------------------------------------}
{ This Procedure Initializes the General Data of the Simulation }
{--------------------------------------------------------------------------------------------------------------}
CONSTRUCTOR TGeometry.Coordinates; export;
{ This procedure is responsible to the reading of the x and y coordinates of the computational mesh. It reads }
{ the imax and jmax limiter indexes and perform a loop in i and in j to read the coordinates. }
VAR
f1 : TEXTFILE;
i,j : INTEGER;
BEGIN
{ Main part of this procedure }
INHERITED Create;
{ Defining the geometry coordinates }
ASSIGNFILE(f1,'DATAS2.DAT');
RESET(f1);
READLN(f1,imax);
READLN(f1,jmax);
FOR i := 1 TO imax DO
FOR j := 1 TO jmax DO
READLN(f1,xyn[i,j,1],xyn[i,j,2]);
{ Closing the file }
CLOSEFILE(f1);
END;
{--------------------------------------------------------------------------------------------------------------}
EXPORTS
Geometry;
{--------------------------------------------------------------------------------------------------------------}
BEGIN
END.
O Código:
PROGRAM Reentry_Flow_2D;
{ This program will simulate the reentry flow conditions that some configurations suffer when reentrying in the Earth atmosphere. }
USES
Windows,Geral;
{------------------------------------------------------------------------------------------------------------------------}
{ Definition of CLASS variables }
{------------------------------------------------------------------------------------------------------------------------}
{ Definition of property tables - Definition of CLASS variables }
TGeometry = CLASS
Public
{ Declaration of variables - Instance Variables }
imax,jmax : INTEGER;
xyn : TYPE1;
{ Definition of the constructor }
CONSTRUCTOR Coordinates; export;
END;
{ Declarations of variables }
VAR
imax,jmax : INTEGER;
xyn : TYPE1;
Geometry : TGeometry;
{--------------------------------------------------------------------------------------------------------------}
{ Defining External Constructors, Procedures, and Functions }
{--------------------------------------------------------------------------------------------------------------}
{--------------------------------------------------------------------------------------------------------------}
{ This Procedure Defines External Main Tables for TECNE Constructor }
{--------------------------------------------------------------------------------------------------------------}
CONSTRUCTOR TGeometry.Coordinates; export; external 'Geral_Library.DLL';
{--------------------------------------------------------------------------------------------------------------}
{ $R *.RES}
{--------------------------------------------------------------------------------------------------------------}
BEGIN
{ Main part of this module }
{ Definition of main tables properties }
{ Definition of lengths }
SETLENGTH(xyn,2);
SETLENGTH(xyn[0],imax);
SETLENGTH(xyn[1],jmax);
SETLENGTH(xyn[2],2);
TGeometry.Coordinates;
END.
Edisson Maciel
Posts
05/08/2018
Luciano
06/08/2018
Edisson Maciel
Edisson Sávio.
07/08/2018
Felipe Morais
10/08/2018
Edisson Maciel
Edisson Sávio.
Clique aqui para fazer login e interagir na Comunidade :)