turbine modelling

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
stage75

Re: turbine modelling

Post by stage75 »

I have not changed the CFL, I left the defaults values in the subroutine "usini1.f90",

Code: Select all

! Courant number
ipp = ipppro(ipproc(icour(iphas)))
nomvar(ipp)   = 'CFL'
ichrvr(ipp)   = 1
ilisvr(ipp)   = 0
ihisvr(ipp,1) = -1
I will make the simulation complete and I give the error
stage75

Re: turbine modelling

Post by stage75 »

I redid the simulation by setting the turbine as walls, Here are the complete files "listing1 and 2" .. it does not specify the error

Thanks
Attachments
listing2.txt
(28.06 KiB) Downloaded 262 times
listing1.txt
(28.13 KiB) Downloaded 253 times
JamesMcNaughton
Posts: 72
Joined: Mon Mar 19, 2012 1:21 pm

Re: turbine modelling

Post by JamesMcNaughton »

The Courant number is not set how you suggest, that is merely defining an output.

If you're keeping parameters the same but shrinking the cell size you will also need to reduce your time-step to keep the same CFL.

Given that your simulation ran previously and you have only changed the mesh then you should look at the mesh quality and try reducing your time-step. You can try other things but these would be my first suggestion.
stage75

Re: turbine modelling

Post by stage75 »

Hi James and Thank's lot for your help and suggestion,

In my geometry I don't have the fluid outlet, my geometry is a domain all closed except the top surface of the tank which is open but it's not an outlet?.

FOr the CFL I do not know how to handle it, I leave the default value if it does not matter?

OK I will change the time step, to obtain the vortex I also tried changing the subroutine "ussatc.f90" Because I think it is the coupling which is not taken into account I do not know how the managed this coupling !
JamesMcNaughton
Posts: 72
Joined: Mon Mar 19, 2012 1:21 pm

Re: turbine modelling

Post by JamesMcNaughton »

If you think the coupling is a problem then I think you could (as I previously suggested) make a simpler example in 2D. This way it will be easier to find where the problems are.

Afraid I cannot provide help with coupling as I do not use it any more.

Having no outlet is fine, just give the surface a symmetry condition.
stage75

Re: turbine modelling

Post by stage75 »

Normally I need to get some vortex, in the vicinity of the blades and baffles, that looks like this case of "pisolino":

http://code-saturne.org/forum/viewtopic ... 7&start=10
stage75

Re: turbine modelling

Post by stage75 »

Hello,

You know what to do when you receive this error? (NON CONVERGENCE DE GRADRC )
What is the parameter to be changed in the subroutine so that it converges!!
Thanks

Code: Select all

GRADRC ISWEEP =  100 RESIDU NORME:  0.5294E+00 NORME:  0.9251E-11
 PARAMETRE IVAR =    0
@                                                            
@ @@ ATTENTION :         NON CONVERGENCE DE GRADRC           
@    =========                                               
@                                                            

Jacobi [Turb Dis] : divergence après 2 itérations :
  résidu initial :  3.1290e+19 ; résidu courant :  5.8071e+23

Bilan des écritures de "chr" (MED_fichier) :

  Temps CPU pour les maillages :           0.008
  Temps CPU pour les champs :              0.000

  Temps écoulé pour les maillages :        0.007
  Temps écoulé pour les champs :           0.000

Bilan des écritures de "error" (MED_fichier) :

  Temps CPU pour les maillages :           0.008
  Temps CPU pour les champs :              0.008

  Temps écoulé pour les maillages :        0.007
  Temps écoulé pour les champs :           0.006


/home/itouche/Téléchargements/tmp/installer/ncs-2.0.4/src/base/cs_sles.c:1746: Erreur fatale.

Jacobi: error (divergence) solving for Turb Dis


Pile d'appels :
   1: 0x7fa215b02a17 <reslin_+0x237>                  (libsaturne.so.0)
   2: 0x7fa215c738d0 <invers_+0x250>                  (libsaturne.so.0)
   3: 0x7fa215b29783 <codits_+0x14e3>                 (libsaturne.so.0)
   4: 0x7fa215cf2334 <turbke_+0x7188>                 (libsaturne.so.0)
   5: 0x7fa215ce7a24 <tridim_+0xb594>                 (libsaturne.so.0)
   6: 0x7fa215b1ac25 <caltri_+0x5085>                 (libsaturne.so.0)
   7: 0x7fa215af5ac3 <cs_run+0x843>                   (libsaturne.so.0)
   8: 0x7fa215af5da5 <main+0x1f5>                     (libsaturne.so.0)
   9: 0x7fa213763c4d <__libc_start_main+0xfd>         (libc.so.6)
  10: 0x40be69     <>                               (cs_solver)
