Welcome, Guest
Username: Password: Remember me

TOPIC: Spatially distributed friction angle

Spatially distributed friction angle 6 years 3 months ago #31205

  • josekdiaz
  • josekdiaz's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 161
  • Thank you received: 48
Hello Forum,


In a very specific portion of a TELEMAC2D+SISYPHE coupled model I was wondering if I could "spatialize" the FRICTION OF THE ANGLE keyword value for my domain.

The workflow that I was sure to follow was to convert the internal alias "PHISED" to a vector-like inside the library and reading its values from the geometry file, following:

1) Definition of the spatially vaired friction angle using a custom variable in the geometry file.

2) Modification of the "PHISED" variable type and calculation within the sources:
  • declarations_sisiphe.f: definition as a TYPE(bief_obj) and others like:
    TYPE(BIEF_OBJ),   INTENT(IN)    :: PHISED
  • BEDLOAD_EFFPNT.f: definition as a TYPE(bief_obj) and modification of the soulsby function:
    ELSEIF(SLOPEFF.EQ.2) THEN
    !
    !        TANPHI = TAN(PHISED*PI/180.D0) 
    !
            DO I=1,NPOIN
    !
              TANPHI = TAN(PHISED%R(I)*PI/180.D0)
    !
    !         COSINE AND SINE OF THE DIRECTION OF THE SLOPE

  • bedload_main.f: definition as a TYPE(bief_obj)
  • bedload_solidischarge.f: definition as a TYPE(bief_obj)
  • lecdon_sisyphe.f: commenting line 446 (! PHISED = MOTREA( ADRESS(2, 25) )

3) Re-compile the TM sources again
4) Appending a user fortran similar to the "noerod.f" procedure to read a custom named variable and map it to the "PHISED" one
5) Test it using the YEN example.

Unfortunately this goes beyond my very basic FORTRAN/programming skills and something went wrong in the step 3, recompiling:
- completed: .../v7p3r1/sources/sisyphe/bedload_solvs_vf.f                  
/home/stark/opentelemac/v7p3r1/sources/sisyphe/bedload_main.f:21:13:

      & PHISED, DEVIA, BETA2, BIJK,SEDCO,HOULE,
             1
Error: PROCEDURE attribute conflicts with INTENT attribute in ‘phised’ at (1)
/home/stark/opentelemac/v7p3r1/sources/sisyphe/bedload_main.f:286:30:

      &         SLOPEFF,COEFPN,PHISED(I),
                              1
Error: Type mismatch in argument ‘phised’ at (1); passed TYPE(bief_obj) to REAL(8)
/home/stark/opentelemac/v7p3r1/sources/sisyphe/bedload_solidischarge.f:236:39:

      &      COEFPN,CALFA,SALFA,SLOPEFF,PHISED,DEVIA,BETA2,
                                       1
Error: Type mismatch in argument ‘phised’ at (1); passed TYPE(bief_obj) to REAL(8)
   - completed: .../v7p3r1/sources/sisyphe/cvsp_outputfiles.f                  
   - completed: .../v7p3r1/sources/sisyphe/db.f

As the compiler mentions, somewhere in the library the call functions bedload_main and bedload_discharge subroutines expect to (still) get a REAL*8 value instead of a BIEF_OBJ vector.

I've tried searching as best as I could inside the doc.telemac.org if some declaration/routine is missing for switching the declaration but with no extra results.

So it must be something that a FORTRAN/TELEMAC newbie programmer like me is missing.

¿Is there an extra definition/procedure missing in my workflow?

¿Is this the right approach for spatializing a parameter like "PHISED"/FRICTION OF THE ANGLE within a telemac model?


Thanks,

José Díaz.
The administrator has disabled public write access.

Spatially distributed friction angle 6 years 3 months ago #31228

  • Leballeur
  • Leballeur's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 434
  • Thank you received: 163
Hi José,

I think you should also modify the interface_sisyphe_bedload.f

I hope it helps!

Regards,
Laurent
The administrator has disabled public write access.

