Welcome, Guest
Username: Password: Remember me

TOPIC: Initial velocity condition whole mesh

Initial velocity condition whole mesh 10 years 5 months ago #13214

  • albertoperezortiz
  • albertoperezortiz's Avatar
Hi,

I'm trying to set up an initial condition of velocity using the initial conditions = 'PARTICULAR' and the condin fortran file.

I've attached my cas file and a fortran first attempt.

I saw in an previous post that I can initialize the water depth in the cas file and the velocity in the condin file?

Thanks,

Alberto


File Attachment:

File Name: condin.f
File Size: 5 KB
The administrator has disabled public write access.

Initial velocity condition whole mesh 10 years 5 months ago #13217

  • albertoperezortiz
  • albertoperezortiz's Avatar
Cas file below... ;) Thanks!

TITLE = 'cylinder'
/RELEASE : V6P2

/
/ INPUT-OUTPUT FILES /
/

FORTRAN FILE = condin.f
STEERING FILE = cas
GEOMETRY FILE = selafin.slf
BOUNDARY CONDITIONS FILE = bc.cli
RESULTS FILE = res_island_channel

/


/______________________________________________________________________
/ /
/ EQUATIONS /
/______________________________________________________________________/
/
LAW OF BOTTOM FRICTION = 4
FRICTION COEFFICIENT = 0.0
VELOCITY DIFFUSIVITY = 0.8 / original value 1.E-4
/LAW OF FRICTION ON LATERAL BOUNDARIES = 4
/ROUGHNESS COEFFICIENT OF BOUNDARIES = 0.0295


/
/ EQUATIONS, BOUNDARY CONDITIONS /
/

PRESCRIBED VELOCITIES = -2.0;2.0
OPTION FOR LIQUID BOUNDARIES = 1;1 / 1;1 apply strongly

/
/ EQUATIONS, INITIAL CONDITIONS /
/
INITIAL DEPTH = 40
INITIAL CONDITIONS = 'CONSTANT DEPTH'
INITIAL CONDITIONS = 'PARTICULAR'
/VERTICAL STRUCTURES = TRUE

/
/ NUMERICAL PARAMETERS /
/
TIME STEP = 5
NUMBER OF PRIVATE ARRAYS= 2
SOLVER ACCURACY = 1.E-7 / original value 1.E-4
NUMBER OF TIME STEPS = 1000
DISCRETIZATIONS IN SPACE = 12;11
FREE SURFACE GRADIENT COMPATIBILITY = 0.5
/
TREATMENT OF THE LINEAR SYSTEM = 2
SOLVER = 1
SUPG OPTION = 0;0

CONTINUITY CORRECTION = YES

/
/ INPUT-OUTPUT, GRAPHICS AND LISTING
/

LISTING PRINTOUT PERIOD = 50
VARIABLES FOR GRAPHIC PRINTOUTS : 'U,V,S,H,Q,L,F'
GRAPHIC PRINTOUT PERIOD = 50
NUMBER OF FIRST TIME STEP FOR GRAPHIC PRINTOUTS = 0


&ETA
&FIN
The administrator has disabled public write access.

Initial velocity condition whole mesh 10 years 5 months ago #13219

  • jmhervouet
  • jmhervouet's Avatar
Hello,

PARTICULAR is programmed for the depth, and the velocity is set after in condin.f.

SO to correct your subroutine, choose the keyword INITIAL CONDITIONS according to what you want to do for depth. If it is "PARTICULAR" program the corresponding section (and in this case remove the lines CALL PLANTE(1) and STOP which are here only to remind the user that he or she has something to write here). The velocities can be set as you do, but you should put the CALL OS after so that it is independant of the treatment of depth.
If this is not clear feel free to ask again.

With best regards,

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

Initial velocity condition whole mesh 10 years 5 months ago #13220

  • albertoperezortiz
  • albertoperezortiz's Avatar
Thanks Jean-Michel,

So if I understand it correctly, if I'm only interested to initialize the U component, the condin subroutine should look like this?

! TO BE MODIFIED BY USER IF SPECIAL INITIAL CONDITIONS
!
IF(LNG.EQ.1) WRITE(LU,10)
IF(LNG.EQ.2) WRITE(LU,11)
10 FORMAT(1X,'CONDIN : AVEC DES CONDITIONS INITIALES PARTICULIERES'
& ,/,' VOUS DEVEZ MODIFIER CONDIN')
11 FORMAT(1X,'CONDIN : WITH SPECIAL INITIAL CONDITIONS'
& ,/,' YOU HAVE TO MODIFY CONDIN')

