Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: more than 100 sources

more than 100 sources 9 years 8 months ago #16043

  • zqzuoan
  • zqzuoan's Avatar
Thank you very much. I have tried to modify the difsou.f
! EXPLICIT SOURCE TERMS
!
NFO1=T2D_FILES(T2DFO1)%LU
DO I=1,HPROP%DIM1
READ(NFO1,*) c(I)
enddo

DO ITRAC=1,NTRAC
CALL OS('X=0 ',X=TSCEXP%ADR(ITRAC)%P)
CALL OS('X=0 ',X=TEXP%ADR(ITRAC)%P)
MASSOU(ITRAC) = 0.D0
ENDDO

DO I=1,HPROP%DIM1
TEXP%ADR(1)%P%R(I)=c(I)
ENDDO

Am I wrong? It shows fortran runtime error: out of file
The administrator has disabled public write access.

more than 100 sources 9 years 8 months ago #16048

  • jmhervouet
  • jmhervouet's Avatar
Hello,

Difsou is called at every time step, this is probably the reason. You should also declare C with the right dimension equal to the number of points.

So, to read the file once :
DOUBLE PRECISION C(larger or equal to your number of points)
SAVE C
DATA ALREADY/.FALSE./
NFO1=T2D_FILES(T2DFO1)%LU
IF(.NOT.ALREADY) THEN
DO I=1,HPROP%DIM1
READ(NFO1,*) c(I)
enddo
ALREADY=.TRUE.
ENDIF

then the rest should work

With best regards,

Jean-Michel Hervouet
The administrator has disabled public write access.

more than 100 sources 9 years 8 months ago #16076

  • zqzuoan
  • zqzuoan's Avatar
thank you very much. Actually I have two tracer, and every time step, I need to add one tracer's concentration to the other tracer's right hand of the tracer equation. Then I modify the difsou.f as follow:

!EXPLICIT SOURCE TERMS
!
DO ITRAC=1,NTRAC
CALL OS('X=0 ',X=TSCEXP%ADR(ITRAC)%P)
CALL OS('X=0 ',X=TEXP%ADR(ITRAC)%P)
MASSOU(ITRAC) = 0.D0
ENDDO

DO I=1,HPROP%DIM1
!write(*,*) T%ADR(2)%P%R(I)
TEXP%ADR(1)%P%R(I)=T%ADR(2)%P%R(I)/86400
enddo

Is it right?
The administrator has disabled public write access.

more than 100 sources 9 years 8 months ago #16080

  • jmhervouet
  • jmhervouet's Avatar
Hello,

Yes the syntax is correct. An alternative of:

DO I=1,HPROP%DIM1
!write(*,*) T%ADR(2)%P%R(I)
TEXP%ADR(1)%P%R(I)=T%ADR(2)%P%R(I)/86400
enddo

would be, using our all purpose subroutine OS :

CALL OS('X=CY ',X=TEXP%ADR(1)%P,Y=T%ADR(2)%P,C=1.D0/86400.D0)

With best regards,

Jean-Michel Hervouet
The administrator has disabled public write access.

more than 100 sources 9 years 8 months ago #16085

  • zqzuoan
  • zqzuoan's Avatar
Thank you very much. :cheer:
The administrator has disabled public write access.

more than 100 sources 5 years 9 months ago #32745

  • hydromei
  • hydromei's Avatar
Hello, I also need to put more than 100 sources in my domain, and I try to modified the code as you have done as follows:

1) Changing value of MAXKEY and MAXSCE as 2000 in "declarations_telemac2d.f"

2)Adapt the function DEBSCE in order to deal with more than 99, and modified it in the "debsce.f" as follows:

IF(OK(I).AND.T2D_FILES(T2DVEF)%NAME(1:1).NE.' ') THEN
!
! FCT WILL BE Q(1), Q(2), ETC, Q(99), DEPENDING ON I
FCT='Q( '
IF(I.LT.10) THEN
WRITE(FCT(3:3),FMT='(I1)') I
FCT(4:4)=')'
ELSEIF(I.LT.100) THEN
WRITE(FCT(3:4),FMT='(I2)') I
FCT(5:5)=')'
ELSEIF(I.LT.2000) THEN
WRITE(FCT(3:5),FMT='(I2)') I
FCT(6:6)=')'
ELSE
WRITE(LU,*) 'DEBSCE NOT PROGRAMMED FOR MORE THAN 1999 SOURCES'
CALL PLANTE(1)
STOP
ENDIF
CALL READ_FIC_SOURCES(DEBSCE1,FCT,AT-DT,T2D_FILES(T2DVEF)%LU,
& ENTET,OK(I))
CALL READ_FIC_SOURCES(DEBSCE2,FCT,AT ,T2D_FILES(T2DVEF)%LU,
& ENTET,OK(I))
DEBSCE=(DEBSCE1+DEBSCE2)*0.5D0
!
ENDIF


however,it doesn,t work, could you please share you successful experiences? Thank you very much!
The administrator has disabled public write access.

more than 100 sources 5 years 9 months ago #32746

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Hi
As you change declarations_telemac2d.f, you need to change it in the source of the code, not in your own fortran file and then make a full clean compilation

Regards
Christophe
The administrator has disabled public write access.

more than 100 sources 5 years 9 months ago #32880

  • hydromei
  • hydromei's Avatar
Could you please give me a more clearer guidance about how to put more than 100 sources in the telemac2d, thank you very much!
The administrator has disabled public write access.

more than 100 sources 5 years 9 months ago #32881

  • hydromei
  • hydromei's Avatar
Hello, I need to put more than 100 sources in my domain, could you please give me a complete guidance about how to realize it? Thank you very much!
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: pham

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.