Spatially distributed friction angle 6 years 3 months ago #31258

  • josekdiaz
  • josekdiaz's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 161
  • Thank you received: 48
Hi Laurent,

Modifying interface_sisyphe_bedload.f (and a couple of source files in API that were dangling) I managed to complete the compilation successfully. Unfortunately, always got execution errors that related to memory access violation.

That's why I decided to take small steps, simplifying a little bit the process by editing the "maxslope.f" source subroutine and using it as a user fortran file; in the end, does mostly what I need: with sediment slide = true, limit the max slope based on the friction angle ("PHISED"), which is being read from the geometry file with a different name ("PHIS").

It does compile when I execute the yen case, but no matter what I do I can't manage to pass the first iteration. Both: the listing of the "yen" example case, adding the variable "PHIS" in the geometry file and the modified maxslope.f subroutine are attached to this message (maxslope_jc_00.f).

The listing when executed with DEBUGGING=1 is:
================================================================================
 ITERATION        0    TIME:   0.0000 S
 CALLING PRERES_TELEMAC2D
 BACK FROM PRERES_TELEMAC2D
 CALLING DESIMP
 BACK FROM DESIMP
 CALLING HPROPA
 BACK FROM HPROPA
 CALLING DE CHPCONV
 BACK FROM CHPCONV
 CALLING BILAN
 BACK FROM BILAN
 TELEMAC2D COUPLED WITH: SISYPHE
 TELEMAC-2D: INTERNAL COUPLING WITH SISYPHE
 PREMIER APPEL DE SISYPHE
 PART 0 : INITIALISING SISYPHE
 INBIEF (BIEF): NOT A VECTOR MACHINE (ACCORDING TO YOUR DATA)

 THERE IS     2 LIQUID BOUNDARIES:

 BOUNDARY    1 :
  BEGINS AT BOUNDARY POINT:        1 , WITH GLOBAL NUMBER:         1
  AND COORDINATES:     96.68190           31.13710
  ENDS AT BOUNDARY POINT:        6 , WITH GLOBAL NUMBER:         6
  AND COORDINATES:     97.68190           31.13710

 BOUNDARY    2 :
  BEGINS AT BOUNDARY POINT:      176 , WITH GLOBAL NUMBER:       176
  AND COORDINATES:     104.6819           31.13710
  ENDS AT BOUNDARY POINT:      181 , WITH GLOBAL NUMBER:       181
  AND COORDINATES:     105.6819           31.13710

 THERE IS     2 SOLID BOUNDARIES:

 BOUNDARY    1 :
  BEGINS AT BOUNDARY POINT:        6 , WITH GLOBAL NUMBER:         6
  AND COORDINATES:     97.68190           31.13710
  ENDS AT BOUNDARY POINT:      176 , WITH GLOBAL NUMBER:       176
  AND COORDINATES:     104.6819           31.13710

 BOUNDARY    2 :
  BEGINS AT BOUNDARY POINT:      181 , WITH GLOBAL NUMBER:       181
  AND COORDINATES:     105.6819           31.13710
  ENDS AT BOUNDARY POINT:        1 , WITH GLOBAL NUMBER:         1
  AND COORDINATES:     96.68190           31.13710
 STRCHE (BIEF): NO MODIFICATION OF FRICTION

 INITIALISATION EN CAS DE COUPLAGE : PART=           0
 QSCL REINITIALISED IN INIT_TRANSPORT
 FOR CLASS            1
 QS REINITIALISED IN INIT_TRANSPORT

