Welcome, Guest
Username: Password: Remember me

TOPIC: Prescribed tracers values at closed wall?

Prescribed tracers values at closed wall? 9 years 11 months ago #15090

  • jmhervouet
  • jmhervouet's Avatar
Hello,

I looked at your Fortran, actually the sequence :

IF(MESH2D%KNOLG%I(NBOR2%I(IPTFR)).EQ.399)ADR(1)=IPTFR
IF(MESH2D%KNOLG%I(NBOR2%I(IPTFR)).EQ.391)ADR(2)=IPTFR
IF(MESH2D%KNOLG%I(NBOR2%I(IPTFR)).EQ.392)ADR(3)=IPTFR
IF(MESH2D%KNOLG%I(NBOR2%I(IPTFR)).EQ.396)ADR(4)=IPTFR
IF(MESH2D%KNOLG%I(NBOR2%I(IPTFR)).EQ.398)ADR(5)=IPTFR
IF(MESH2D%KNOLG%I(NBOR2%I(IPTFR)).EQ.402)ADR(6)=IPTFR

should be in a loop DO IPTFR=1,NPTFR2

otherwise IPTFR is not defined, so probably ADR remained equal to 0.

Regards,

JMH
The administrator has disabled public write access.

Prescribed tracers values at closed wall? 9 years 11 months ago #15094

  • 716469
  • 716469's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 303
  • Thank you received: 6
Dear Jean-Michel,

Thanks again for looking into it, but whatever I try with loops it is still producing below error. It is probably related to use of Method of Characteristic, but it is only one worked fine for my complicated stratification. If you have any suggestions please let me know and I will keep trying:). Thank you.

GRACJG (BIEF) : EXCEEDING MAXIMUM ITERATIONS: 500 RELATIVE PRECISION: NaN

Kind Regards!

Violeta
The administrator has disabled public write access.

Prescribed tracers values at closed wall? 9 years 11 months ago #15097

  • jmhervouet
  • jmhervouet's Avatar
Hello,

Again we would need the whole case exactly as you run it, or just your latest Fortran file if you changed nothing else, there is probably some undefined value that is used somewhere.

Regards,

JMH
The administrator has disabled public write access.

Prescribed tracers values at closed wall? 9 years 11 months ago #15099

  • 716469
  • 716469's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 303
  • Thank you received: 6