CALL OS('X=C ',X=U,C=2.D0)

I get the following error: C missing and operation X=C asked.

Thanks!

Alberto
The administrator has disabled public write access.

Initial velocity condition whole mesh 10 years 5 months ago #13222

  • albertoperezortiz
  • albertoperezortiz's Avatar
Hi Jean-Michel,

Further to my previous email. I set up initial condition for depth in cas file (deleted particular initial conditions) and set up initial velocity in condin.f.

However, this is the error message I get. I set up my initial velocity to 2m/s which is in accordance with the value at the boundary conditions. Thanks!

Alberto

================================================================================

ITERATION 0 TIME: 0.0000 S
PRERES: MAXIMUM COURANT NUMBER: Infinity
USING STREAMLINE VERSION 6.3 FOR CHARACTERISTICS
INTERP: POINT 1 NOT IN ELEMENT 1
SHP(1,IP)= NaN
SHP(2,IP)= NaN
SHP(3,IP)= NaN
EPSILO= 9.9999999999999995E-007 IPID= 0

PLANTE: PROGRAM STOPPED AFTER AN ERROR
_____________
runcode::main:
C:\telemac_flowpastcylinder_Re5000:
|runCode: Fail to run
|C:\telemac_flowpastcylinder_Re5000\cas_2014-06-04-11h28min32s\out_condin.exe

|~~~~~~~~~~~~~~~~~~
|STOP 2
|~~~~~~~~~~~~~~~~~~
The administrator has disabled public write access.

Initial velocity condition whole mesh 10 years 5 months ago #13224

  • jmhervouet
  • jmhervouet's Avatar
Hello,

No, there are several mistakes. Just take the original condin.f, you will find that U and V are initialised to 0 at the beginning, there you can just change the:

CALL OS('X=0 ',X=U)
CALL OS('X=0 ',X=V)

into :

CALL OS('X=C ',X=U,C=2.D0)
CALL OS('X=0 ',X=V)

Then you can do what you want with the INITIL CONDITIONS for the depth.

Please also note that in 'X=C ' there are 5 spaces after the letters, this may be the reason of the strange message you get.

Regards,

JMH
The administrator has disabled public write access.

Initial velocity condition whole mesh 10 years 5 months ago #13225

  • albertoperezortiz
  • albertoperezortiz's Avatar
Hi Jean-Michel,

I changed the original condin.f as you suggested:

! INITIALISES THE VELOCITIES: ZERO VELOCITIES
!
CALL OS('X=C',X=U,C=2.D0)
CALL OS('X=0',X=V)

However, I keep getting an error:

OVD (BIEF) : UNKNOWN OPERATION: X=CX=0CO

PLANTE: PROGRAM STOPPED AFTER AN ERROR
_____________
runcode::main:
C:\telemac_flowpastcylinder_Re5000:
|runCode: Fail to run
|C:\telemac_flowpastcylinder_Re5000\cas_2014-06-04-13h15min18s\out_condin.exe

|~~~~~~~~~~~~~~~~~~
|STOP 2
|~~~~~~~~~~~~~~~~~~

I appreciate your help and patience. Thannks!

Alberto
The administrator has disabled public write access.

Initial velocity condition whole mesh 10 years 5 months ago #13227

  • jmhervouet
  • jmhervouet's Avatar
Hello,

Very strange, because we call OS and find an error in OVD, which is called only when there is a division in the task requested, which is not your case. However I do not see any space after X=C in your strings, in fact it is this site that removes the spaces, they were in my message and have been removed, so we cannot understand each other, the operation between quotes must be 'X=C_____' with really 5 spaces (I have put here _ instead) because a string of 8 characters is expected. It sems that your compiler is totally puzzled by this lack of spaces and mixes the arguments.

Regards,

JMH
The administrator has disabled public write access.

Initial velocity condition whole mesh 10 years 5 months ago #13231

  • albertoperezortiz
  • albertoperezortiz's Avatar
Hi Jean-Michel,

It works. Sorry about the misunderstanding.

Thanks for your help.

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

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