Welcome, Guest
Username: Password: Remember me

TOPIC: Output FUDRAG as a variable in results file

Output FUDRAG as a variable in results file 12 years 8 months ago #3926

  • scairns
  • scairns's Avatar
Hi,

Is it possible to output the FUDRAG term from the dragfo subroutine as a variable in the results file?
I have tried to modify the PRERES and NOMVAR subroutines to add a variable, to no success, however my fortran knowledge is limited.

Any pointers would be great.

Thanks,

Scott
The administrator has disabled public write access.

Re: Output FUDRAG as a variable in results file 12 years 8 months ago #3929

  • jmhervouet
  • jmhervouet's Avatar
Hello,

Yes, you are nearly done, you only miss a change at the end of point_telemac2d, where you will see how variables are added to VARSOR, the order here must the same as in NOMVAR_TELEMAC2D.

With best regards,

Jean-Michel
The administrator has disabled public write access.

Re: Output FUDRAG as a variable in results file 12 years 8 months ago #3976

  • scairns
  • scairns's Avatar
Thank you for your help. However, I am still having an issue accessing the FUDRAG variable. Is there a use/type declaration required at the start of the PRERES subroutine?
I have tried type(bief_obj) :: fudrag but receive a forrtl (157) access violation error.

Another issue, I have added an extra force to simulate tidal energy extraction in the fudrag term. When the simulation is run, there is fluctuations/wiggles in both the velocity and depth profiles in the vicinity of the energy extraction area. Consulting the 'Hydrodynamics of Free Surface Flows' book the example using the dragfo subroutine for modelling a pier also has fluctuations/wiggles in the depth profile. Do you know if this was interpreted as a physical or numerical issue?

Thanks again,

Scott
The administrator has disabled public write access.

Re: Output FUDRAG as a variable in results file 12 years 8 months ago #3981

  • jmhervouet
  • jmhervouet's Avatar
Hello,

The FUDRAG variable (or any other that is declared in declarations_telemac2d) can be accessed with the command :

USE DECLARATIONS_TELEMAC2D, ONLY : FUDRAG

at the beginning of a subroutine, if it is not in the arguments.


Fluctuations when you extract energy can be due to a physical effect (like von Karman eddies behind bridge piers) or to numerical effects (just solve mass matrix * X = a step and you will see wiggles in the solution, so any brutal variation in a right hand side may produce wiggles) but in the case of numerical effects they will vary from point to point, they will be mesh dependent.

JMH
The administrator has disabled public write access.

Re: Output FUDRAG as a variable in results file 12 years 8 months ago #3994

  • scairns
  • scairns's Avatar
Hello,

I am still having trouble accessing FUDRAG, I can't see it defined in declarations_telemac2d...however it is defined in interface_telemac2d.
Even with including:
USE INTERFACE_TELEMAC2D

at the start of preres, I get an error 'this name does not have a type'

Following that I have included the type and dummy argument statements from interface_telemac2d into preres:

&(FU_IMP,FV_IMP,FUDRAG,FVDRAG)
TYPE(BIEF_OBJ), INTENT(INOUT) :: FU_IMP,FV_IMP,FUDRAG,FVDRAG

I then receive the same forrtl error described in the last post. Is more than one private array required?

The code I currently have in preres:
IF((LEO.AND.SORLEO(23)).OR.(IMP.AND.SORIMP(23))) THEN
DO N=1,NPOIN
PRIVE%ADR(1)%P%R(N) = FUDRAG%R(N)
ENDDO
ENDIF

Scott
The administrator has disabled public write access.

Re: Output FUDRAG as a variable in results file 12 years 8 months ago #3995

  • jmhervouet
  • jmhervouet's Avatar
Hello,

Sorry, FUDRAG is not delared in declarations_telemac2d, it is a local name and is in fact T5, so what you can do is saving FUDRAG into PRIVE, just as you do in PRERES, but into subroutine DRAGFO (using USE DECLARATIONS_TELEMAC2D, ONLY : PRIVE to see PRIVE in this subroutine). Then you do not need to have preres in your Fortran file).

With best regards,

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

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