Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Previous computation as initial condition

Previous computation as initial condition 12 years 4 months ago #5061

  • Stefaan
  • Stefaan's Avatar
Hello,

I am experiencing some difficulties when using the option COMPUTATION CONTINUED in Telemac3D. The output of a previous computation consists of 2 files: a 2D results file containing water depth and depth averaged values for velocity and tracer, a 3D results file containing information per layer for velocity and tracer. When I want to use the ouput of a previous computation, I can only specify 1 PREVIOUS COMPUTATION FILE. Neither the 2D results file neither the 3D results file can be used here. I tried to combine water depth, 3D velocity and 3D salinity in 1 new Selafin file, but this doesn't work either. I always have the error "SUITE_SERAFIN: different mesh or wrong standard". I use exactly the same mesh, so this is not the problem.
Can anybody help me? How to use the option PREVIOUS COMPUTATION FILE correctly? Which information is needed in the selafin file?

I have another question, related with the previous one. Is it possible to use the results file of a 2D Telemac computation as input (via PREVIOUS COMPUTATION FILE) for a 3D run on exactly the same mesh? I assume that all layers would then get the same values for velocities, tracer, ... I've tried this, but it didn't work. Is this possible? And if so, how to do this?

Thanks for your help on this topic!
Stefaan
The administrator has disabled public write access.

Re: Previous computation as initial condition 12 years 4 months ago #5062

  • agoll
  • agoll's Avatar
Hello,
In Telemac 3D you put the steering words:

2D CONTINUATION = YES
BINARY DATA FILE 1 = 'previous2Dfile.slf'

if you want to continue a calculation from a 2D file.
if you want to use a 3D file as a previous computation file you put:

COMPUTATION CONTINUED = YES
PREVIOUS COMPUTATION FILE = 'previous3Dfile.slf'

additionally you can set if you want to:
INITIAL TIME SET TO ZERO = YES

cheers
Annalena
The administrator has disabled public write access.

Re: Previous computation as initial condition 12 years 3 months ago #5191

  • Stefaan
  • Stefaan's Avatar
Thanks for your answer! This really helps. For the 3D results file as previous computation file this works fine. However for the 2D results file as previous computation file for a 3D computation, I still have a problem:

- the initial condition for the water depths are ok
- the initial condition for the velocities are ok (since they come from a 2D results file, their initial values are the same for all layers in the 3D computation)
- the tracer (in my case salinity) is not ok. When starting the simulation, I get the message "Variable: SALINITY
PPT
is in the file but will not be read". As a consequence, the uniform value specified in the keyword INITIAL VALUES OF TRACERS is used instead.

I checked that the name and unit of the salinity is the same in the 2D res file (used as initial condition) and in the new 3D computation. However, it doesn't work. Does anybody know what I am doing wrong? Does anybody know how to do this correctly?

Thanks in advance for your help!
Stefaan
The administrator has disabled public write access.

Re: Previous computation as initial condition 12 years 2 months ago #5376

  • Stefaan
  • Stefaan's Avatar
Hello,

Does anybody knows whether it is possible to use a 2D results file as initial condition for a 3D computation when running a model with a tracer (salinity in my case). When doing so water levels and velocities are taken from the 2D results file, however the tracer is not. See my previous message above for more information.

Thanks for your advice about this topic!
Regards,
Stefaan
The administrator has disabled public write access.

Re: Previous computation as initial condition 12 years 2 months ago #5377

  • jmhervouet
  • jmhervouet's Avatar
Hello,

No, it has not been programmed, and it is too short for release 6.2. So you will have to implement it yourself :

In telemac3d.f array ALIRE2D in data must have positions 37 to 36+NTRAC set to 1, so that the tracers are read in the 2D file. I'll do that at least for version 6.2.

Then the 2D tracers will be read and will be available for a use in condim.f, they will be stored in bief objects :

T2_14 on, depending on the number of tracers.

Then instead of putting the initial value you can copy your 2D tracer on the vertical.

Something like , if you have 1 tracer:

DO IPLAN=1,NPLAN
CALL OV('X=Y ',TA%ADR(1)%P%R((IPLAN-1)*NPOIN2+1),
& T2_14%R,T2_14%R,0.D0,NPOIN2)
ENDO

