Search found 106 matches

by Jundi He
Mon Dec 18, 2017 7:49 pm
Forum: code_saturne usage
Topic: How to access to the mass flow of a cross section?
Replies: 17
Views: 6896

Re: How to access to the mass flow of a cross section?

Luciano:

Thanks for the examples. It seems useful for me. I'll try if it works.

Regards!
Jundi
by Jundi He
Mon Dec 18, 2017 5:58 pm
Forum: code_saturne usage
Topic: How to access to the mass flow of a cross section?
Replies: 17
Views: 6896

Re: How to access to the mass flow of a cross section?

Hi Code Saturne develop team: In the script I access the mass flow rate of a certain layer of internal faces, and obtain the summation of the mass flows, then output the total mass flow to a file: call field_get_key_int(ivarfl(ivar), kimasf, iflmas) call field_get_val_s(iflmas, imasfl) do ifac = 1, ...
by Jundi He
Thu Dec 14, 2017 11:38 am
Forum: code_saturne usage
Topic: Fail to compile the thermal source term subroutine
Replies: 4
Views: 2022

Re: Fail to compile the thermal source term subroutine

Yvan:

OK, thanks! I have another question, if I need to access to the z direction velocity, should I use this:

call field_get_val_v(ivarfl(iw), cvar_vel)
zvelocity=cvar_vel(1,iel)

Regards!
Jundi
by Jundi He
Wed Dec 13, 2017 5:42 pm
Forum: code_saturne usage
Topic: Fail to compile the thermal source term subroutine
Replies: 4
Views: 2022

Fail to compile the thermal source term subroutine

Hi Code Saturne develop team: I am using a subroutine to impose the thermal source term for each cell in a channel flow. In the subroutine, I need to use the cell density and velocity (z direction component) to calculate the heat source term. When I try to compile the subroutine, there is an error c...
by Jundi He
Tue Dec 12, 2017 8:06 pm
Forum: code_saturne usage
Topic: How to access to the mass flow of a cross section?
Replies: 17
Views: 6896

Re: How to access to the mass flow of a cross section?

Hi:

Can I visit the current number of iteration in the script? I guess it is another global number which I can directly access. Thanks!

Jundi
by Jundi He
Tue Dec 12, 2017 7:44 pm
Forum: code_saturne usage
Topic: How to access to the mass flow of a cross section?
Replies: 17
Views: 6896

Re: How to access to the mass flow of a cross section?

Thank you, this helps me a lot.

Jundi
by Jundi He
Tue Dec 12, 2017 7:26 pm
Forum: code_saturne usage
Topic: How to access to the mass flow of a cross section?
Replies: 17
Views: 6896

Re: How to access to the mass flow of a cross section?

OK, global variables means that I can directly visit in the scripts.

About the coordinate of the internal faces, if ifac is the face id, and I visit the z coordinate of the face centre:

cdgfac(3,ifac)

is this the correct way? Thanks!

Regards!
Jundi
by Jundi He
Tue Dec 12, 2017 7:12 pm
Forum: code_saturne usage
Topic: How to access to the mass flow of a cross section?
Replies: 17
Views: 6896

Re: How to access to the mass flow of a cross section?

Normally I will use a do loop to all the internal faces: do ifac = 1, nfac can I directly use nfac (the total number of all the faces), or I need to first define it? Another question is that if I have a face id, ifac, can I access to the coordinate of the face centre? Like the way I visit the coordi...