Wall Boundary condition
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
Wall Boundary condition
Hi,
I'm actually trying to model the flow around a blade. To do that, I need to impose in a first time a wall boundary condition on the blade with :
u =0; v =0; w =0.
I wrote the following lines but I would like to have a point of view to be sure as I always have some divergence problems.
CALL GETFBR('Pale',NLELT,LSTELT) DO ILELT = 1, NLELT
IFAC = LSTELT(ILELT) DO IPHAS = 1, NPHAS ITYPFB(IFAC,IPHAS) = IPAROI RCODCL(IFAC,IU(IPHAS),1) = 0.D0 RCODCL(IFAC,IV(IPHAS),1) = 0.D0 RCODCL(IFAC,IW(IPHAS),1) = 0.D0 ENDDO
ENDDO
Thanks for your help.
Gauthier
I'm actually trying to model the flow around a blade. To do that, I need to impose in a first time a wall boundary condition on the blade with :
u =0; v =0; w =0.
I wrote the following lines but I would like to have a point of view to be sure as I always have some divergence problems.
CALL GETFBR('Pale',NLELT,LSTELT) DO ILELT = 1, NLELT
IFAC = LSTELT(ILELT) DO IPHAS = 1, NPHAS ITYPFB(IFAC,IPHAS) = IPAROI RCODCL(IFAC,IU(IPHAS),1) = 0.D0 RCODCL(IFAC,IV(IPHAS),1) = 0.D0 RCODCL(IFAC,IW(IPHAS),1) = 0.D0 ENDDO
ENDDO
Thanks for your help.
Gauthier
Re: Wall Boundary condition
What you have wrote is correct and it is not the reason of your problem, even if the lines:
RCODCL(IFAC,IU(IPHAS),1) = 0.D0
RCODCL(IFAC,IV(IPHAS),1) = 0.D0
RCODCL(IFAC,IW(IPHAS),1) = 0.D0
are not mandatory when you wall is not moving.
As said by César here https://code-saturne.info/products/code-saturne/forums/general-usage/335742424/931852726 your problem seems not come from your setup. May be it is a mesh issue?
Perhaps could you send us your mesh (if it is not confidential and if it is not too big) by a file share web like sendspace for example?
RCODCL(IFAC,IU(IPHAS),1) = 0.D0
RCODCL(IFAC,IV(IPHAS),1) = 0.D0
RCODCL(IFAC,IW(IPHAS),1) = 0.D0
are not mandatory when you wall is not moving.
As said by César here https://code-saturne.info/products/code-saturne/forums/general-usage/335742424/931852726 your problem seems not come from your setup. May be it is a mesh issue?
Perhaps could you send us your mesh (if it is not confidential and if it is not too big) by a file share web like sendspace for example?
Re: Wall Boundary condition
Hi,
Thanks for your help Alexandre.
I shared the mesh on sendspace, the link is : http://www.sendspace.com/file/sw2usa.
Thanks for your help Alexandre.
I shared the mesh on sendspace, the link is : http://www.sendspace.com/file/sw2usa.
Re: Wall Boundary condition
Hi,
as I expected, your trouble is a mesh issue: your mesh is very fine near the blade and very coarse far from the blade, and the variation between little cells and big cells is too sharp for a transient algorithm. Perhaps if you could have a smoother transition the convergence will be easier. It depends also of the purpose of your computation, but a finer mesh will increase the precision of the flow behind the blade.
Nevertheless, I ran a computation with the steady algorithm (IDTVAR = -1) during 500 iterations. Quickly seen, the results seem to be fine. I use the SOLU (Second Order linear upwind, my preferred scheme for full tetrahedral grid) for the velocity, precision of the solver are set to 1e-8, and the gradient is LS with extended neighborhood (IMRGRA = 2). I join the parameters file for a 2.0-rc2 version.
INSTANT 0.500000000E+03 ITERATION NUMERO 500
=============================================================
** INFORMATIONS SUR LE FLUX DE MASSE AU BORD
-----------------------------------------
Phase : 1
---------------------------------------------------------------
Type de bord Code Nb faces Flux de masse
---------------------------------------------------------------
Entree 2 496 -0.282868800E+05
Paroi lisse 5 37066 -0.605438189E-15
Paroi rugueuse 6 0 0.000000000E+00
Symetrie 4 6078 0.000000000E+00
Sortie libre 3 496 0.282868800E+05
Indefini 1 0 0.000000000E+00
---------------------------------------------------------------
** CONDITIONS AUX LIMITES EN PAROI LISSE
----------------------------------------
------------------------------------------------------------
Phase 1 Minimum Maximum
------------------------------------------------------------
Vitesse rel. en paroi uiptn : 0.34811E-02 0.14674E+02
Vitesse de frottement uet : 0.25124E-03 0.86499E+00
Vitesse de frottement uk : 0.94039E-01 0.93037E+00
Distance adimensionnelle yplus : 0.15334E+02 0.28092E+04
------------------------------------------------------
Nbre de retournements de la vitesse en paroi : 0
Nbre de faces en sous couche visqueuse : 0
Nbre de faces de paroi total : 37066
------------------------------------------------------------
Sortie finale de fichiers suite
Sauvegarde a l'iteration 500, Temps physique 0.50000E+03
** Ecriture du fichier suite principal
-----------------------------------
Debut de l'ecriture
Fin de l'ecriture des dimensions
Fin de l'ecriture des options
Fin de l'ecriture des variables principales
Fin de l'ecriture
** Ecriture du fichier suite auxiliaire
------------------------------------
Debut de l'ecriture
Fin de l'ecriture des dimensions et des options
Fin de l'ecriture des proprietes physiques
Fin de l'ecriture du pas de temps
Fin de l'ecriture des flux de masse
Fin de l'ecriture des conditions aux limites
Fin de l'ecriture
Temps CPU pour les fichiers suite : 0.20001E+00
** INFORMATIONS SUR LA CONVERGENCE
-------------------------------
---------------------------------------------------------------
Variable Norm 2nd mb. Nbiter Residu norme derive
---------------------------------------------------------------
c Pression 0.16083E+01 347 0.84608E-08 0.10957E+00
c VitesseX 0.22156E+05 58 0.87225E-08 0.33693E-03
c VitesseY 0.11922E+03 82 0.89696E-08 0.53953E-04
c VitesseZ 0.18269E+03 92 0.95161E-08 0.29163E-03
c EnerTurb 0.83802E+03 53 0.89592E-08 0.23097E-06
c Dissip 0.23686E+04 51 0.94801E-08 0.48961E-04
---------------------------------------------------------------
** INFORMATIONS SUR LES VARIABLES
------------------------------
---------------------------------------------------------------
Variable Valeur min Valeur max Clip min Clip max
---------------------------------------------------------------
v Pression -0.16475E+03 0.79127E+02 -- --
v VitesseX -0.17552E+02 0.29422E+01 -- --
v VitesseY -0.36818E+01 0.57455E+01 -- --
v VitesseZ -0.88082E+01 0.88958E+01 -- --
v EnerTurb 0.12383E-01 0.31392E+01 0 0
v Dissip 0.21329E-02 0.13377E+03 0 0
v ViscTurb 0.12733E-03 0.79008E-01 0 0
v total_pressu 0.10116E+06 0.10140E+06 0 0
---------------------------------------------------------------
** INFORMATIONS SUR LES CLIPPINGS
------------------------------
---------------------------------------------------------------
Variable Min ss clips Max ss clips Clip min Clip max
---------------------------------------------------------------
a EnerTurb 0.12383E-01 0.31392E+01 0 0
a Dissip 0.21329E-02 0.13377E+03 0 0
---------------------------------------------------------------
TEMPS CPU POUR L'ITERATION 500 : 0.86485E+01
as I expected, your trouble is a mesh issue: your mesh is very fine near the blade and very coarse far from the blade, and the variation between little cells and big cells is too sharp for a transient algorithm. Perhaps if you could have a smoother transition the convergence will be easier. It depends also of the purpose of your computation, but a finer mesh will increase the precision of the flow behind the blade.
Nevertheless, I ran a computation with the steady algorithm (IDTVAR = -1) during 500 iterations. Quickly seen, the results seem to be fine. I use the SOLU (Second Order linear upwind, my preferred scheme for full tetrahedral grid) for the velocity, precision of the solver are set to 1e-8, and the gradient is LS with extended neighborhood (IMRGRA = 2). I join the parameters file for a 2.0-rc2 version.
INSTANT 0.500000000E+03 ITERATION NUMERO 500
=============================================================
** INFORMATIONS SUR LE FLUX DE MASSE AU BORD
-----------------------------------------
Phase : 1
---------------------------------------------------------------
Type de bord Code Nb faces Flux de masse
---------------------------------------------------------------
Entree 2 496 -0.282868800E+05
Paroi lisse 5 37066 -0.605438189E-15
Paroi rugueuse 6 0 0.000000000E+00
Symetrie 4 6078 0.000000000E+00
Sortie libre 3 496 0.282868800E+05
Indefini 1 0 0.000000000E+00
---------------------------------------------------------------
** CONDITIONS AUX LIMITES EN PAROI LISSE
----------------------------------------
------------------------------------------------------------
Phase 1 Minimum Maximum
------------------------------------------------------------
Vitesse rel. en paroi uiptn : 0.34811E-02 0.14674E+02
Vitesse de frottement uet : 0.25124E-03 0.86499E+00
Vitesse de frottement uk : 0.94039E-01 0.93037E+00
Distance adimensionnelle yplus : 0.15334E+02 0.28092E+04
------------------------------------------------------
Nbre de retournements de la vitesse en paroi : 0
Nbre de faces en sous couche visqueuse : 0
Nbre de faces de paroi total : 37066
------------------------------------------------------------
Sortie finale de fichiers suite
Sauvegarde a l'iteration 500, Temps physique 0.50000E+03
** Ecriture du fichier suite principal
-----------------------------------
Debut de l'ecriture
Fin de l'ecriture des dimensions
Fin de l'ecriture des options
Fin de l'ecriture des variables principales
Fin de l'ecriture
** Ecriture du fichier suite auxiliaire
------------------------------------
Debut de l'ecriture
Fin de l'ecriture des dimensions et des options
Fin de l'ecriture des proprietes physiques
Fin de l'ecriture du pas de temps
Fin de l'ecriture des flux de masse
Fin de l'ecriture des conditions aux limites
Fin de l'ecriture
Temps CPU pour les fichiers suite : 0.20001E+00
** INFORMATIONS SUR LA CONVERGENCE
-------------------------------
---------------------------------------------------------------
Variable Norm 2nd mb. Nbiter Residu norme derive
---------------------------------------------------------------
c Pression 0.16083E+01 347 0.84608E-08 0.10957E+00
c VitesseX 0.22156E+05 58 0.87225E-08 0.33693E-03
c VitesseY 0.11922E+03 82 0.89696E-08 0.53953E-04
c VitesseZ 0.18269E+03 92 0.95161E-08 0.29163E-03
c EnerTurb 0.83802E+03 53 0.89592E-08 0.23097E-06
c Dissip 0.23686E+04 51 0.94801E-08 0.48961E-04
---------------------------------------------------------------
** INFORMATIONS SUR LES VARIABLES
------------------------------
---------------------------------------------------------------
Variable Valeur min Valeur max Clip min Clip max
---------------------------------------------------------------
v Pression -0.16475E+03 0.79127E+02 -- --
v VitesseX -0.17552E+02 0.29422E+01 -- --
v VitesseY -0.36818E+01 0.57455E+01 -- --
v VitesseZ -0.88082E+01 0.88958E+01 -- --
v EnerTurb 0.12383E-01 0.31392E+01 0 0
v Dissip 0.21329E-02 0.13377E+03 0 0
v ViscTurb 0.12733E-03 0.79008E-01 0 0
v total_pressu 0.10116E+06 0.10140E+06 0 0
---------------------------------------------------------------
** INFORMATIONS SUR LES CLIPPINGS
------------------------------
---------------------------------------------------------------
Variable Min ss clips Max ss clips Clip min Clip max
---------------------------------------------------------------
a EnerTurb 0.12383E-01 0.31392E+01 0 0
a Dissip 0.21329E-02 0.13377E+03 0 0
---------------------------------------------------------------
TEMPS CPU POUR L'ITERATION 500 : 0.86485E+01
- Attachments
-
- pale.xml
- (5.59 KiB) Downloaded 258 times
Re: Wall Boundary condition
Thanks Alexandre for your help.
I start a calculation with your .xml file on a laptop with the v 2.0 of the code Saturne but it's not the best computer to do this type of calculation (small number of processors). I have access to a server to do bigger calculation, but with Code_Saturne v1.3.3. I'm trying to check all parameters to rewrite subroutines and I have noticed that you changed the scheme for velocity : SOLU (second order linear upwind). I found in the subroutine iniini.F, that I can modify this parameter, but by changing ISCHCV = 0, I apply the scheme SOLU to : Pressure, Velocity EnerTurb and Dissip.
How can I set a different scheme on each parameter ?
C --- Schema convectif C (a decider, centre-upwind si ordre 2, test de pente a decider) C DO II = 1, NVARMX BLENCV(II) = -999.D0 ENDDO DO II = 1, NVARMX ISCHCV(II) = 0 ISSTPC(II) = -999 ENDDO
I will post some result views if I have a convergent calculation.
Gauthier
I start a calculation with your .xml file on a laptop with the v 2.0 of the code Saturne but it's not the best computer to do this type of calculation (small number of processors). I have access to a server to do bigger calculation, but with Code_Saturne v1.3.3. I'm trying to check all parameters to rewrite subroutines and I have noticed that you changed the scheme for velocity : SOLU (second order linear upwind). I found in the subroutine iniini.F, that I can modify this parameter, but by changing ISCHCV = 0, I apply the scheme SOLU to : Pressure, Velocity EnerTurb and Dissip.
How can I set a different scheme on each parameter ?
C --- Schema convectif C (a decider, centre-upwind si ordre 2, test de pente a decider) C DO II = 1, NVARMX BLENCV(II) = -999.D0 ENDDO DO II = 1, NVARMX ISCHCV(II) = 0 ISSTPC(II) = -999 ENDDO
I will post some result views if I have a convergent calculation.
Gauthier
Re: Wall Boundary condition
Hi,
First, I advise you to not modify iniini.F, but only usini1.F. You should apply SOLU only for the velocity. For the Pressure do not change anything, and the turbulent variables should keep the Upwind scheme.
Therefore, in usini1.F you should write (see users doc p 128):
BLENCV(IU(1))= 1.d0
BLENCV(IV(1))= 1.d0
BLENCV(IW(1))= 1.d0
ISCHCV(IU(1)) = 0
ISCHCV(IV(1)) = 0
ISCHCV(IW(1)) = 0
First, I advise you to not modify iniini.F, but only usini1.F. You should apply SOLU only for the velocity. For the Pressure do not change anything, and the turbulent variables should keep the Upwind scheme.
Therefore, in usini1.F you should write (see users doc p 128):
BLENCV(IU(1))= 1.d0
BLENCV(IV(1))= 1.d0
BLENCV(IW(1))= 1.d0
ISCHCV(IU(1)) = 0
ISCHCV(IV(1)) = 0
ISCHCV(IW(1)) = 0
Re: Wall Boundary condition
Hi,
Thanks, I wrote this lines in usini1.F, and I can notice modifications in the listing file. I have an other question concerning the multigrid activation for a parameter as I saw that you activated multigrid for pressure. I changed the file usini1.F as following, but I notice a modification on X-velocity and not the pressure in the listing file, why ?
IPHAS = 1 C C variable pression IPP = IPPRTP(IPR (IPHAS)) NOMVAR(IPP) = 'Pression' IMGR(IPP) = 1 ICHRVR(IPP) = 1 ILISVR(IPP) = 1 IHISVR(IPP,1) = -1 C C variable v1x IPP = IPPRTP(IU (IPHAS)) NOMVAR(IPP) = 'VitesseX' ICHRVR(IPP) = 1 ILISVR(IPP) = 1 IHISVR(IPP,1) = -1
Thanks.
Gauthier
Thanks, I wrote this lines in usini1.F, and I can notice modifications in the listing file. I have an other question concerning the multigrid activation for a parameter as I saw that you activated multigrid for pressure. I changed the file usini1.F as following, but I notice a modification on X-velocity and not the pressure in the listing file, why ?
IPHAS = 1 C C variable pression IPP = IPPRTP(IPR (IPHAS)) NOMVAR(IPP) = 'Pression' IMGR(IPP) = 1 ICHRVR(IPP) = 1 ILISVR(IPP) = 1 IHISVR(IPP,1) = -1 C C variable v1x IPP = IPPRTP(IU (IPHAS)) NOMVAR(IPP) = 'VitesseX' ICHRVR(IPP) = 1 ILISVR(IPP) = 1 IHISVR(IPP,1) = -1
Thanks.
Gauthier
Re: Wall Boundary condition
The multigrid algorithm is a prototype in version 1.3.3. If you want to try it, write:
IMGR(IPR(1)) = 1
but if you need it in order to save CPU time you should prefer use version 2.0-rc2
IMGR(IPR(1)) = 1
but if you need it in order to save CPU time you should prefer use version 2.0-rc2
Re: Wall Boundary condition
Hi,
I restart a calculation after creating a new case. I don't touch to the inini.F routine as you adviced. But, I don't know how to change the gradient like LS with extended neighborhood (IMRGRA = 2) in the subroutine usini1.F.
I restart a calculation without this modification (with the standard configuration : IMRGRA = 0) but it looks to be diverging with the v1.3.3.Nevertheless, I obtained the result with the v2.0 and it's well converged but I would like to work with the v1.3.3 as I can use bigger porcessors to do LES calculation.
Big thank for your help.
Gauthier
I restart a calculation after creating a new case. I don't touch to the inini.F routine as you adviced. But, I don't know how to change the gradient like LS with extended neighborhood (IMRGRA = 2) in the subroutine usini1.F.
I restart a calculation without this modification (with the standard configuration : IMRGRA = 0) but it looks to be diverging with the v1.3.3.Nevertheless, I obtained the result with the v2.0 and it's well converged but I would like to work with the v1.3.3 as I can use bigger porcessors to do LES calculation.
Big thank for your help.
Gauthier
Re: Wall Boundary condition
Just write "IMRGRA = 2" in usini1 (subroutine USIPSU).
Warning, this mesh is actually absolutely not convenient for LES! LES requires a very hight grid's quality.
Warning, this mesh is actually absolutely not convenient for LES! LES requires a very hight grid's quality.