Welcome, Guest
Username: Password: Remember me

TOPIC: Defining the bathymetry with a function of X and Y

Defining the bathymetry with a function of X and Y 7 years 10 months ago #24814

  • special_20
  • special_20's Avatar
Hello all,

I would like to create a mesh where the bathymetry Zf is defined as a function of X and Y. For example : Zf(X,Y) = 10+(X+Y)^2.

Is it possible to do so ?

Regards
The administrator has disabled public write access.

Defining the bathymetry with a function of X and Y 7 years 10 months ago #24817

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

I know this is not the answer you expect but what I usually do in this kind of situation is to load an XY text file (columns X and Y) to python and using a Pandas Dataframe I add (using a function or similar) the third column (Pandas has numpy heavy lifting in the background so it has a decent performance) and then save it to a XYZ text file to later use in BlueKenue.

Maybe there is a procedure using telemac's fotran files but i'm not really confident in my FORTRAN skills.

regards,

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

Defining the bathymetry with a function of X and Y 7 years 10 months ago #24822

  • a.barton
  • a.barton's Avatar
  • OFFLINE
  • Moderator
  • Posts: 683
  • Thank you received: 178
Hi There,

This type of thing can be easily computed using Excel, if the files are not too large?

On the other hand, if there is a large need by Blue Kenue users to add this to Blue Kenue, I will make a note about it!

Kindly,
Alan
The administrator has disabled public write access.

Defining the bathymetry with a function of X and Y 7 years 10 months ago #24826

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

You can do it rather easily in BlueKenue, just define your base mesh with your set of (X,Y) coordinates and use Tools->Calculator to compute a new object based on the mesh's coordinates, see screenshot below.

Calculator.png


It's also something that fudaa can do very easily.

For the fortran alternative, you can use the subroutine CORFON, have a look at the bumpflu validation case for example.

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

Defining the bathymetry with a function of X and Y 7 years 10 months ago #24830

  • special_20
  • special_20's Avatar
Thank you for your answers !

In particular, the answer about Blue Kenue is what I was expecting for but I didn't find it in by my self...

I made my mesh and what I did is modifying the corfon subroutine to get what I wanted.

Regards
The administrator has disabled public write access.

Defining the bathymetry with a function of X and Y 7 years 10 months ago #24836

  • a.barton
  • a.barton's Avatar
  • OFFLINE
  • Moderator
  • Posts: 683
  • Thank you received: 178
I didn't find the answer either... so I'll make a note to improve this!

Kindly,
Alan
The administrator has disabled public write access.
Moderators: Serrer, a.barton

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