CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Phoenics (https://www.cfd-online.com/Forums/phoenics/)
-   -   HELP I ALWAYS GET 1E-10!!! (https://www.cfd-online.com/Forums/phoenics/51732-help-i-always-get-1e-10-a.html)

STK February 11, 2004 15:02

HELP I ALWAYS GET 1E-10!!!
 
I WRITE A SIMPLE CODE IN GROUND, THAT COMPUTES A VARIABLE, FOR EXAMPLE 'RETS', AS A FUNCTION OF FINAL PRESSURE THAT IS CERTAINLY CHECKED-RIGHT. I DO THE MODIFICATIONS IN Q1 (STORE()) AND I ALWAYS TAKE IN RESULT RETS=1E-10

I HAVE DECLARED EVERYTHING IN GROUND,IS THERE ANY MISTAKE IN Q1?WHAT I HAVE TO WRITE IN Q1 EXCEPT STORE?

Rami February 12, 2004 05:28

Re: HELP I ALWAYS GET 1E-10!!!
 
You are right, store(RETS) is all you need to add to your q1 (USRGRD=T should also be set in group 19, but this is default).

The problem is probably in your ground coding. The values of 1.e-10 are the initial values, indicating that your code was ineffective. Several reasons are possible:

o You may have intervened in an inappropriate section of ground (I guess group 19, section 8 is the appropriate choice in your case).

o You may have accessed the available variables (especially those stored in the F-array) improperly.

o You may have a bug in your code.

I guess you may now fix it by yourself. Otherwise, please post your code, and I'll try to help further.

Rami

STK February 12, 2004 19:48

Re: HELP I ALWAYS GET 1E-10!!!
 
THANKS RAMI FOR EVERYTHING!

THE CODE IS THE FOLLOWING ENTERED IN SECTION 6 OF GROUP19:

L0P1=L0F(P1) L0RETS=L0F(RETS) DO IX=1,NX DO IY=1,NY ICELL=IY+NY*(IX-1) F(L0RETS+ICELL)=F(L0P1+ICELL) ENDDO ENDDO

AN ALTERNATIVE CODE IS:

CALL FN2(RETS,P1,0.0,1.0) ***SET RETS=P1 *****

PLEASE COMPILE GROUND BUILD EARTH AND TELL ME if i MAY HAVE TO ADD SPECIAL PRINT OUT oOR SOMETHING ELSE.

BEST REGARDS

Olof Liungman February 14, 2004 10:08

Re: HELP I ALWAYS GET 1E-10!!!
 
Hi,

this may seem silly but are you sure you are running the correct earexe? I run Phoenics the old-fashioned way using the command line script such as "runear" and I've found that this actually runs the default earexe in phoenics/d_earth. To start the earexe I've compiled from my own ground.f in my run directory I simply give the command "earexe" (or "./earexe" in bash under Linux Redhat).

Olof

STK February 14, 2004 11:57

Re: HELP I ALWAYS GET 1E-10!!!
 
i run phoenics and in unix systems with the old fashioned way and in windows xp and i get the same results. did you run the code ?run it in every q1 you have after storing the variable and inform me if you get right results.

thanks

Rami February 15, 2004 02:41

Re: HELP I ALWAYS GET 1E-10!!!
 
I think you should merely replace

L0RETS=L0F(RETS)

with

L0RETS=L0F( lbname('RETS') )

STK February 16, 2004 05:58

Re: HELP I ALWAYS GET 1E-10!!!
 
thanks rami but the problem insists.the only solution is to run it in your computer ans see the results.so then i'll check for possible bugs.i am waiting for your reults (you can write the code and run it in any q1 you have created because it's not affect your q1).

thanks in advance

regards

Rami February 18, 2004 04:09

Re: HELP I ALWAYS GET 1E-10!!!
 
STK,

I tried with the coding below in group 19, section 8. You may note there is some modifications to your code, and it prints the correct values within ground. The values in phi are also correct (identical to those of P1). However - as you wrote - the RETS values in result are still 1.e-10. I cannot explain this, and suggest you ask CHAM support.

Sorry, that's the best I can do,

Rami

__________________________________________________ _____

do iz = 1,Nz

L0P1 = L0F(P1)

L0RETS = L0F( lbname('RETS') )

write (6,*) ' --- iz, l0p1, l0rets = ', iz, l0p1, l0rets -DBG-

do ix = 1,Nx

do iy = 1,Ny

icell = iy+(ix-1)*Ny

F(L0RETS+ICELL)=F(L0P1+ICELL)

write (6,*) ' ix, iy, icell = ', ix, iy, icell -DBG-

write (6,*) ' F(L0P1 +ICELL) = ', F(L0P1 +ICELL) -DBG-

write (6,*) ' F(L0RETS+ICELL) = ', F(L0RETS+ICELL) -DBG-

enddo ! iy

enddo ! ix

enddo ! iz

__________________________________________________ _____


STK February 18, 2004 13:04

Re: HELP I ALWAYS GET 1E-10!!!
 
thank you RAMI FOR EVERYTHING

I FOUND THE SOLUTION IF YOU ARE STILL INTERESTED I CAN SEND YOU THE CODE SO THE RESULTS CAN BE SEEN IN THE RESULTS.

Rami February 19, 2004 02:17

Re: HELP I ALWAYS GET 1E-10!!!
 
> I FOUND THE SOLUTION IF YOU ARE STILL INTERESTED I CAN SEND YOU THE CODE SO THE RESULTS CAN BE SEEN IN THE RESULTS.

Please do, Thanks, Rami

STK February 19, 2004 05:12

Re: HELP I ALWAYS GET 1E-10!!!
 
EXAMPLE:I WANT GSTK=P1 (AFTER CONVERGENCE)

Q1 SETTINGS: NAME(150)=GSTK STORE(GSTK)

AND IN PRINT-OUT NXPRIN=2 NYPRIN=2

****END OF Q1!

GROUND SETTINGS 4TH PARAGRAGH IN STARTING AREA: PARAMETER (NYDIM=100,NXDIM=100) DIMENSION GP1(NYDIM,NXDIM) DIMENSION GSTK(NYDIM,NXDIM)

19 GROUP 3 SECTION START OF IZSLAB: IF (ISWEEP.EQ.LSWEEP)THEN IF (STORE(150)) THEN CALL GETYX(P1,GP1,NYDIM,NXDIM) DO 765 IX=1,NX DO 765 IY=1,NY GSTK(IY,IX)=GP1(IY,IX) 765 CONTINUE CALL SETYX(150,GSTK,NYDIM,NXDIM) END IF END IF

****END OF GROUND!

CAREFUL DON'T RUNEAR BUT EAREXE (PRIVATE)!!!!!!!



All times are GMT -4. The time now is 01:46.