Thank you very much Jean-Michel. Here are my latest files. I am sure I made a mistake in Fortran bord3d subroutine, as usual:(. Thanks again.

Kind Regards!

Violeta
The administrator has disabled public write access.

Prescribed tracers values at closed wall? 9 years 11 months ago #15107

  • jmhervouet
  • jmhervouet's Avatar
Hello,

The parallel part of the algorithm should be:

! initialising ADR
DO II=1,6
ADR(II)=0
ENDDO
! now finding if those 6 points are in the sub-domain
DO IPTFR=1,NPTFR2
IF(MESH2D%KNOLG%I(NBOR2%I(IPTFR)).EQ.399)ADR(1)=IPTFR
IF(MESH2D%KNOLG%I(NBOR2%I(IPTFR)).EQ.391)ADR(2)=IPTFR
IF(MESH2D%KNOLG%I(NBOR2%I(IPTFR)).EQ.392)ADR(3)=IPTFR
IF(MESH2D%KNOLG%I(NBOR2%I(IPTFR)).EQ.396)ADR(4)=IPTFR
IF(MESH2D%KNOLG%I(NBOR2%I(IPTFR)).EQ.398)ADR(5)=IPTFR
IF(MESH2D%KNOLG%I(NBOR2%I(IPTFR)).EQ.402)ADR(6)=IPTFR
ENDDO
DO II=1,6
! If point II is in my sub-domain and if there are tracers
IF(ADR(II).GT.0.AND.NTRAC.GT.0)
IPTFR=ADR(II)
DO ITRAC=1,NTRAC
DO IPLAN = 1,NPLAN
IBORD = (IPLAN-1)*NPTFR2 + IPTFR
ATABOL%ADR(ITRAC)%P%R(IBORD) =-0.2D0
BTABOL%ADR(ITRAC)%P%R(IBORD) =0.9D0
ENDDO
ENDDO
ENDIF
ENDDO

You can check if you agree with that algorithm.

With best regards,

JMH
The administrator has disabled public write access.

Prescribed tracers values at closed wall? 9 years 11 months ago #15113

  • 716469
  • 716469's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 303
  • Thank you received: 6
Thank you very much Jean-Michel for checking my case and providing me with the right code. I have modified my file and rerun it, but still got same error:

GRACJG (BIEF) : EXCEEDING MAXIMUM ITERATIONS: 500 RELATIVE PRECISION: NaN

right from the very beginning of the simulation. I have time step set up as 1 sec. I even used 0.1 as a time step but with same result. In result file I got the following as well. So looks like tracers values are not read at all. Could it be connected to the fact that on open boundary I have different then in domain tracers vertical profile, and I used TRA_PROF_Z for that, but I also have to modify line 889 in fortan file (attached) in bord3d, so PRESCRIBED TRACERS VALUES=0.D0;0.D0 could apply. I am not sure where the error is.

IF(IPROF.EQ.2.OR.IPROF.EQ.0) THEN
TABORL%ADR(ITRAC)%P%R(IBORD)=PROFZ



From result file:

MASS AT THE PRESENT TIME STEP : 0.9097344E+12
MASS LEAVING THE DOMAIN DURING THIS TIME STEP : NaN
ERROR ON THE MASS DURING THIS TIME STEP : NaN
FLUX BOUNDARY 1: NaN M3/S ( >0 : ENTERING <0 : EXITING )

TRACER 1
ADVECTIVE FLUX THROUGH BOUNDARIES OR SOURCES : NaN
DIFFUSIVE FLUX THROUGH THE BOUNDARIES : NaN
MASS AT THE PREVIOUS TIME STEP : NaN
MASS AT THE PRESENT TIME STEP : NaN
MASS EXITING (BOUNDARIES OR SOURCE) : NaN
ERROR ON THE MASS DURING THIS TIME STEP : NaN

TRACER 2
ADVECTIVE FLUX THROUGH BOUNDARIES OR SOURCES : NaN
DIFFUSIVE FLUX THROUGH THE BOUNDARIES : NaN
MASS AT THE PREVIOUS TIME STEP : NaN
MASS AT THE PRESENT TIME STEP : NaN
MASS EXITING (BOUNDARIES OR SOURCE) : NaN
ERROR ON THE MASS DURING THIS TIME STEP : NaN


Sorry to be a pain. Thank you very much for looking into it.

Kind Regards!

Violeta
Attachments:
The administrator has disabled public write access.

Prescribed tracers values at closed wall? 9 years 11 months ago #15157

  • jmhervouet
  • jmhervouet's Avatar
Hello,

Sorry for the delay, due to some emergencies. I ran the case and found that in fact the arrays ATAVBOL and BTABOL are even not initialised*, so we have to add before setting values on the 6 points :

DO ITRAC=1,NTRAC
DO IPTFR=1,NPTFR2
DO IPLAN = 1,NPLAN
IBORD = (IPLAN-1)*NPTFR2 + IPTFR
ATABOL%ADR(ITRAC)%P%R(IBORD) =0.D0
BTABOL%ADR(ITRAC)%P%R(IBORD) =0.D0
ENDDO
ENDDO
ENDDO

* because when ATABOL%ADR(ITRAC)%P%TYPR='0' (original implementation in LIMI3D) we don't touch them, but now that we put ATABOL%ADR(ITRAC)%P%TYPR='Q' all the values have to be initialised, not only on your 6 points.


So it runs, at least a few time steps. I noticed that you have many iterations for the dynamic pressure (something difficult somewhere in the mesh), you could try :

1) PRECONDITIONING FOR PPE : 34 (the preconditioner is a direct solver on the vertical)

or

2) SOLVER FOR PPE : 7 (this is GMRES)
OPTION OF SOLVER FOR PPE : 4 or 5

or a combination of 1) and 2)


Let's see what happens...

REgards,

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

Prescribed tracers values at closed wall? 9 years 11 months ago #15163

  • 716469
  • 716469's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 303
  • Thank you received: 6
Thank you so much Jean-Michel. I will do as you say. I will keep you posting. Thanks again.

Kind Regards!

Violeta
The administrator has disabled public write access.

Prescribed tracers values at closed wall? 9 years 11 months ago #15198

  • 716469
  • 716469's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 303
  • Thank you received: 6
Dear Jean-Michel,

Thank you so much for helping with this case. Hurrah! It is working. Well, does not show temp exactly I needed but it is my fault with picking wrong coefficient. Salinity values are fine. I have attached few pictures just to show results. I get warm and fresh water at wall instead of cold and fresh:). I will just need to play around with coefficients to get the right values, also velocity are not right but it could be due to wrong choice of coefficients. I have noticed big errors on the tracer1 and 2 on Mass Balance but simulation did not crash. I am not sure if error like 5764834 is considered big in this complicated case. Thank you very much again. I definitely could not do any of this without your help. It is much appreciated.

Kind Regards!

Violeta
Attachments:
The administrator has disabled public write access.

Prescribed tracers values at closed wall? 9 years 11 months ago #15205

  • jmhervouet
  • jmhervouet's Avatar
Hello Violeta,

Congratulations! Yes I noticed the tracer loss, relatively it is not a lot but I have to check if it is due to the new ATABOL and BTABOL, maybe they are not taken into account (in this case and most probably it is just the listing that is wrong).

Regards,

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

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