Fin de la pile
stage75

Re: turbine modelling

Post by stage75 »

I try to change the convergence criteria "underelaxation" but I found nothing in the subroutine "usini1.f90"
JamesMcNaughton
Posts: 72
Joined: Mon Mar 19, 2012 1:21 pm

Re: turbine modelling

Post by JamesMcNaughton »

Try changing gradient reconstruction to least squares by partial extended neighbourhood.

Write in usini1 (in the usipsu subroutine, i.e. near where you set the time-step): imrgra = 3.

You currently have it to solve by iterative reconstruction of non-orthogonalities. If you want to stick with this but initialise it better try imrgra = 4.

Check the user and theory manuals for a description of this.

Also I asked questions on this in the last forum - I think post s have been copied over so try searching for imrgra if you want more discussions..

Also if you want to change any under-relaxation from the user guide just type it into usini1 (in usipsu) and it will work. They have left out some of the options like this I assume as many users won't need / look at them and it can be quite daunting to have 100s of options for a simple case.
stage75

Re: turbine modelling

Post by stage75 »

Thank's James ,

Firstly in my "SRC.1 and 2" I have only three subroutines (usclim (defined my BC), usini1(all parametres) and ussatc(coupling)) it is lack other subroutines?

THen I made the changes you have proposed, is this right please?

I write (imrgra in "usipsu subroutine" then I write "imrgra in "arguments "integer imrgra" then I put just below "reference time step" ?? it's right or not


Code: Select all

subroutine usipsu &
!================

 ( nmodpp , iverif , [b]imrgra[/b] )

!===============================================================================
! Purpose:
! -------

! User subroutine for the input of additional user parameters.

!-------------------------------------------------------------------------------
! Arguments
!__________________.____._____.________________________________________________.
! name             !type!mode ! role                                           !
!__________________!____!_____!________________________________________________!
! nmodpp           ! i  ! <-- ! number of active specific physics models       !
! iverif           ! i  ! <-- ! flag for elementary tests                      !
!__________________!____!_____!________________________________________________!

!     Type: i (integer), r (real), s (string), a (array), l (logical),
!           and composite types (ex: ra real array)
!     mode: <-- input, --> output, <-> modifies data, --- work array
!===============================================================================

implicit none

!===============================================================================

! Arguments

integer nmodpp
integer iverif
[b]integer imrgra[/b]

! Local variables

integer iphas, iutile, ii, jj, imom

!===============================================================================

!     This subroutine allows setting parameters

!       which do not already appear in the other subroutines of this file.


!     It is possible to add or remove parameters.


!     The number of physical properties and variables is known here.


!     If we are using the Code_Saturne GUI:

!       we will find in the user subroutines commented examples
!       on the model of the present section.

!       If necessary, the user may uncomment them and adapt them to
!       his needs.

===============================================================================

! Calculation options (optcal.h)
! ==============================

! --- Calculation restart: isuite (= 1) or not (0)
!     In case of restart, read auxiliary restart file ileaux (= 1) or not (0).


isuite = 0
ileaux = 1

! --- Duration
!       ntmabs = absolute number of the last time step required
!         if we have already run 10 time steps and want to
!         run 10 more, ntmabs must be set to 10 + 10 = 20


ntmabs = 10


! --- Reference time step
!     The example given below is probably not adapted to your case.

dtref  = 1.d-2
[b]
imrgra = 4.d0[/b]

 
! --- Maximum time step: dtmax
!     Set a value base on characteristic values of your case.
!      otherwise, the code will use a multiple of dtref by default.
!     Example with
!        Ld: "dynamic" length (for example, the domain length)
!        Ud: characteristic flow velocity
!        Lt: thermal length (for example, the domain height gravity-wise)
!        Delta_rho/rho: relative density difference
!        g: gravity acceleration

!     dtmax = min(Ld/Ud, sqrt(Lt/(g.Delta_rho/rho)))
Post Reply