Delphi 2.0 e Listagem do Código...

04/05/2018

1

Bom dia pessoal, segue uma listagem maior do meu código. Abaixo está a listagem do programa:

PROGRAM Reentry_Flow_2D;

USES

Geral,Five_Species_TECNE,Numerical_Methods;

PROCEDURE Reading_data(VAR imax,jmax:INTEGER;VAR a_char:DOUBLE;VAR xyn:TYPE13;VAR General:General_data;VAR Physical_properties:Physical_data;VAR Algorithm:Scheme_data;VAR Computational:Computational_data;VAR Air:SPEC3); far; external 'Geral.DLL';
PROCEDURE Volumes(imax,jmax:INTEGER;xyn:TYPE13;VAR Vol:TYPE14); far; external 'Geral.DLL';
PROCEDURE Areas_and_Normal_Vectors(imax,jmax:INTEGER;xyn:TYPE13;VAR S:TYPE5;VAR Normal:TYPE4); far; external 'Geral.DLL';
PROCEDURE Characteristic_Length(imax,jmax:INTEGER;xyn:TYPE13;VAR ds:TYPE3); far; external 'Geral.DLL';
PROCEDURE Gas_Properties_5_Species_TECNE(Air:SPEC3;VAR a_char,Tref:DOUBLE;VAR Properties:SPEC1); far; external 'Five_Species_TECNE.DLL';
PROCEDURE Stoichiometric_Coefficients_5_Species_TECNE(VAR nis:SPEC2); far; external 'Five_Species_TECNE.DLL';
PROCEDURE Restart_and_Parameters(imax,jmax:INTEGER;a_char:DOUBLE;General:General_data;Physical_properties:Physical_data;Algorithm:Scheme_data;VAR N_aux:LONGINT;VAR Q:TYPE1;VAR Air:SPEC3;VAR Computational:Computational_data); far; external 'Geral.DLL';
PROCEDURE Initial_Condition_5_Species_TECNE(imax,jmax:INTEGER;a_char,Tref:DOUBLE;Properties:SPEC1;Physical_properties:Physical_data;General:General_data;VAR Q:TYPE1;VAR Air:SPEC3); far; external 'Five_Species_TECNE.DLL';
PROCEDURE Initial_Conditions_to_Coakley_1983(VAR Q:TYPE1); far; external 'Geral.DLL';
PROCEDURE Initial_Conditions_to_Wilcox_1988(VAR Q:TYPE1); far; external 'Geral.DLL';
PROCEDURE Magnetic_Initial_Conditions(imax,jmax:INTEGER;Physical_properties:Physical_data;General:General_data;VAR Q:TYPE1); far; external 'Geral.DLL';
PROCEDURE Field_Temperatures_5_Species_TECNE(imax,jmax:INTEGER;a_char,Tref:DOUBLE;Computational:Computational_data;Physical_properties:Physical_data;General:General_data;Properties:SPEC1;Air:SPEC3;Q:TYPE1;VAR Temperatures:TYPE13); far; external 'Five_Species_TECNE.DLL';
PROCEDURE PROCEDURE Ratio_of_Specific_Heats(imax,jmax:INTEGER;a_char:DOUBLE;Q:TYPE1;Temperatures:TYPE13;Properties:SPEC1;VAR g_mixt:TYPE14); far; external 'Geral.DLL';
PROCEDURE Time_Step(imax,jmax:INTEGER;Q:TYPE1;ds:TYPE3;Temperatures:TYPE13;g_mixt:TYPE14;General:General_data;Computational:Computational_data;Properties:SPEC1;VAR a,dt:TYPE3); far; external 'Geral.DLL';
PROCEDURE Initial_Conditions_to_Fluctuations(VAR Q:TYPE1); far; external 'Geral.DLL';
PROCEDURE Van_Leer_1982(imax,jmax:INTEGER;a_char,Tref:DOUBLE;Computational:Computational_data;Physical_properties:Physical_data;General:General_data;Properties:SPEC1;Air:SPEC3;ds:TYPE3;VAR dt:TYPE3;VAR Q:TYPE1;VAR a:TYPE3;VAR Temperatures:TYPE13;VAR g_mixt:TYPE14;VAR Residual:TYPE2); far; external 'Numerical_Methods.DLL';
PROCEDURE Maximum_Residual(Residual:TYPE2;VAR ivol,jvol,ieq,numb_of_red:INTEGER; VAR Max_Res:TYPE15); far; external 'Geral.DLL';
PROCEDURE Saving_Solution_and_Others; far; external 'Geral.DLL';
PROCEDURE Tecplot; far; external 'Geral.DLL';
PROCEDURE Status; far; external 'Geral.DLL';
FUNCTION Stop_Option:BOOLEAN; far; external 'Geral.DLL';
PROCEDURE Liou_and_Steffen_Jr_1993(imax,jmax:INTEGER;a_char,Tref:DOUBLE;Computational:Computational_data;Physical_properties:Physical_data;General:General_data;Properties:SPEC1;Air:SPEC3;ds:TYPE3;VAR dt:TYPE3;VAR Q:TYPE1;VAR a:TYPE3;VAR Temperatures:TYPE13;VAR g_mixt:TYPE14;VAR Residual:TYPE2); far; external 'Numerical_Methods.DLL';
PROCEDURE Maciel_2015(imax,jmax:INTEGER;a_char,Tref:DOUBLE;Computational:Computational_data;Physical_properties:Physical_data;General:General_data;Properties:SPEC1;Air:SPEC3;ds:TYPE3;VAR dt:TYPE3;VAR Q:TYPE1;VAR a:TYPE3;VAR Temperatures:TYPE13;VAR g_mixt:TYPE14;VAR Residual:TYPE2); far; external 'Numerical_Methods.DLL';

