Page 1 of 1

problem with 'ustsns.f90' subroutine

Posted: Mon Sep 17, 2012 1:57 pm
by adumon
Hello

I'm working with v2.3.1

When I try to add the subroutine 'ustsns.f90' in the SRC I get the following error :

/Calcul/Apps2/saturne4.2.4/v231/lib/libsaturne.a(cs_user_source_terms.o): In function `ustsns_':

../../../cs231srcv2/src/user/cs_user_source_terms.f90:(.text+0x0): multiple definition of `ustsns_'

cs_user_source_terms.o:/Recherche/Calcul/adumon01/Saturne/essai/CHENG/RESU/20120917-1421/src_saturne/cs_user_source_terms.f90:(.text+0x0): first defined here

So I don't know how to add user source terms to the Navier-Stokes equations without this function.

Thank you.

Antoine

Re: problem with 'ustsns.f90' subroutine

Posted: Mon Sep 17, 2012 3:37 pm
by JamesMcNaughton
Hi Antoine

The file cs_user_source_terms.f90 is the new name for ustsns.f90 - if you open cs_user_source_terms.f90 you will see the subroutine called ustsns.

So the modifications you want to make you should do in cs_user_source_terms.f90

Hope that helps,

James

Re: problem with 'ustsns.f90' subroutine

Posted: Mon Sep 17, 2012 5:00 pm
by Jacques Fontaine
Hello,

James is right. And in 2.3v velocity components are coupled by default (ivelco = 1) so you must add your source term in cs_user_source_terms.f90 in the subroutine ustsnv.
Regards,

Re: problem with 'ustsns.f90' subroutine

Posted: Tue Sep 18, 2012 8:57 am
by adumon
Thank you for your response,

I try to convert a modification made in this subroutine for the previous version of Saturne.
I want to add the "pushing term" related to the Boussinesq approximation on the second component of the velocitie (in the y-direction). On the previous version of Saturne I had to write ( in ustsns.F subroutine) the following lines :

Code: Select all

	iphas=1
	richardson=10.0

	if (ivar.eq.iv(iphas)) then
	  ivart = isca(iscalt(iphas))
	  ivart = isca(1)

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

	  do iel = 1, ncel
	     crvexp(iel) = richardson*rtpa(iel,ivart)*volume(iel)
	  enddo

	endif
I can not seem to find the equivalent variable names in the new version. Could you help me ?

Thanks

Re: problem with 'ustsns.f90' subroutine

Posted: Wed Sep 19, 2012 2:14 pm
by adumon
Sorry,
I have find the answer. I had to put a "2" (as the y-coordinate) in the crvexp argument.

crvexp(2,iel) = ....

Thank you