Page 1 of 1

Geometric variables and user array from CS 2.0 to 3.0 or 4.0

Posted: Tue Dec 02, 2014 11:35 pm
by Christophe Loubet
Hello,

I would like to use my C-S 2.0 code in C-S 3.0 and after 4.0 but I don't know how to rename some variables for new versions like:
ra(isrfan+ifac-1) (c.f. Code Saturne version 2.0.7 practical user’s guide p43.)
and:
rtuser(ncelet+ifacel(1,ifac))

Could someone give me please suggestions? Thank you.

Christophe

Re: Geometric variables and user array from CS 2.0 to 3.0 or

Posted: Tue Dec 09, 2014 3:42 pm
by Yohann Eude
Hello,

For the ra() variable which manages all geometric variables, you can compare the section 5.2 of the doc v2 with the section 3.9.3.2 of the doc v3 to find the variable(s) you need:
http://code-saturne.org/cms/sites/defau ... 0/user.pdf
http://code-saturne.org/cms/sites/defau ... 0/user.pdf

rtuser() was an user array in the version 2 and now, you can create the yours in the user_modules.f90 in the version 3 and +.
(cf. section 5.5 for the version 2 and section 3.9.3.5 for the version 3)

Regards,

Yohann

Re: Geometric variables and user array from CS 2.0 to 3.0 or

Posted: Wed Feb 04, 2015 7:53 am
by husanhao
Dear all, the following are my question, if anyone know the answer, please help, thanks.

1. Where is the surface of an internal face ifac be stored in CS 3.0?
According to the Code_saturne version 2.0.7 practical user's guide (p43), the surface of an internal face ifac is stored in ra(isrfan+ifac-1), however, in the CS 3.0, some geometric variables type are changed from (integer) to [ra] (real array) such as isrfan. So, I would like to know where is the internal face ifac be stored in CS3.0? Is ifac stored in surfan(nfac)?

2. User array in CS3.0
Can I follow the following step to use the user array in CS3.0?
(1) Declare all variables, such as rtuser in the routine “cs_user_modeules.f90”
(2) Adding the line “use user_module” in all subroutines in the module files list.

Thanks for your help

Best Regards
Eric

Re: Geometric variables and user array from CS 2.0 to 3.0 or

Posted: Wed Feb 04, 2015 10:36 am
by Yvan Fournier
Hello,

1) I do not understand your question: ifac is a local face id, not a "face".
surfan(ifac) contains the surface of face 1 <= ifac <= nfac
(replacing ra(isrfan+ifac-1) from version 2.0).

2) Yes, this should work.

Regards,

Yvan

Re: Geometric variables and user array from CS 2.0 to 3.0 or

Posted: Wed Feb 04, 2015 8:15 pm
by husanhao
Dear Yvan,

Thanks for your reply. So, ra(isrfan+ifac-1) in CS2.0 is replaced by surfan(ifac) in CS 3.0, is that right?

Thanks for your answer

Best Regards
Eric

Re: Geometric variables and user array from CS 2.0 to 3.0 or

Posted: Thu Feb 05, 2015 2:01 pm
by Yvan Fournier
Hello,

Yes, that's right.

Regards,

Yvan

Re: Geometric variables and user array from CS 2.0 to 3.0 or

Posted: Fri Feb 06, 2015 4:03 am
by husanhao
Dear Yvan,

Got it, thank you~ :D

Best Regards
Eric