calculate averaged Temperature
I use the star-cd version 4.12.033. I investigate a combustion problem with the LES. Unfortunately I have to calculate the averaged temperature with the user subroutine posdat.f, yet I'm not really a fortran90 specialist...
My Problem now is to save an array (T_mean(NCELL)), the size of the array is NCELL...-> I want to calculate the temperature in every cell and for the next time step I must save the temperature of the previous time step.
But if I do this, the following error will appear:
PNP: posdat.f(132): error #6754: An automatic object must
> not appear in a SAVE statement or be declared with the SAVE attribute.
> PNP: real :: Tmean(NCELL)
> PNP: ----------------^
> PNP: compilation aborted for posdat.f (code 1)
> PNP: ***ERROR*** Compilation error in user file "ufile/posdat.f".
> PNP: ==> Please check the compilation error messages.
My declaration is this:
real :: Tmean(NCELL)
save :: Tmean
Have everyone a idea what else can I do. I have also tried to declare an allocation but without success.
Thank you for every help.
u can use the COMMON
COMMON /aaa/ Tmean
once u calculate the Tmean and leave posdat.f, the Tmean will be kept.
i dont know other method, but this method works.
|All times are GMT -4. The time now is 13:43.|