Calculating gradient of pressure

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
JamesMcNaughton
Posts: 72
Joined: Mon Mar 19, 2012 1:21 pm

Calculating gradient of pressure

Post by JamesMcNaughton »

Hi,

I am having problems calculating the pressure gradient in v2.2. Should I be using grdcel or grdpot? What is the difference between these subroutines?

Thanks,

James
Martin FERRAND
Posts: 48
Joined: Wed Mar 14, 2012 10:06 am

Re: Calculating gradient of pressure

Post by Martin FERRAND »

Hello James,

to compute the gradient of any potential field (such as the pressure field) use grdpot, to compute the gradient of any scalar field which is not a potential (such as the Temperature) use grdcel, and to compute the gradient of vector fields (such as the velocity or the mesh velocity) use grdvec.
The difference reads on the fact that for a potential field we do specific treatment (for instance we could add a linear field to it...).

Cheers,

Martin
JamesMcNaughton
Posts: 72
Joined: Mon Mar 19, 2012 1:21 pm

Re: Calculating gradient of pressure

Post by JamesMcNaughton »

Thanks Martin it all makes more sense now!
Post Reply