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

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
Christophe Loubet

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

Post 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
Yohann Eude
Posts: 19
Joined: Mon Aug 12, 2013 9:36 am

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

Post 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
husanhao
Posts: 41
Joined: Thu Jul 10, 2014 9:17 am

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

Post 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
Yvan Fournier
Posts: 4208
Joined: Mon Feb 20, 2012 3:25 pm

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

Post 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
husanhao
Posts: 41
Joined: Thu Jul 10, 2014 9:17 am

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

Post 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
Yvan Fournier
Posts: 4208
Joined: Mon Feb 20, 2012 3:25 pm

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

Post by Yvan Fournier »

Hello,

Yes, that's right.

Regards,

Yvan
husanhao
Posts: 41
Joined: Thu Jul 10, 2014 9:17 am

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

Post by husanhao »

Dear Yvan,

Got it, thank you~ :D

Best Regards
Eric
Post Reply