Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Implementation of spatially varying viscosity with CORVIS

Implementation of spatially varying viscosity with CORVIS 3 years 7 months ago #38303

  • greeve
  • greeve's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 35
  • Thank you received: 4
Hi,.

Has anybody implemented spatially varying viscosity with CORVIS.f. I am testing CORVIS on the telemac2d Tide example, I have added a modified version of corvis (corvis_tide.f (text fill attached)) to the user_fortran folder and I can see the code is being compiled. However, I add a few write statements to FILPOL.f (called by corvis) and it doesn't seem to read/use corvis during the simulation. With the resulting viscosity spatially constant. Is there another Fortran file that needs to be modified to read corvis?

Thanks
Attachments:
The administrator has disabled public write access.

Implementation of spatially varying viscosity with CORVIS 3 years 7 months ago #38305

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

FILPOL and other subroutines called inside FILP10, FILP11 and FILP12 are not compiled as not called by any subroutine (they are not listed in the .cmdf files).
Anyway to use them, you have to put all 4 of them in your FORTRAN FILE.

I put these 4 files + your corvis_tide.f in the FORTRAN FILE and it seems OK to me (see enclosed figure).

Hope this helps,

Chi-Tuan
Attachments:
The administrator has disabled public write access.

Implementation of spatially varying viscosity with CORVIS 3 years 7 months ago #38334

  • greeve
  • greeve's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 35
  • Thank you received: 4
Thanks Chi-Tuan,

Adding I've added those extra files and it now works now for the test case. However, when I try to implement this onto a Lat/Lon grid it doesn't work. If I'm understanding correctly from one of your earlier posts TELEMAC converts the mesh to a Mercator projection? So does that mean the value in CORVIS need to also be in Mercator or should this be handled inside the code? I have tried switching between Geographic Systems 1 and 5 but it doesn't seen to make any difference.

Happy to share a link to the model with you if you'd like, you can email at This email address is being protected from spambots. You need JavaScript enabled to view it.

Regards
The administrator has disabled public write access.

Implementation of spatially varying viscosity with CORVIS 3 years 7 months ago #38342

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

When calling CORVIS, the mesh should have already been converted into Mercator. In CORVIS, you have to give coordinates in Mercator.

You can run your simulation with option RESULT FILE IN LONGITUDE-LATITUDE = NO during 1 time step and store the results to know the Mercator coordinates.

GEOGRAPHIC SYSTEM is a keyword only used when interpolating tidal constituents when computing boundary or initial conditions, it is not dependent on other features.

Hope this helps,

Chi-Tuan
The administrator has disabled public write access.

Implementation of spatially varying viscosity with CORVIS 3 years 5 months ago #38639

  • ewang
  • ewang's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 100
has anyone tried to read in spatial varying viscosity instead of modifying the field with FILPOL in CORVIS?

I have tried to do that by calling FIND_VARIABLES in Telemac2d.f. Unfortunately I haven't managed to figure it out. I am also wondering if this could potentially slow down the computation time as I am making the code to call FIND_VARIABLES every time step.
The administrator has disabled public write access.

Implementation of spatially varying viscosity with CORVIS 3 years 5 months ago #38640

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Hi
Not done on my side but surely possible.
I'm not in favor using find_variables at every time step as it will for sure slow down the computation...
But you could add the viscosity in the geometry file and declare it as a private variable (which is then automatically read) and use it directly.
Look at the rainfall example where CN is define in the geometry and adapt to have the same functionality for your case

Hope it helps
Christophe
The administrator has disabled public write access.

Implementation of spatially varying viscosity with CORVIS 3 years 5 months ago #38642

  • ewang
  • ewang's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 100
Great. Thanks. I got it to work now.

Cheers

Edwin
The administrator has disabled public write access.

Implementation of spatially varying viscosity with CORVIS 2 years 10 months ago #39632

  • yohannis
  • yohannis's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 22
  • Thank you received: 9
Hello Dr. Coulet,
hello Edwin,
I am trying to use a spacially varying viscosity. I have the viscosity values (Variable D) in the geometry file. It apperas that the viscosity values in the geometry file are not used during the computation. The default value defined in the steering file is used.
From your posts, I see that the variable has to be declared as a private variable. Can you tell how I can declare the viscosity as a private variable?

Thank you in advance.
The administrator has disabled public write access.

Implementation of spatially varying viscosity with CORVIS 2 years 10 months ago #39633

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Look at the rainfall example where CN is define in the geometry and adapt to have the same functionality for your case
Christophe
The administrator has disabled public write access.

Implementation of spatially varying viscosity with CORVIS 2 years 10 months ago #39634

  • yohannis
  • yohannis's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 22
  • Thank you received: 9
Thank you very much for the quick reply. I have actually looked at the rainfall example (pluie), where CN is the geometry file.
In my geometry file, I have spatially varying friction coefficient as well and the friction coefficient is used during the computation. In case of viscosity, the value in the steering file (or the default if not given in the steering file) (not the value in the geometry file) is used during the computation. I am wondering what I am missing here?
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: pham

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