Welcome, Guest
Username: Password: Remember me

TOPIC: Variable boundary conditions type

Variable boundary conditions type 12 years 10 months ago #3362

  • m.mahgoob
  • m.mahgoob's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 106
As I know one can change the boundary conditions type during the calculations by programming the subroutine called propin_telemac2d.f, however I never dealt with it, can some one help me in that.

I want change one of my boundary types to be based on the water level, if the water level increases that means inflow so I want to use imposed salinity, and if the water level decreases a free salinity will be used, that means

If SL>0.37, then boundary conditions type will be 5,4,4,5
if SL<0.37, then boundary conditions type will be 5,4,4,4
The administrator has disabled public write access.

Re: Variable boundary conditions type 12 years 10 months ago #3363

  • jmhervouet
  • jmhervouet's Avatar
Hello,

You should better do this in subroutine diffin which is in library BIEF, in the first loop that checks outgoing and incoming velocities. At the end of this loop you can add :

IF(here a test to select only the boundary where you want to do that) THEN
IF(H%R(NBOR(K))+ZF%R(NBOR(K)).GT.0.37D0) THEN
CLT(K)=KENT
ELSE
CLT(K)=KSORT
ENDIF
ENDIF

As H and ZF are not in the arguments, you must add :

USE DECLARATIONS_TELEMAC2D, ONLY : ZF

after the line USE BIEF


HOWEVER, I wonder if the first test of subroutine diffin, looking at uscaln, is not really what you want, so that there is actually nothing to do. You have to declare all your boundary as 5,4,4,5, and it will be relaxed to 5,4,4,4 when the velocity is outgoing, and that is
probably exactly what you want ?

With best regards,

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

Re: Variable boundary conditions type 12 years 10 months ago #3367

  • m.mahgoob
  • m.mahgoob's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 106
Actually, I tried to use the boundary conditions 5,4,4,5 however I noticed when the velocity is outgoing it is not relaxed.

Actually I am modeling an estuary, so in this case if the water level of the sea increase the salt will go inside the river which means ongoing velocity, if the velocity is outgoing the salt will go outside the river. However when I use 5,4,4,5 the salinity usually will be very close from the initial conditions as the salt is not washed out.
The administrator has disabled public write access.

Re: Variable boundary conditions type 12 years 10 months ago #3369

  • jmhervouet
  • jmhervouet's Avatar
Hello,

You can check in subroutine diffin.f if the boundary condition is changed with the velocity (if not it is a bug but according to what you say the salinity changes though it stays very close, which is a hint that the condition is relaxed). If the value of salinity is changed but stays close to prescribed value, it is normal at the beginning when flow has just reversed, then salinity should decrease. If this is due to the conditions of your study yo will get no different result by taking the elevation as a new criterion. Maybe with a few flags in first loop of subroutine diffin.f you can trace exactly what happens. Make sure that the ACCURACY FOR DIFFUSION OF TRACERS is enough (try 1.D-10).

With best regards,

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

Re: Variable boundary conditions type 12 years 10 months ago #3483

  • m.mahgoob
  • m.mahgoob's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 106
Hello,

I have tried to use the diffin subroutine, what I understood from it, is that the tracer is released in case of outflow and it will be imposed in case of inflow. If this is the case, that will be enough for me
The administrator has disabled public write access.
Moderators: pham

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