Welcome, Guest
Username: Password: Remember me

TOPIC: Subroutine Source Trac, TELEMAC-3D

Subroutine Source Trac, TELEMAC-3D 7 years 1 day ago #28196

  • louiseselmeus
  • louiseselmeus's Avatar
Hi,

My name is Louise and at the moment I am doing my master thesis at Lund University where I am studying how degradation of bacteria can be modelled with help of TELEMAC. I am new to Telemac and really enjoy working with it.

I have developed a script for decay of E.coli, see attached. The code is checked in python and their it works as we want. However, when coupled with TELEMAC something goes wrong. After a duration of 18 000 s I get concentrations at 68 for the bottom layer and 5 at the surface layer. However, want to have concentrations at 81,7749 at the bottom layer and 3,52 at the surface layer. I have made a private variable of the depth and it seems to be correct.

I have attached the files and wonder if someone possible knows what could be wrong. The equation I want to simulate is also attached. Maybe have I misunderstood something in TELEMAC-3D?

I would be greatful for help.

Kind Regards
Louise
The administrator has disabled public write access.

Subroutine Source Trac, TELEMAC-3D 7 years 1 day ago #28198

Hi Louise,
based on the parameters that you use the concs at 0m and 10m are as you stated after 18,000sec, but your model is a 2 layer depth model of 5m layer thickness so depths used in the model are not at 0 and 10 perhaps that is the reason for the difference?

Also your depth calculation does not appear to be correct for you first layer you should have had a depth of 2.5 (average for that layer) and 7.5 for the lower layer?


regards
Tony C
The administrator has disabled public write access.
The following user(s) said Thank You: louiseselmeus

Subroutine Source Trac, TELEMAC-3D 7 years 1 day ago #28199

  • louiseselmeus
  • louiseselmeus's Avatar
Thank you Tony for your quick reply!

However, I’m not sure I understand what you mean.

Firstly, are you sure that my two layers should be located at 0 and 5 meters depth? Because when I open the result file the layers are located at 0 and -10 m elevation. This seems to contradict your statatement? Also the calculated depths by the fortran-file are 0 and 10 m.

Secondly, I thought that TELEMAC calculated everything at the nodes? Are you certain that calculations are made inbetween layers as you state?

I’m more thinking my problem is related to FORTRAN. That I for some reason don’t get enough values on my variables when calculating K.

Or maybe I have misunderstood some parts of TELEMAC?

Best regards,
Louise
The administrator has disabled public write access.

Subroutine Source Trac, TELEMAC-3D 7 years 1 day ago #28200

also is your k not already calculated from your equation (units hrs-1, I am not sure ) you include DLOG(1-K/3600.) not sure why?

and therefore would not the following code apply

dont include explicit term
! S0TA%ADR(3)%P%R(I3D)=
if you want you can include the explicit term
include implicit Term
S1TA%ADR(3)%P%R(I3D) = K/3600.0
END DO
END Do
regards
Tony C
The administrator has disabled public write access.
The following user(s) said Thank You: louiseselmeus

Subroutine Source Trac, TELEMAC-3D 7 years 1 day ago #28204

here is your fortran file modified as per previous post
and you should get c. 81.65 and 3.56 at 5hrs in the top and bottom

regards
Tony C

File Attachment:

File Name: Ecoli_decay_171121.f
File Size: 7 KB
The administrator has disabled public write access.
The following user(s) said Thank You: louiseselmeus

Subroutine Source Trac, TELEMAC-3D 6 years 11 months ago #28330

  • louiseselmeus
  • louiseselmeus's Avatar
Hi,
Thank you so much!

I have two questions.

1) If I run the model with timestep 1, 10 and 100 I get a small difference in the concentrations depending on which timestep I have selected. What is the reason for this?

2) Why is only the implicit term included and not the explicit, why does it give different results and how do one now that we want to use the implicit term for this case?

Thank you so much for your help!

Kind Regards
Louise
The administrator has disabled public write access.

Subroutine Source Trac, TELEMAC-3D 7 years 1 day ago #28201

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

2 layers mean the layer 1 is the bottom and the layer 2 is the free surface.
This is what you see in your result file (-10 and 0).
I didn't investigate your case but did you check the values of Temperature and Salinity which are computed by Telemac and used by your formulae?
Maybe the difference comes from those values...

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

Subroutine Source Trac, TELEMAC-3D 7 years 1 day ago #28205

you are correct about the depths

I think the problem is the inclusion of the explicit term for your Tracer in this subroutine

I recall these are inherently dealt with elsewhere and only the implicit term needs to be included for here
The administrator has disabled public write access.
The following user(s) said Thank You: louiseselmeus

Subroutine Source Trac, TELEMAC-3D 7 years 5 hours ago #28218

  • louiseselmeus
  • louiseselmeus's Avatar
Hi,
Thank you so much!

I have two questions.

1) If I run the model with timestep 1, 10 and 100 I get a small difference in the concentrations depending on which timestep I have selected. What is the reason for this?

2) Why is only the implicit term included and not the explicit, why does it give different results and how do one now that we want to use the implicit term for this case?

Thank you so much for your help!

Kind Regards
Louise
The administrator has disabled public write access.
Moderators: pham

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