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

TOPIC: Failed to initialize temperature profile in T3DRST restart mode

Failed to initialize temperature profile in T3DRST restart mode 3 years 7 months ago #38198

  • Yunhao Song
  • Yunhao Song's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 118
  • Thank you received: 9
Hi,

I'm trying to initialize the temperature profile of a previous T3DRST restart file, which only contains the velocity UVW and elevation. The result shown in the attached Fig-1 was obviously wrong according to my settings in subroutine user_condi3d_trac. The settings should be fine as I tested without the restart file and the temperature profile was correct, as shown in Fig-2.

Does anyone know why this happened? Any idea is appreciated.
Yunhao
Attachments:
The administrator has disabled public write access.

Failed to initialize temperature profile in T3DRST restart mode 3 years 7 months ago #38201

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Hi
User initial condition are replaced by previous computation file values...
You should probably change some other source file to avoid this for the tracer in your case.
An option could be to use the results of fig2 to add the tracer values in the restart file...

Hope this helps
Christophe
The administrator has disabled public write access.

Failed to initialize temperature profile in T3DRST restart mode 3 years 7 months ago #38203

  • Yunhao Song
  • Yunhao Song's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 118
  • Thank you received: 9
Hi Christophe,

c.coulet wrote:
User initial condition are replaced by previous computation file values...

Maybe I didn't make it clear, there're no tracers in my the previous computation file (T3DRST).

Fig-1 is actually the result of tracer values added in the restart file by user_condi3d_trac.f, which is wrong. Fig-2 is the correct temerature profile according to the settings in the user_fortran file.

Yunhao
The administrator has disabled public write access.

Failed to initialize temperature profile in T3DRST restart mode 3 years 7 months ago #38204

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
You was clear!
During the replacement by the values exsiting in the previous computation file, as there is no tracer in the previous file, the values are set to 0.
There is probably a message in the listing file which indicate this specific point...

Regards
Christophe
The administrator has disabled public write access.

Failed to initialize temperature profile in T3DRST restart mode 3 years 7 months ago #38205

  • Yunhao Song
  • Yunhao Song's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 118
  • Thank you received: 9
Hi Christophe,

I didn't find the info you mentioned in the listing, please check my test case and listing file attached.

In the user_fortran I set the temperature by depth (water depth in the domain is around 90m):
IF(DEPTH.GE.0.D0 .AND. DEPTH.LT.30.D0) THEN
   TA%ADR(ITRAC)%P%R(J) = 12.D0
ELSEIF(DEPTH.GE.30.D0 .AND. DEPTH.LT.60.D0) THEN
   TA%ADR(ITRAC)%P%R(J) = 11.D0			
ELSE
   TA%ADR(ITRAC)%P%R(J) = 6.7D0			
ENDIF

The result (Fig-1) seems weird as the bottom layer was 6.7℃ while all the other layers were 12℃, the stratification (11℃ between 30m to 60m depth) was lost...
Attachments:
The administrator has disabled public write access.

Failed to initialize temperature profile in T3DRST restart mode 3 years 7 months ago #38215

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

Strange that you model tracers and use a continuation file without tracers inside. It would be better to include temperature in that file.

Anyway, you can try the enclosed modified subroutine so that if you use a continuation file without tracers but want to define values of tracers to start your computation, what you implement in USER_CONDI3D_TRAC is taken into account. It should work for v8p2 and trunk releases.

Hope this helps,

Chi-Tuan
Attachments:
The administrator has disabled public write access.

Failed to initialize temperature profile in T3DRST restart mode 3 years 7 months ago #38214

  • Yunhao Song
  • Yunhao Song's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 118
  • Thank you received: 9
Hi,

Before setting the initial tracer value, I checked the elevation of each layer in the previous T3DRST file using the code below:
DO I=1,NPOIN2
   DO IPLAN=1,NPLAN
      J = NPOIN2*(IPLAN-1)+I		
      DEPTH = MESH3D%Z%R(I+(NPLAN-1)*NPOIN2)-MESH3D%Z%R(J)

      IF(I.EQ.1) THEN
	WRITE(LU,102) 'Surfa of node',J,'=', MESH3D%Z%R(I+(NPLAN-1)*NPOIN2)
	WRITE(LU,102) 'Eleva of node',J,'=', MESH3D%Z%R(J)
	WRITE(LU,103) 'Depth of node',J,'=', DEPTH
      ENDIF

   END DO
END DO

Some of the listing is shown below, it's noticeable that the elevation is extremely high and obviously abnormal. This explained the aforementioned incorrect temperature profile in Fig-1 as the calculated depths of all the layers was 0 (except the bottom layer).

Surfa of node 1 = 0.17976931+309
Eleva of node 1 = 0.60028606E+02
Depth of node 1 = 0.17976931+309
Surfa of node 206 = 0.17976931+309
Eleva of node 206 = 0.17976931+309
Depth of node 206 = 0.00
Surfa of node 411 = 0.17976931+309
Eleva of node 411 = 0.17976931+309
Depth of node 411 = 0.00

Has anyone ever run into this? Any idea is greatly appreciated.

Regards,
Yunhao
The administrator has disabled public write access.

Failed to initialize temperature profile in T3DRST restart mode 3 years 7 months ago #38216

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

If you read the CONDIM subroutine which calls USER_CONDI3D_TRAC subroutine, you can see that the 3D mesh is updated by CALCOT only if DEBU is true (i.e. no continuation). That is not your case, so that Z or MESH3D%Z%R is not updated when you try to print it and you may have wrong values.

Hope this helps,

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

Failed to initialize temperature profile in T3DRST restart mode 3 years 7 months ago #38217

  • Yunhao Song
  • Yunhao Song's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 118
  • Thank you received: 9
Dear Chi-Tuan,

Thank you for all the useful info! I will test with the subroutine you provided and send you feedback later.

pham wrote:
Strange that you model tracers and use a continuation file without tracers inside.
In my case the model would eventually be used to simulate eutrophication and phytoplankton under temperature density flow, so I’m gradually doing the coupling (T3D + WAQ11 + WAQ330/AED2).

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

Failed to initialize temperature profile in T3DRST restart mode 3 years 7 months ago #38220

  • Yunhao Song
  • Yunhao Song's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 118
  • Thank you received: 9
Hi Chi-Tuan,

I tested the telemac3d_init_2021-04-08.f and it worked perfectly.

I did another test with temperature included in the continuation file, the initialization looked good while in the listing the info 'PREVIOUS CALCULATION WITHOUT 1 TRACER MINIMUM' was still printed for every tracers, could you show me how to modify the code you added in line 410-424?
        IF(NTRAC.GT.0) THEN
          II = 0
          DO ITRAC=1,NTRAC
            IF(TROUVE(ADR_TRAC+ITRAC).EQ.0) THEN
              WRITE(LU,901)
901           FORMAT(1X,'PREVIOUS CALCULATION WITHOUT 1 TRACER MINIMUM',
     &             /,1X,'WE FIX IT TO TRAC0 OR BY USER_CONDI3D_TRAC')
              CALL OS( 'X=C     ' , X=TA%ADR(ITRAC)%P, C=TRAC0(ITRAC))
              II = 1
            ENDIF
          ENDDO
          ! USER FUNCTION CALLED ONLY IF THERE IS ONE MISSING TRACER
          IF (II.EQ.1) CALL USER_CONDI3D_TRAC
        ENDIF
!

Many thanks & best regards,
Yunhao
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.