Welcome, Guest
Username: Password: Remember me

TOPIC: Call user_bed_init with computation continued

Call user_bed_init with computation continued 1 year 4 months ago #42840

  • Renault
  • Renault's Avatar
  • NOW ONLINE
  • Senior Boarder
  • Posts: 120
  • Thank you received: 33
Hi all,

I have a simulation where I want to continue from a previous computation file, but still make some initial changes after the previous computation is loaded using USER_BED_INIT. However, it seems that in BED1_INIT_SEDIMENT_GAIA, USER_BED_INIT is not called if the computation is continued. Thus, I tried adding a call to USER_BED_INIT at the end of the code that runs if computation is continued, using ES and RATIO_SAND instead of ESTRATUM and RATIO_INIT because these are not allocated if continuing from previous computation (injected at line 558):
! bla bla bla...
        CALL USER_BED_INIT(NUMSTRAT,NPOIN,NSICLA,ES,RATIO_SAND)
!
!
      ENDIF !(.NOT.DEBU.OR..NOT.DEBU_MASS)

However, this appears to have no effect on the bed composition. It should be mentioned that the USER_BED_INIT subroutine works on its own if the computation is not continued.

In brief, again, I'm asking how to run USER_BED_INIT (or really, how to make initial changes to the bed) after grabbing data from a previous computation file, because I want to make certain zones non-erodible and change some concentrations. Any ideas on how to accomplish this are welcome.

Thanks,
André Renault
The administrator has disabled public write access.

Call user_bed_init with computation continued 1 year 4 months ago #42878

  • Renault
  • Renault's Avatar
  • NOW ONLINE
  • Senior Boarder
  • Posts: 120
  • Thank you received: 33
Hi again,

I have tried a different strategy, but without success. I tried bringing in the code from my USER_BED_INIT directly and putting it at the end of the COMPUTATION CONTINUED segment, with some variable name changes. In addition, I put write-out lines that should show when I am changing each point, but these lines do not show up in the output log, so it would appear that this code does not run. It should be noted that the roughness should be accessible, as I have added it to declarations. The code runs without error or warning; from previous trials, I know that this code should override the default subroutine.

In essence, at any given point, if the roughness is 0.02501 or 0.01001, I want to make the bottom non-erodible at this point, so I set ES equal to 0.0 and ZR (non-erodible bottom) equal to ZF (surface bottom). And if the roughness is 0.02502, I want it to change the layer composition so that it will match what is in the steering file.
      USE DECLARATIONS_TELEMAC2D, ONLY: CHESTR
! .... case: computation continued
!       THIS IS FROM MY USER_BED_INIT
        DO ILAYER=1,NOMBLAY
          DO IPOIN=1,NPOIN
            IF ((ABS(CHESTR%R(IPOIN)-0.02501).LT.0.000001).OR.
     &      (ABS(CHESTR%R(IPOIN)-0.01001).LT.0.000001)) THEN
              ES(ILAYER,IPOIN) = 0.D0
              ZR%R(IPOIN)=ZF%R(IPOIN)
              WRITE(LU,*)'CHANGING NOEROD TO FOND'
            ELSE IF (ABS(CHESTR%R(IPOIN)-0.02502).LT.0.000001) THEN
              ES(ILAYER,IPOIN) = SED_THICK(ILAYER)
              DO ICLA=1,NSICLA
                RATIO_SAND(ICLA,ILAYER,IPOIN) = AVA0(ICLA)
                WRITE(LU,*)'CHANGING LAYER COMPO'
              END DO
            END IF
          END DO
        END DO
!
!
      ENDIF !(.NOT.DEBU.OR..NOT.DEBU_MASS)
! .....

Is there anything I'm missing that I need to change, like masses, or am I changing things at the wrong time? If so, where should the above code be positioned in the subroutine? Again, I'm trying to make some last-minute changes to a computation continued file to add in extra elements, based on roughness as suggested in a different post by Rebekka Kopmann. I have confirmed that the TELEMAC geometry file has the target roughness values.

Thanks for any help you can offer!
The administrator has disabled public write access.

Call user_bed_init with computation continued 1 year 3 months ago #42985

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

If you want to call USER_BED_INIT in BED1_INIT_SEDIMENT_GAIA for a continuation computation, you should call it outside a condition containing logical DEBU (not the converse .NOT.DEBU).

Rather than
! bla bla bla...
        CALL USER_BED_INIT(NUMSTRAT,NPOIN,NSICLA,ES,RATIO_SAND)
!
!
      ENDIF !(.NOT.DEBU.OR..NOT.DEBU_MASS)

I would write
! bla bla bla...
      ELSEIF(DEBU) THEN
        CALL USER_BED_INIT(NUMSTRAT,NPOIN,NSICLA,ES,RATIO_SAND)
!
!
      ENDIF !(.NOT.DEBU.OR..NOT.DEBU_MASS)
The administrator has disabled public write access.
The following user(s) said Thank You: Renault
Moderators: Pablo, pavans

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