Welcome, Guest
Username: Password: Remember me

TOPIC: Prescribing river inflow when offshore boundary is 5 6 6

Prescribing river inflow when offshore boundary is 5 6 6 10 years 3 months ago #13826

  • pprodano
  • pprodano's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 96
  • Thank you received: 55
Hello,

I have a nearshore domain whose offshore boundaries are forced depth, uvel, and vvel (5 6 6 in the *.cli file). These boundary conditions vary in time and space, and are read from an external file. Simulations with just this input work just fine.

The problem comes when I wish to specify a river inflow to the nearshore domain. As with any river problem, I create an inflow boundary conditions file that varies with time. However, I can not seem to include the inflow boundary conditions file in my simulations.

The only way I can include the river inflow is to include the following options in the steering file:

PRESCRIBED FLOWRATES =0;4.8
PRESCRIBED ELEVATIONS =0;0.88
PRESCRIBED VELOCITIES =0;0
OPTION FOR LIQUID BOUNDARIES =2;1 /THOMPSON FOR OFFSHORE BOUNDARY

However, including PRESCRIBED VELOCITIES keyword cancels out my offshore boundary values that were read from an external file. If I remove the PRESCRIBED VELOCITIES keyword, Telemac-2d complains with the following message:

ITERATION 0 TIME: 0.0000 S
PRERES: MAXIMUM COURANT NUMBER: 0.000000
THE LIQUID BOUNDARIES FILE CONTAINS
96 LINES WITH:
Q(2)

VIT : MORE PRESCRIBED VELOCITIES ARE REQUIRED
IN THE PARAMETER FILE
AT LEAST 1 MUST BE GIVEN

I know I have an inconsistency in how the keywords/boundaries are specified. Can someone help?

Pat
The administrator has disabled public write access.

Prescribing river inflow when offshore boundary is 5 6 6 10 years 3 months ago #13828

  • jmhervouet
  • jmhervouet's Avatar
Hello,

The problem is in function VIT. There it is expected that the velocities are given either by the keyword PRESCRIBED VELOCITIES or in the LIQUID BOUNDARY FILE (that contains only Q(2)). In your case they seem to be given by an extra file. The solution is probably in subroutine bord (that I suppose you have already changed), where the function VIT is called. For the boundary that you treat yourself, you should not call VIT because you have already given the velocities.

Regards,

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

Prescribing river inflow when offshore boundary is 5 6 6 10 years 3 months ago #13844

  • pprodano
  • pprodano's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 96
  • Thank you received: 55
Hi Jean-Michel,

Thank you for your reply. I could not get the case to work after commenting a call to VIT in the modified version of bord.f (attached). Now the simulation hangs after maximum iterations are exceeded.

Without the inflow boundary, my modified bord.f had everything above !##### removed. This worked, and all offshore boundary conditions were property set.

With the addition of river inflow, I had to include all of the bord.f, plus my custom code addition (at the bottom), to get the river inflow to be read.

May I ask you to have a look at it, and offer a comment. Perhaps the issue is where I place the custom code within bord.f?

Thanks,

Pat
Attachments:
The administrator has disabled public write access.

Prescribing river inflow when offshore boundary is 5 6 6 10 years 3 months ago #13847

  • jmhervouet
  • jmhervouet's Avatar
Hello,

I do not see any problem, except that the tests on time are risky, are you sure it works properly ? I mean tests like IF(TEMPS.EQ.10) THEN... where sometimes the time is already the result of a double precision sum. I would do the allocations and read the file within a code like this:

LOGICAL ALREADY
DATA ALREADY/.FALSE./
IF(.NOT.ALREADY) THEN

ALLOCATE...
READ...

ENDIF

and I would allow some tolerance when I check a time-step, to cope with truncation errors (but well it does not explain why an extra boundary makes problems...).

With best regards,

JMH
The administrator has disabled public write access.

Prescribing river inflow when offshore boundary is 5 6 6 10 years 3 months ago #13856

  • pprodano
  • pprodano's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 96
  • Thank you received: 55
Hi Jean-Michel,

I will implement the recommendations suggested.

As an update, I was able to resolve the above problem by specifying velocities at the upstream flow boundary instead of flow. Instead of having 4 5 5 at the inflow boundary, I imposed 4 6 6 and read the values from a file. This seemed to work.

Thank you once again.

Pat
The administrator has disabled public write access.
Moderators: pham

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