CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   STAR-CCM+ (http://www.cfd-online.com/Forums/star-ccm/)
-   -   User defined field function. (http://www.cfd-online.com/Forums/star-ccm/128872-user-defined-field-function.html)

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

Regards
Karthik

flotus1 January 23, 2014 06:58

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

http://en.wikipedia.org/wiki/Vector_projection

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 14:42.