BEGIN

{ Main part of this program }

ASSIGNFILE(f1,'Teste.DAT');
REWRITE(f1);

{ Reading the main variables to start the code }

Reading_data(imax,jmax,a_char,xyn,General,Physical_properties,Algorithm,Computational,Air);

{ Calculation of the cell volumes }

Volumes(imax,jmax,xyn,Vol);

{ Calculation of surface areas and normal vectors }

Areas_and_Normal_Vectors(imax,jmax,xyn,S,Normal);

{ Calculation of the reference length }

Characteristic_Length(imax,jmax,xyn,ds);

{ Define the gas properties and the stoichiometric coefficients }

IF (General.Formulation = TECNE) THEN

BEGIN

Gas_Properties_5_Species_TECNE(Air,a_char,Tref,Properties);
Stoichiometric_Coefficients_5_Species_TECNE(nis);

END;

{ Initial condition of the code }

IF (General.Initial = Restart) THEN

BEGIN

{ Start from a condition of restart }

Restart_and_Parameters(imax,jmax,a_char,General,Physical_properties,Algorithm,N_aux,Q,Air,Computational);
index := Computational.Iter+General.Iterations_to_Saving;

END

ELSE

IF (General.Formulation = TECNE) THEN

BEGIN

{ Start from an initial condition }

Initial_Condition_5_Species_TECNE(imax,jmax,a_char,Tref,Properties,Physical_properties,General,Q,Air);

{ Test to employ turbulence model }

IF (General.Flow = Turbulent_Flow) THEN

CASE General.Turbulence OF

Coakley_1983 : BEGIN

{ Turbulence model of Coakley (1983) }

Initial_Conditions_to_Coakley_1983(Q);

END;

Others : BEGIN

{ For other models, apply the Wilcox (1988) initial condition }

Initial_Conditions_to_Wilcox_1988(Q);

END;

END;

{ General data }

Computational.Iter := 0;

index := General.Iterations_to_Saving;

END;

{ Initial condition to the Maxwell equations }

IF (General.Magnetic = Gaitonde_1999) THEN

Magnetic_Initial_Conditions(imax,jmax,Physical_properties,General,Q);

{ Temperature in the field }

Field_Temperatures_5_Species_TECNE(imax,jmax,a_char,Tref,Computational,Physical_properties,General,Properties,Air,Q,Temperatures);

E na UNIT Five_Species_TECNE:

PROCEDURE Field_Temperatures_5_Species_TECNE(imax,jmax:INTEGER;a_char,Tref:DOUBLE;Computational:Computational_data;Physical_properties:Physical_data;General:General_data;Properties:SPEC1;Air:SPEC3;Q:TYPE1;VAR Temperatures:TYPE13);

TYPE

TYPE20 = ARRAY[1..14] OF DOUBLE;
Primitive_Variables = ^TYPE20;

VAR

f1 : TEXTFILE;
i,j : INTEGER;
Primitive : Primitive_Variables;
Mi_Mag,Cv_mixt,dhf_mixt : ^DOUBLE;

{ Volume temperatures }

FOR i := 1 TO (imax-1) DO

FOR j := 1 TO (jmax-1) DO

BEGIN

{ Volume temperatures at the first iteration determined by the initial condition }

IF (Computational.Iter = 0) THEN

{ Nondimensionalized initial temperature of each volume }

Temperatures[i,j,1] := Physical_properties.Temperature/a_char+Tref

É isso gente, vocês podem me ajudar? O Natanael falou em debugar o código. Como eu faço o debug no Delphi 2.0? Eu pensei que compilar fosse a mesma coisa do debug. Se é, não aparece nenhum erro de compilação. O erro ocorre na execução do código. Fico no aguardo de sua ajuda. Obrigado, Edisson Sávio.
Responder
×
+1 DevUP
Acesso diário, +1 DevUP
Parabéns, você está investindo na sua carreira