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

TOPIC: more than 100 sources

more than 100 sources 9 years 10 months ago #15395

  • o.gourgue
  • o.gourgue's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 155
  • Thank you received: 11
I need to put more than 100 sources in my domain.

I thought that changing the value of the variable MAXSCE in declarations_telemac2d.f would be enough, but I got the following error:

 *********************************************
 ADRESS GREATER THAN NMAX =          400
 TOO MANY VALUES OF TYPE :            2  DECLARED.
 STOP OF DAMOCLES AT KEY-WORD NUMBER:           37
 *********************************************

I think the reason is the definition of ABSCISSAE OF SOURCES and ORDINATES OF SOURCES that is too long in the CAS file.

I guess it could be solved by changing the value of the variable NMAX (defined as "TAILLE MAXIMALE AUTORISEE POUR LES TABLEAUX" in the comments of several source files), but I don't know where...

Could someone help me? By telling me where to change the value of NMAX, or by giving me an alternative solution to my problem.

FYI, I attached two CAS files: the first one (test_009) with 12 sources is working, the second one (test_010) with 121 sources is not. At the end, I will need several thousands of sources.
Attachments:
The administrator has disabled public write access.

more than 100 sources 9 years 10 months ago #15396

  • riadh
  • riadh's Avatar
Hello

It seems that the way of writing the coodinates in one line causes the problem. Did you try to write the coordinates like: one coordinate per line, for instance
ABSCISSAE OF SOURCES: 44442.000000;
44379.335938;
44316.667969;
...

It should work like this.

with kind regards
Riadh
The administrator has disabled public write access.

more than 100 sources 9 years 10 months ago #15398

  • o.gourgue
  • o.gourgue's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 155
  • Thank you received: 11
That did not solve the problem, but thank you for trying to help.
The administrator has disabled public write access.

more than 100 sources 9 years 10 months ago #15397

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Hi Olivier

In fact, NMAX is define by the variable MAXKEY in declarations_telemac2d.f.

But if you plan to manage a large number of sources, I would suggest you to try another option by using PRIVE and manually read the parameters and then add the values in PROSOU

Hope this helps
Christophe
The administrator has disabled public write access.
The following user(s) said Thank You: o.gourgue

more than 100 sources 9 years 10 months ago #15399

  • o.gourgue
  • o.gourgue's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 155
  • Thank you received: 11
Thank you for your answer. Changing value of MAXKEY helped.

However, I also had to adapt the function DEBSCE in order to deal with more than 99 sources:

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.1000) THEN
          WRITE(FCT(3:5),FMT='(I2)') I
          FCT(6:6)=')'
        ELSE
          WRITE(LU,*) 'DEBSCE NOT PROGRAMMED FOR MORE THAN 999 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

Now it's working.

Thank you both for your quick help!
The administrator has disabled public write access.

more than 100 sources 9 years 8 months ago #16023

  • zqzuoan
  • zqzuoan's Avatar
hi, I have a similar problem about source with yours.
I want to solve a advection-diffusion equation of tracer, and there is a source on every point of the domain, whese sources are varyingwith time and space. Do you know which program I should use?
The administrator has disabled public write access.

more than 100 sources 9 years 8 months ago #16028

  • o.gourgue
  • o.gourgue's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 155
  • Thank you received: 11
What do you mean by which program? I think you should be able to implement something in TELEMAC.
The administrator has disabled public write access.

more than 100 sources 9 years 8 months ago #16030

  • zqzuoan
  • zqzuoan's Avatar
Well, I mean fortran file. There are 59994 sources in my model, I think I cannot add the sources' coordinates in the cas file, so I wonder which fortran file I can use to complish it.
The tracer conservation equation is ∂T/∂t+u ⃗∙∇ ⃗(T)=S_T+1/h div(hν_T ∇ ⃗T),if S_T=1, how can I reflect this term?
The administrator has disabled public write access.

more than 100 sources 9 years 8 months ago #16033

  • o.gourgue
  • o.gourgue's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 155
  • Thank you received: 11
In my case, I just used sources in the mass conservation equation, and I added the coordinates of the sources directly in the CAS file (using a script).
The administrator has disabled public write access.

more than 100 sources 9 years 8 months ago #16035

  • jmhervouet
  • jmhervouet's Avatar
Hello,

This was already explained in other posts but I cannot find them, so I do it again rapidly:

There is a misleading terminology. Point sources or sinks are only a few points in a mesh where you have also a discharge (like a pipe arriving on the bottom).

If you have a source of tracer per point in the mesh we are talking about sources in the tracer equation, which is a term in the right-hand side of equation, dealing with a creation or destruction of tracer for some reason. Then you can just implement this by taking subroutine difsou.f (library telemac-2D) in your Fortran file and giving the value of the source. You have an example which is commented out by ! treating the case of a radioactive decay, with source terms which are chosen to be implicit. Numerically speaking it is better to have creation explicit and destruction implicit.

With best regards,

Jean-Michel Hervouet
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.