CFD Online Discussion Forums

CFD Online Discussion Forums (
-   STAR-CCM+ (
-   -   User defined field function. (

karthik1413 January 23, 2014 05:53

User defined field function.
Hello all i want to write a user defined field function for the streamwise pressure gradient.(I am trying to refine mesh based on the field functions).I have extracted the apparent pressure gradient by using the temporary storage retained feature.Can someone please help me to define the "streamwise pressure gradient" using the apparent pressure gradient.Thanks


flotus1 January 23, 2014 06:58

Isnt that simply projecting the pressure gradient vector onto the velocity vector?

karthik1413 January 23, 2014 08:03

Yes!!!!!!!!!! Thank you got it!!

karthik1413 January 23, 2014 11:31

(/(+(+(* $${Velocity}[0] $${ApparentPressureGradient}[0]) (* $${Velocity}[1] $${ApparentPressureGradient}[1])) (* $${Velocity}[2] $${ApparentPressureGradient}[2])) ${Velocity_0})

this is what i got..

All times are GMT -4. The time now is 19:45.