================================================================================
 ITERATION        0    TIME:   0.0000 S

 SISYPHE COUPLED WITH: TELEMAC2D
 BACK FROM SISYPHE
 TELEMAC2D INITIALISED
 CALLING CHPCONV
 BACK FROM CHPCONV
 CALLING HPROPA
 BACK FROM HPROPA
 CALLING PROPIN
 BACK FROM PROPIN
 CALLING CORSTR
 BACK FROM CORSTR
 CALLING BORD
 THE LIQUID BOUNDARIES FILE CONTAINS
           4  LINES WITH:
 Q(1)     SL(2)
 BACK FROM BORD
 CALLING PROPIN
 BACK FROM PROPIN
 CALLING WALL_FRICTION
 BACK FROM WALL_FRICTION
 BOUCLE 701 ISOUSI=           1
 CALLING PROSOU
 BACK FROM PROSOU
 CALLING PROPAG
 BACK FROM PROPAG
 TRAITEMENT BANCS DECOUVRANTS
 FIN DU TRAITEMENT BANCS DECOUVRANTS
 CALLING CHPCONV
 BACK FROM CHPCONV
 CALLING SISYPHE, CHARRIAGE
 GET_DATA_NTIMESTEP: BAD FILE FORMAT: 0��

 PLANTE: PROGRAM STOPPED AFTER AN ERROR
 RETURNING EXIT CODE:            2
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD
with errorcode 2.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------
-------------------------------------------------------
Primary job  terminated normally, but 1 process returned
a non-zero exit code.. Per user-direction, the job has been aborted.
-------------------------------------------------------
--------------------------------------------------------------------------
mpiexec detected that one or more processes exited with non-zero status, thus causing
the job to be terminated. The first process to do so was:

  Process name: [[25384,1],0]
  Exit code:    2
--------------------------------------------------------------------------
_____________
runcode::main:
:
   |runCode: Fail to run
   |/usr/bin/mpiexec -wdir /home/stark/opentelemac/v7p3r1/examples/sisyphe/friction/t2d_yen-exp2.cas_2018-08-21-12h20min43s -n 1 /home/stark/opentelemac/v7p3r1/examples/sisyphe/friction/t2d_yen-exp2.cas_2018-08-21-12h20min43s/out_user_fortran
   |~~~~~~~~~~~~~~~~~~
   |
   |~~~~~~~~~~~~~~~~~~

For the sake of completeness I'll attach the relevant files to be copied to the Yen example to get the almost exact same folder that i'm using for this task.


File Attachment:

File Name: maxslope_jc_00.f
File Size: 12 KB

File Attachment:

File Name: geo_yen-exp3.slf
File Size: 29 KB

File Attachment:

File Name: t2d_yen-exp2.cas
File Size: 4 KB

File Attachment:

File Name: sis_yen-exp.cas
File Size: 2 KB


Thanks in advance for any advice given,

José Díaz.
The administrator has disabled public write access.

Spatially distributed friction angle 6 years 3 months ago #31262

  • Leballeur
  • Leballeur's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 434
  • Thank you received: 163
Hi José,

You introduced additional variables to read your new friction angle PHIS from the geometry file, but you didn't assign them, especially FFORMAT (format of the geometry file).
Try to add the following assignments before the call to FIND_VARIABLE:
FFORMAT='SERAFIN ' ! (don't forget the space at the end)
RECORD=0
BID=0

I hope it helps!

Regards,
Laurent
The administrator has disabled public write access.

Spatially distributed friction angle 6 years 2 months ago #31303

  • Pablo
  • Pablo's Avatar
  • OFFLINE
  • Moderator
  • Posts: 316
  • Thank you received: 121
Hello,
Why do you need to have a spatially distributed friction angle? Is there any well-founded physical reason to do that?

Pablo
The administrator has disabled public write access.

Spatially distributed friction angle 6 years 2 months ago #31304

  • josekdiaz
  • josekdiaz's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 161
  • Thank you received: 48
Hello Pablo,

I'm testing the effects of a hydrograph passing through a V-shaped river channel. That includes the evolution of the banks in the domain, which are affected by the erodable bed (also defined spatially) and the angle of repose in that particular zone.

Hence, I was testing the slide of sediment [on] and the max slope controlled by the friction angle combo, but generalizing the latter in the domain into one single value is not exactly my go-to solution.

This is also the perfect excuse to meddle with the code a bit, and finally learn more about the BIEF library.

Regards,

José Diaz
The administrator has disabled public write access.
Moderators: Pablo, pavans

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