cs user source terme

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
flyer
Posts: 18
Joined: Mon Mar 26, 2012 2:37 pm

cs user source terme

Post by flyer »

Hello
I ask you for help because I have problems with the new version of saturne CS3 in the applications of ustsns in cs-usersouceterm and the user-boundary. I have adapted the subroutine to this new version, they work in first sight! but after (1000 iteration)get back with my results but without the source term or CB. I noticed that the source term and BC were not taken into consideration even if the calculations are displayed without errors
in Compil.log file it displays Warning: Unused dummy argument 'ckupdc' at (1) smacel (I will send as an attachment) and other error
I then used the default cs-usersouceterm (the ustsns part) in SRC reference and it's the same thing it does not taking account the subroutine

I think, I miss something during installation allowing a saturne to compile correctly, but I do not know what??
compil.log
if you have an idea thank you
Attachments
compile.log
(3.23 KiB) Downloaded 173 times
Yvan Fournier
Posts: 4080
Joined: Mon Feb 20, 2012 3:25 pm

Re: cs user source terme

Post by Yvan Fournier »

Hello,

The warning about "dummy arguments" is not a problem.

I don not know what source terms you are trying to define, or what boundary conditions you are using. With version 3.0, be careful with velocity source terms: with the default coupled velocity components (ivelco=1), you must use ustsnv instead of ustsns (both in cs_user_source_terms.f90).

So if you program the wrong function, your source terms will be ignored.

Regards,

Yvan
flyer
Posts: 18
Joined: Mon Mar 26, 2012 2:37 pm

Re: cs user source terme

Post by flyer »

hello
thank you for your response
for term source I used a constant source term S=AU+B A=0 B=cst
crvimp(iel) = 0.d0 crvexp(1,iel)=cst

if (ivar.eq.iu .or. ivar.eq.iv .or. ivar.eq.iw) then
qdm = 100.d0
call getcel('rot', nlelt, lstelt)
do iel = 1, nlet
crvimp(1,1,iel) = 0.0d0
enddo
do iel = 1, nlet
crvexp(1,iel) = 0.5d0*propce(iel,ipcrom)*volume(iel)*qdm
enddo
endif

and the boundary conditions I used a logarithmic velocity profile at the inlet in the same way that the 2.0.5 version that went very well

I used again ustsnv given default and it's the same mistakes in compil.log

if (.true.) return
! ----------------------------------------------
ckp = 10.d0
qdm = 100.d0
do iel = 1, ncel
crvimp(1,1,iel) = - volume(iel)*propce(iel,ipcrom)*ckp
enddo
do iel = 1, ncel
crvexp(1,iel) = volume(iel)*qdm
enddo

in compil.log i get :

/home/nedjari/ustv/CASE1/RESU/20130429-0940/src_saturne/cs_user_source_terms.f90:117.9:
ckupdc , smacel , &
1
Warning: Unused dummy argument 'ckupdc' at (1)
/home/nedjari/ustv/CASE1/RESU/20130429-0940/src_saturne/cs_user_source_terms.f90:116.5:

dt , rtpa , propce , propfa , propfb , &
1
Warning: Unused dummy argument 'dt' at (1)
/home/nedjari/ustv/CASE1/RESU/20130429-0940/src_saturne/cs_user_source_terms.f90:115.9:

icepdc , icetsm , itypsm , &
1
Warning: Unused dummy argument 'icepdc' at (1)
/home/nedjari/ustv/CASE1/RESU/20130429-0940/src_saturne/cs_user_source_terms.f90:115.18:

icepdc , icetsm , itypsm , &
1
Warning: Unused dummy argument 'icetsm' at (1)
/home/nedjari/ustv/CASE1/RESU/20130429-0940/src_saturne/cs_user_source_terms.f90:115.27:

icepdc , icetsm , itypsm , &
1
Warning: Unused dummy argument 'itypsm' at (1)
/home/nedjari/ustv/CASE1/RESU/20130429-0940/src_saturne/cs_user_source_terms.f90:113.17:

( nvar , nscal , ncepdp , ncesmp , &
thank you
Yvan Fournier
Posts: 4080
Joined: Mon Feb 20, 2012 3:25 pm

Re: cs user source terme

Post by Yvan Fournier »

Hello,

Guess what :

Code: Select all

if (.true.) return
does...

Regards,

Yvan
flyer
Posts: 18
Joined: Mon Mar 26, 2012 2:37 pm

Re: cs user source terme

Post by flyer »

thank's
it's always the same thing even without the if (. true.) return
I send you my subroutine and file compil.log
when installing my cs3, it given an error in cgns instal and it proposed to installed - without-cgns!!! is that it is causing problem ???

thank you very very much
compile.log
(2.92 KiB) Downloaded 165 times
cs_user_source_terms.f90
(12.39 KiB) Downloaded 218 times
Yvan Fournier
Posts: 4080
Joined: Mon Feb 20, 2012 3:25 pm

Re: cs user source terme

Post by Yvan Fournier »

Hello,

You are not applying the source term to the correct cells:

You should not have:

Code: Select all

call getcel('rotor', nlet, lstelt)
  do iel = 1, nlet
     crvimp(iel) = 0.d0
  enddo

  do iel = 1, nlet
     crvexp(iel) =-0.5d0*propce(iel,ipcrom)*volume(iel)*qdm
  enddo
But:

Code: Select all

  do iel = 1, ncel
     crvimp(iel) = 0.d0
  enddo

  call getcel('rotor', nlet, lstelt)
  do ielt = 1, nlet
    iel = lstelt(ielt)
    crvexp(iel) =-0.5d0*propce(iel,ipcrom)*volume(iel)*qdm
  enddo
Regards,

Yvan
Post Reply