Welcome, Guest
Username: Password: Remember me

TOPIC: How to model log boom in 3D?

How to model log boom in 3D? 7 years 5 months ago #26865

  • shenh
  • shenh's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 148
  • Thank you received: 37
We are trying to model log boom in 3D. Could anyone share your experience on this? What would be the best way to model it? I am thinking:
- disabling a few vertical layers: is this possible to do in t3d?
- model it as a series of culverts under the boom: however there will be a lot culverts required. Will the model become very unstable because of too many culverts (~100)?
- i am using manning's n to model bottom friction. can i use depth-varying manning's n and set higher n value for the boom vertical layers?

Anything else? Any suggestions are much appreciated!

Hailiang
The administrator has disabled public write access.

How to model log boom in 3D? 7 years 5 months ago #26866

  • pilou1253
  • pilou1253's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 584
  • Thank you received: 106
Hello,

I modelled debris booms in two different hydropower reservoirs. The technique I used, inspired by JMH and the dragfo test case in 2D, is based on local head losses added to the nodes where the boom is located. You can try to search for posts with "debris boom", you'll find my messages.

I described the methodology in an article at the last TUC. I believe that the proceedings are about to be released so keep an eye on the homepage!

Good luck,

Best regards
PL
The administrator has disabled public write access.

How to model log boom in 3D? 7 years 5 months ago #26869

  • shenh
  • shenh's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 148
  • Thank you received: 37
Great! Any chance you could share the paper before the conference proceeding? My email This email address is being protected from spambots. You need JavaScript enabled to view it..

Thank you for the help.
The administrator has disabled public write access.

How to model log boom in 3D? 7 years 5 months ago #26873

  • shenh
  • shenh's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 148
  • Thank you received: 37
If there is any concern sharing the paper at the moment, could you share your edits to the model files e.g. source.f, case file.

Your help is much appreciated!

Hailiang
The administrator has disabled public write access.

How to model log boom in 3D? 7 years 5 months ago #26875

  • pilou1253
  • pilou1253's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 584
  • Thank you received: 106
Hi,
I sent you the article to the email address you indicated!
PL
The administrator has disabled public write access.

How to model log boom in 3D? 7 years 5 months ago #26880

  • shenh
  • shenh's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 148
  • Thank you received: 37
Thanks for the paper. Your application B is exactly what i am looking for. Could you provide some guidance re below:
- how to read a reference file (including results without the boom) and how to access Uref?
- in file t2d_drag_force.f, except calculating FUDRAG%R(I), and FVDRAG%R(I), there is code for handling other stuff. Do I need those in 3D version for source.f?
- i could not find any example source.f. Could you share one?

The source.f in the base source code is blank. I am thinking the following workflow - is this correct?
! my boom will be on a single row, and only take the top layer. So here i will define a node array that contains source node IDs.
! do i need anything here before defining S1U, S1V, and S1W?
! loop planes
! loop vertical layers
! if current node ID is within my node array, then set
! S1U%R(I) = 0.5D0 * CD * Uref * Uref / U
! S1V%R(I) = 0.5D0 * CD * Vref * Vref / V
! S1W%R(I) = 0.5D0 * CD * Wref * Wref / W
! do i need anything else eg memory deallocation (not likely) etc here?

Your comments and inputs are much appreciated!

Hailiang
The administrator has disabled public write access.

How to model log boom in 3D? 7 years 5 months ago #26882

  • pilou1253
  • pilou1253's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 584
  • Thank you received: 106
Hi,

I cannot share the fortran file but here comes some guidance!

First, you need to make some TELEMAC-3D variables available in source.f, add:
USE DECLARATIONS_TELEMAC3D, ONLY : PRIVE2D,NPLAN

PRIVE2D is the new private variables (2D) array available for reading data stored as extra variables in the geometry file. In my case I had a dummy variable DRAG whose value was 0 everywhere in the mesh expect at the nodes where the boom was located where it had another value (the value itself is not important in my case since it is only used to identifiy on which mesh nodes do I need to add the head losses).
See information here on PRIVATE VARIABLES: www.opentelemac.org/index.php/feature-lo...ogrammes-version-7-1

You then need to set the type for S1U, S1V and S1W to 'Q', for particular treatment:
!************PLLI********
      CALL OS ( 'X=0     ' , X=S1U )
      CALL OS ( 'X=0     ' , X=S1V )
!
      S1U%TYPR='Q'
      S1V%TYPR='Q'
      IF(NONHYD) THEN
        S0W%TYPR='0'
        S1W%TYPR='Q'
!       CALL OS ( 'X=0     ' , X=S0W )
        CALL OS ( 'X=0     ' , X=S1W )
!************PLLI********

