Welcome, Guest
Username: Password: Remember me

TOPIC: How to add a new tracer in O2 module?

How to add a new tracer in O2 module? 4 years 2 months ago #36741

  • ngocanh
  • ngocanh's Avatar
Hello everybody;
I has been learning how to simulate water quality (oxygen O2) in reservoir (using Telemac3d coupling with WAQTEL). In O2 module, there are three tracers: O2, L, NH4; but I want to add a new tracer (ex: tracer4 in Organic load); Which Subrountine i need to modify to do that?
The administrator has disabled public write access.

How to add a new tracer in O2 module? 4 years 2 months ago #36743

  • pham
  • pham's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1559
  • Thank you received: 602
Hello Ngoc Anh,

CALCS3D_O2 subroutine is the one you are looking for. If you have to change the number of arguments of this subroutine, you will also need to change SOURCE_WAQ subroutine.

Both subroutines are located in $HOMETEL/sources/waqtel directory.

Hope this helps,

Chi-Tuan
The administrator has disabled public write access.
The following user(s) said Thank You: ngocanh

How to add a new tracer in O2 module? 4 years 2 months ago #36746

  • ngocanh
  • ngocanh's Avatar
Thank you for your helps.
Can you show me sample code?
The administrator has disabled public write access.

How to add a new tracer in O2 module? 4 years 2 months ago #36764

  • ngocanh
  • ngocanh's Avatar
Hi Chi-Tuan;
I have tried to add one tracer according to your suggestions.
Firstly, I modify subroutine NAMETRAC_WAQTEL to add trac1 in O2 module;
Secondly, I modify subroutine SOURCE_WAQ, add IMP%ADR(IND_Tr1)%P%TYPR='Q' in O2 module;
Finally, I modify subroutine CALCS3D_O2, add
- CALL OS('X=X+CY ',X=TEXP%ADR(IND_O2)%P,Y=TN%ADR(IND_Tr1)%P,&C=-CONV_K44)
- CALL OS('X=X+C ',X=TIMP%ADR(IND_Tr1)%P,C=CONV_K44)

The results show one more tracer but nothing seems to have change with new tracer.

Can you help me to solve the problem?
Attachments:
The administrator has disabled public write access.

How to add a new tracer in O2 module? 4 years 2 months ago #36765

  • pham
  • pham's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1559
  • Thank you received: 602
Hello Ngoc Anh,

I suggest you to do exactly what is done for one of the O2 variable (e.g. O2, OL or NH4) in the sources/waqtel directory, in particular in DECLARATIONS_WAQTEL module. For example, IND_O2 is known by every subroutine using USE DECLARATIONS_WAQTEL ONLY... IND_O2

In the standard release of TELEMAC, the number of tracers is hard coded in this DECLARATIONS_WAQTEL module, = 3, see:

      INTEGER, PARAMETER :: NWAQ_OXYGN = 3
      INTEGER RANK_OXYGN(NWAQ_OXYGN)

3 should be replaced by 4 in your case.

Hope this helps,

Chi-Tuan
The administrator has disabled public write access.
The following user(s) said Thank You: ngocanh

How to add a new tracer in O2 module? 4 years 2 months ago #36768

  • ngocanh
  • ngocanh's Avatar
Thank you for your help.
I follow your suggestions, in DECLARATIONS_WAQTEL module, i replace INTEGER, PARAMETER :: NWAQ_OXYGN = 4; However, it has an Error like that

Error:
Symbol 'ind_tr1' referenced at (1) not found in module 'declarations_waqtel'
calcs3d_o2.f:162.63:
CALL OS('X=X+CY ',X=TEXP%ADR(IND_O2)%P,Y=TN%ADR(IND_Tr1)%P,1
Error: Symbol 'ind_tr1' at (1) has no IMPLICIT type

Should I compile Telemac program?
The administrator has disabled public write access.

How to add a new tracer in O2 module? 4 years 2 months ago #36772

  • pham
  • pham's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1559
  • Thank you received: 602
Hello,

I think you have not declared IND_TR1 in DECLARATIONS_WAQTEL as it is done for IND_O2. I assume that in CALCS3D_O2, you wrote something like:
USE DECLARATIONS_WAQTEL, ONLY :: IND_TR1 with other variables like IND_O2 etc, did not you?
The error message
Symbol 'ind_tr1' referenced at (1) not found in module 'declarations_waqtel'
suggests this error.

Hope this helps,

Chi-Tuan
The administrator has disabled public write access.
The following user(s) said Thank You: ngocanh

How to add a new tracer in O2 module? 3 years 10 months ago #37492

  • kero_feuz
  • kero_feuz's Avatar
Dear ngocanh,

i follow your post, simply I need the same purpose.
Do you could solve it after following with Chi-Tuan comments?
If yes please share with me the case file and the FORTRAN File "calcs3d_o2.f"
I need to represent O2 also

Thanks in advanced
K.
The administrator has disabled public write access.

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