Welcome, Guest
Username: Password: Remember me

TOPIC: Bed Sediment Advected/Diffused in MICROPOL v8p1r0

Bed Sediment Advected/Diffused in MICROPOL v8p1r0 4 years 1 month ago #36817

  • Sdelgado
  • Sdelgado's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 17
  • Thank you received: 5
Hello everybody,

I am currently experimenting with the micropol module using t2d's gouttedo example, because i desire to make some changes to it to adapt it to my case.

I started a simulation with erotion rate = 0, Settling velocity = 0, and a non-uniform start for Bed Sediments. If the latter is not advected neither diffused the initial values should be kept for the entire simulation but that does not happen.

If I recall correctly, in v8p1r1 there is change in CALCS2D_Micropol for absorbed pollutant in bed sediment but it should have nothing to do with this case.

Does anybody know what the problem is?

I'm attaching my files, I hope they upload correctly.

Thanks

Santiago
Attachments:
The administrator has disabled public write access.

Bed Sediment Advected/Diffused in MICROPOL v8p1r0 4 years 1 month ago #36952

  • Sdelgado
  • Sdelgado's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 17
  • Thank you received: 5
Hello again,

I think I solved it. I changed the code in TELEMAC2D.f and GESTIO.F so if MICROPOL is active, then the Bed Tracers are not diffused nor advected.

I am attaching the fortran file, the changes in TELEMAC2D are between lines 1454 and 1608 of the fortran file and the changes in GESTIO are between lines 2205 and 2228 of the file.

It's very likely that there is a more efficient solution but at least it works :lol:

Thanks

Santiago
Attachments:
The administrator has disabled public write access.

Bed Sediment Advected/Diffused in MICROPOL v8p1r0 4 years 1 month ago #36967

  • Sdelgado
  • Sdelgado's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 17
  • Thank you received: 5
Hello again,

I also found that in subroutine LECDON_WAQTEL.f the adress of TAUR and TAUS where switched.

In the waqtel dico the critical stress of resuspension has the index 109 and the critical stress of sedimentation has the index 106 while in the subroutine TAUS calls for 109 and TAUR calls for 106.

I would also like to mention that both the SEDIMENT SETTLING VELOCITY and the LAW OF TRACERS DEGRADATION have the index 111. I don't know if this may cause any problems.

Regards,

Santiago
The administrator has disabled public write access.

Bed Sediment Advected/Diffused in MICROPOL v8p1r0 4 years 1 month ago #36986

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

You are right, TAUS and TAUR have been switched between the dictionary and the lecdon_waqtel subroutine. I will fix it for next release.

Anyway, it is not a problem for the 111 index as the variables are not of the same type (2 different arrays are used, one for integers, the other one for floats).

Best regards,

Chi-Tuan
The administrator has disabled public write access.

Bed Sediment Advected/Diffused in MICROPOL v8p1r0 4 years 1 month ago #36985

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

Sorry for the delay to answer, but with the release of v8p2 branch, I was very busy.

Many thanks for raising this real bug with respect to the theory.

Good to read that you found a fix that enables you to continue to work. It is not totally generic, I will try to find a smarter fix.

Anyway, FYI, just before the creation of v8p2 branch, I added the possibility for the keyword COEFFICIENT FOR DIFFUSION OF TRACERS to be an array not a single value (i.e. one value per tracer) like in 3D. That will enable to give a 0 value to tracers you do not want to diffuse. For advection, I had a quick look but no advection for tracers is not allowed at the moment, a modification may be needed to do it correctly.

I will let you know if I have found a smart fix.

Thanks for your feedback using MICROPOL model,

Chi-Tuan
The administrator has disabled public write access.

Bed Sediment Advected/Diffused in MICROPOL v8p1r0 4 years 4 weeks ago #37007

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

Here is my proposal for v8p1 to fix this issue. It is a little bit smarter than yours, in 3 subroutines. Please tell me if it works for you or not.

There will be differences with your solution as I implement no diffusion for tracers IND_SF and IND_CSF with viscous coefficient for tracer VISCT equal to 0, not with DIFT = .FALSE. (which does not exactly have the same behaviour). Is cleaner to do like that.

I will fix this issue for the trunk and next release v8p2 thanks to you again (but waiting for the new tag v8p2r0, you can use this extra files).

Best regards,

Chi-Tuan
Attachments:
The administrator has disabled public write access.
The following user(s) said Thank You: Sdelgado, nshettigar

Bed Sediment Advected/Diffused in MICROPOL v8p1r0 4 years 3 weeks ago #37035

  • Sdelgado
  • Sdelgado's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 17
  • Thank you received: 5
Hello Chi-Tuan,

I tried your proposal to fix the main issue in the main micropol example.

It seems as if the source terms for the bed load are not taken into account because it remains constant in time which is not what is expected.

I am attaching the files.

Best regards,

Santiago
Attachments:
The administrator has disabled public write access.
The following user(s) said Thank You: pham

Bed Sediment Advected/Diffused in MICROPOL v8p1r0 4 years 3 weeks ago #37010

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

As you work with MICROPOL module, I wonder if you have read the following topic:
www.opentelemac.org/index.php/kunena/16-...-module-errors#28252

In particular the modified subroutine EROSION_FX with a MAX function rather than ANTI_DIRAC function, as suggested by Tony a few years ago.
ANTI_DIRAC is still in use in the current releases, I do not know if my former colleague Riadh thought about changing it or not.

Any feedback with your examples is welcome (I am not a MICROPOL user).

Best regards,

Chi-Tuan
The administrator has disabled public write access.
The following user(s) said Thank You: Sdelgado

Bed Sediment Advected/Diffused in MICROPOL v8p1r0 4 years 3 weeks ago #37021

  • Sdelgado
  • Sdelgado's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 17
  • Thank you received: 5
Hello Chi-Tuan,

Thank you for the proposal to fix the issue, as soon as I get back to the computer I use to run the simulations, I will check if they work for me.

May I ask which is the difference between using DIFT=.FALSE. and VISCT=0?

Regarding the modifications in EROSION_FX, I read the aforementioned topic and made those changes suggested by Tony, which solved me an instabilty problem with drying/wetting that I had.

Best regards,

Santiago
The administrator has disabled public write access.
The following user(s) said Thank You: pham

Bed Sediment Advected/Diffused in MICROPOL v8p1r0 4 years 3 weeks ago #37024

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

Thanks for your feedback, I will change the EROSION_FX subroutine with this fix. As the waq2d_micropol example does not have wetting/drying, I have not seen this kind of instability.

VISCT = 0 cancels the diffusion term 1/H*div(h*VISC*grad()) and you can choose which tracer diffusion you can cancel.
DIFT = .FALSE. cancels the diffusion of every tracer + does additional treatments of the 2nd member of advection-diffusion equation + boundary conditions.
You can have a look at the CVDFTR subroutine in the $HOMETEL/sources/utils/bief folder for more details.

Hope this helps,

Chi-Tuan
The administrator has disabled public write access.
The following user(s) said Thank You: Sdelgado

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