You then need to loop on the 2D nodes to identify the nodes where you boom is and read the Uref value:
DO I=1,NPOIN2 
        IF(PRIVE2D%ADR(1)%P%R(I).GT.0.1D0) THEN ! looking for the points at the debris boom
	      VREF = PRIVE2D%ADR(2)%P%R(I) ! Vref without boom, taken from T1 so approximative
          DO IPLAN=NPLAN-2,NPLAN ! looking at the three highest planes, debris boom
            I3D = I+NPOIN2*(IPLAN-1) ! 3D node ID on three highest planes
            NORM=SQRT(UN3%R(I3D)**2+VN3%R(I3D)**2+WN3%R(I3D)**2) !Velocity
	    KOEFF = VREF/MAX(NORM,1.D-3)
            S1U%R(I3D)= 0.5D0 * CD * VREF * KOEFF / DX
            S1V%R(I3D)= 0.5D0 * CD * VREF * KOEFF / DX
            S1W%R(I3D)= 0.5D0 * CD * VREF * KOEFF / DX
          ENDDO
        ENDIF
      ENDDO

Here, I stored Uref in the second PRIVATE VARIABLE, hence VREF = PRIVE2D%ADR(2)%P%R(I).
My DRAG variable to locate the boom corresponds to PRIVE2D%ADR(1)%P%R(I).

Beware that S1U, S1V and S1W are equal and computed using the norm of the velocity vector. The actual source terms are computed in another routine by multiplying S1 with the velocity components. Beware also to define properly DX which should be the length of application of the force in the 2D plane. I did not figure out how to get the exact value at each node so my trick is to use a constant value for the whole boom which is OK if your mesh is regular at its location.

Good luck!

Best regards
PL
The administrator has disabled public write access.
The following user(s) said Thank You: shenh

How to model log boom in 3D? 7 years 5 months ago #26891

  • shenh
  • shenh's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 148
  • Thank you received: 37
Thank you! Much appreciated. By requesting a sample source.f file, I was hoping a sample file when you were working with a dummy model (maybe?). I understand your application B is preliminary.

Following your guidance, i have updated the cannal t3d example model by including the source drag. See attached. My edits include:
- add source.f file and set it up with your guidance
- update the case file t3d_canal.cas by adding a few new keywords
- add two variables DRAG and VREF into geometry geo_canal.slf, where VREF is calculated from BK as the magnitude of the last time step velocity without adding the boom yet

I am seeing the following issues:
- the two variables defined in the geometry file geo_canal.slf are NOT read in by the source.f. I have added a print statement to check it. I saw all zeros in command window listing. Anything I am not doing correctly when adding the two variables to geometry file? The two variables look good by visualizing in BK
- you mentioned parameter D should be defined carefully. Is it the length of a mesh cell? In the cannal example model, should it be 10 m?
- i need to run my real model in parallel. Is there anything i need to particularly do. I saw file t2d_dragforce.f has one line
IF(NCSIZE.GT.0) AIRE=P_DSUM(AIRE)

Thanks again for the excellent and thorough explanation. I also enjoyed reading your other posts - very informative and to the points

File Attachment:

File Name: CANAL-FOR-DEBUG.zip
File Size: 921 KB
The administrator has disabled public write access.

How to model log boom in 3D? 7 years 5 months ago #26897

  • shenh
  • shenh's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 148
  • Thank you received: 37
I made some progress with the cannal t3d example model. The private variables defined in the geometry still could not be read in. I used a walkaround - harded code the node ids and VREF for the drag force. The model can run in serial mode, and i can clearly see the vertical effect of the applied drag force.

However it does not work in parallel. After specifying PARALLEL PROCESSORS = 6,the model can run successfully but the drag effect is gone! Seems the force term is not applied. Could you advise what may be wrong here (i have attached the model)? I believe something needs to be treated specially for parallel run.

I still want to figure out why the two private variables in geometry file could not be read in.

Again any help is greatly appreciated!

Hailiang
Attachments:
The administrator has disabled public write access.

How to model log boom in 3D? 7 years 4 months ago #26925

  • pilou1253
  • pilou1253's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 584
  • Thank you received: 106
Hello,

First, your Vref is not read because you don't have the same spelling in your cas file (VERF) and geometry file (VREF).
Check the listing, it should indicate which private variables have been correctly read.

Regarding your hardcoded node IDs this can indeed only work in serial since in parallel the nodes have a local numbering, 1 to NPOIN2 corresponding to each subdomain's NPOIN2. To have it working you need to convert global to local IDs (there is a function for doing that) but you should not need it now once you corrected the VERF name.

Finally, I don't think that making S0U = S0U + S1U etc is correct since S0 are explicit source terms while S1 are the implicit ones. I think the comment is valid only if one adds explicit source terms but we are not.

Best regards
PL
The administrator has disabled public write access.
Moderators: pham

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