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

TOPIC: total mass tracer source

total mass tracer source 9 years 6 months ago #16918

  • Matta
  • Matta's Avatar
Hallo everybody,

I have to simulate in Telemac-2D emissions of dissolved Nitrogen and Phosphorus from one point source (aquaculture location). The values are total masses (kg) soluble per day (so kgd-1).

I saw this old post: www.opentelemac.org/index.php/kunena/16-...ore-than-100-sources

If I also have no discharge at the source I can try directly to write a fortran file looking at the 'difsou.f' subroutine, as Jean-Michel wrote in the old post, am I right?

Then what should one write in the cas file? Number and name of tracers and also the values at tracers souces or is not necessary anymore? I would try the explicit form for my case at first, would be correct for you?

Thanks in advance.

Best regards
The administrator has disabled public write access.

total mass tracer source 9 years 6 months ago #16921

  • jmhervouet
  • jmhervouet's Avatar
Hello,

There is nothing specific to do as soon as you fill the array of explicit sources.

I advise however to have a MASS-LUMPING ON H set to 1.

With best regards,

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

total mass tracer source 9 years 6 months ago #16983

  • Matta
  • Matta's Avatar
Hello again,

I looked a bit deeper in the difsou.f subroutine... I am totally not an expert in Fortran and for me is hard to understand the part that I should modify. I mean, for example, the subroutine should be filled just regarding the part that I am interesting in, am I right? And then cancel the other parts?

Something like this could be fine?

EXPLICIT SOURCE TERMS
!
IF(NTRAC.GT.0 .AND. NTRAC.LT.2) THEN
DO ITRAC=1,NTRAC
CALL OS('X=0 ',X=TSCEXP%ADR(ITRAC)%P)
CALL OS('X=0 ',X=TEXP%ADR(ITRAC)%P)
TSCE=17.359D0
MASSOU(ITRAC)=17.359D0
ENDDO
ELSE
DO ITRAC=2,NTRAC
CALL OS('X=0 ',X=TSCEXP%ADR(ITRAC)%P)
CALL OS('X=0 ',X=TEXP%ADR(ITRAC)%P)
TSCE = 1.302D0
MASSOU(ITRAC)=1.302D0
ENDDO
ENDIF

I will attach the entire fortran file. Any help or suggestion

File Attachment:

File Name: t2d_difsou_modified.f
File Size: 6 KB

is really welcome. Thanks.

Best regards
Elena
The administrator has disabled public write access.

total mass tracer source 9 years 6 months ago #16984

  • jmhervouet
  • jmhervouet's Avatar
Hello,

This will certainly not work, for various reasons, but the first thing to do is explaining precisely what you want to do. If it is adding a source of pollution at one point as you said, it can probably be done without programming, provided that the point of the source is given a discharge (those point sources are supposed to be pipes releasing water with given concentrations of tracers, the quantity of tracer released at every time step will be = (discharge) * (value at the tracer at source) * (time step). This could be the first thing that you try since there is no programming involved.

Then adding a tracer without discharge will require setting the source term TEXP for the tracer in difsou, but then the question is what source term will give what quantity of tracer and this requires a bit of knowledge on finite elements, as it depends on the mesh size around the point and on the depth. You must at least give us the rate of release of the tracer at the source point.

With best regards,

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

total mass tracer source 9 years 6 months ago #16992

  • Matta
  • Matta's Avatar
Thank you a lot for the reply.
Well, I chose a point of the mesh for the source. The triangular edges around the point have a length of ca. 110 m. The bottom elevation at the point is 295 m a.s.l., prescribed water elevation is 300 m a.s.l., then the water depth there is 5 m.
The data that I have from the 'water quality project partners' are daily emissions of dissolved Nitrogen and Phosphorus, therefore TP = 1.302 kg/d, DN = 17.359 kg/d, emitted from the same point. I have no information about discharge and no correlation with the volume (e.g. kg/m3).
To sum up, I have 2 tracers, 1 point and no discharge.
I attach the steering file that I run at first, without programming (cas1 is previous computation file and cas2 is the file with the tracer). I assumed a discharge at the source of 1 m3/s and my time step is 30 s. Everything works, but of course the values in the results are not coherent to the values I prescribed. Therefore I don't know if it would be better to program it in Fortran, conceptually is pretty easy what I should do, but I have not enough expertise.

Thank you again.

Best regards


File Attachment:

File Name: cas1.txt
File Size: 3 KB


File Attachment:

File Name: cas2.txt
File Size: 4 KB
The administrator has disabled public write access.

total mass tracer source 9 years 6 months ago #16995

  • Matta
  • Matta's Avatar
I forgot to specify something maybe important, the only information that I have about these emissions is that they are total masses soluble per day in water (every day that amount of dissolved substances is soluble in water).

BR
The administrator has disabled public write access.

total mass tracer source 9 years 6 months ago #17011

  • jmhervouet
  • jmhervouet's Avatar
Hello,

Maybe your computation with a discharge is OK, the thing to check is not the concentration (which is immediately depth-averaged at the source, so you will never see the prescribed concentration that you impose) but the quantity released. If this quantity is OK then there is no problem.

With best regards,

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

total mass tracer source 9 years 5 months ago #17075

  • Matta
  • Matta's Avatar
Dear Jean Michel,

the computation worked out fine, the quantity correspond almost exactly with the measured values of aquaculture. I used for the numerics the following commands:

TREATMENT OF NEGATIVE DEPTHS = 2
TYPE OF ADVECTION = 14;5;14
SUPG OPTION = 0;0
DISCRETIZATIONS IN SPACE = 11;11
SOLVER ACCURACY = 1.E-4
SOLVER = 3 PRECONDITIONING = 2
IMPLICITATION FOR DEPTH = 0.55
IMPLICITATION FOR VELOCITY = 0.55
TREATMENT OF THE LINEAR SYSTEM = 1
MASS-LUMPING ON H = 1
CONTINUITY CORRECTION = YES

The last question would be... In the output file I have the quantity created by the source term, which corresponds really well to the mass I imposed. But, what indicates the final quantity? It is the quantity which is spreaded inside the computational domain, isn't it?

Thank you again for the useful help.

Best regards
The administrator has disabled public write access.

total mass tracer source 9 years 5 months ago #17076

  • jmhervouet
  • jmhervouet's Avatar
Hello,

Yes, the final quantity is what is still in the domain at the end of the computation.

Regards,

JMH
The administrator has disabled public write access.

total mass tracer source 9 years 5 months ago #17335

  • Matta
  • Matta's Avatar
Hello,

I have a new question about this case simulated.

To check how big was the influence of tracer diffusion in my case (I used DIFFUSION OF TRACERS = 1.E-4), since I do not have realistic information about diffusion in the area investigated, I tried to run one case without diffusion (DIFFUSION OF TRACERS: NO; COEFFICIENT FOR DIFFUSION OF TRACERS: 0.).
The results are completely the same and I find it really strange.

Do you know where I did wrong?

Thank you in advance.

With my best regards
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.