and for a second tracer:

DO IPLAN=1,NPLAN
CALL OV('X=Y ',TA%ADR(2)%P%R((IPLAN-1)*NPOIN2+1),
& T2_15%R,T2_15%R,0.D0,NPOIN2)
ENDO


I hope it works (not tested), tell me. If yes, we can put this in version 6.3.

With best regards,

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

Re: Previous computation as initial condition 11 years 10 months ago #6812

  • robinson
  • robinson's Avatar
Hi,Jean-Michel Hervouet

I have the same problem as Stefaan when I use 2D result file with only salinity to initialize the 3D model. So in 'condim.f' I test your codes above:
 !    IF(NTRAC.GT.0) THEN
      IF(NTRAC.EQ.1) THEN
 !       DO I=1,NTRAC
 !        CALL OS( 'X=C     ', X=TA%ADR(I)%P, C=TRAC0(I))
         DO IPLAN=1,NPLAN
           DO JPOIN=1,NPOIN2
            CALL OV( 'X=Y     ', TA%ADR(1)%P%R((IPLAN-1)*NPOIN2+JPOIN) ,
     &                     T2_14%R , T2_14%R , 0.D0 , NPOIN2)
           ENDDO
         ENDDO
!        ENDDO
      ENDIF
but in comilation it always prompts with an error message like 'error.PNG', could you tell me where the problem is ...

with best regard
Robinson
Attachments:
The administrator has disabled public write access.

Re: Previous computation as initial condition 11 years 10 months ago #6815

  • jmhervouet
  • jmhervouet's Avatar
Hello,

This is probably what you want to do :

IF(NTRAC.EQ.1) THEN
DO IPLAN=1,NPLAN
CALL OV( 'X=Y ', TA%ADR(1)%P%R((IPLAN-1)*NPOIN2+1) ,
& T2_14%R , T2_14%R , 0.D0 , NPOIN2)
ENDDO
ENDIF


or, if it does not work for some compiler reason(I don't see why) :

IF(NTRAC.EQ.1) THEN
DO IPLAN=1,NPLAN
DO J=1,NPOIN2
TA%ADR(1)%P%R((IPLAN-1)*NPOIN2+J=T2_14%R(J)
ENDDO
ENDDO
ENDIF

Regards,

JMH
The administrator has disabled public write access.

Re: Previous computation as initial condition 10 years 10 months ago #11642

  • Stefaan
  • Stefaan's Avatar
Hello Jean-Michel,

The second option works fine with me. Thanks a lot for your help!

However, I still encouter a problem when I use a 3D result file as initial condition. The initial condition looks fine. However, in the first time step the tracer in the entire domain is set to the "INITIAL VALUES OF TRACERS" as specified in the cas file. This is not the case for the water levels and the velocities. Do you have any idea why this is happening and how to encouter this? FYI: I am using version v6p2.

Thanks for your answer.

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

Re: Previous computation as initial condition 10 years 10 months ago #11643

  • jmhervouet
  • jmhervouet's Avatar
Hello Stefaan,

Yes, this was a bug in version 6.2. In telemac3d.f, the line:

IF(NTRAC.GT.0) CALL OS('X=Y ',X=TAN,Y=TA)

must be moved from after the call to condim to after the call to bief_suite, we have now put it just before the sequence IF(SEDI)...:

IF(NTRAC.GT.0) CALL OS('X=Y ',X=TAN,Y=TA)

IF(SEDI)
...
ENDIF


With best regards,

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

Previous computation as initial condition 10 years 9 months ago #12081

  • Stefaan
  • Stefaan's Avatar
Hello,

I have an additional question about using a previous computation as an initial condition. It has to do with the boundary conditions to be used. Let me explain my question using an example:
- suppose you do a simulation that starts on the 1st of January 2010. The simulation runs for 7 days.
- you want to use the output of this simulation as input for a new simulation (in fact COMPUTATION CONTINUED). Now my question is: can I use the same timeseries as boundary conditions as in the first simulation (starting on the 1st of January 2010) or do I need to adapt my timeseries in order that they will start on the 8th of January?

Thanks in advance for the answer!

Best regards,
Stefaan
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: pham

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