# Writing Equation

 Register Blogs Members List Search Today's Posts Mark Forums Read

 May 20, 2014, 03:23 Writing Equation #1 New Member   Join Date: Mar 2014 Posts: 23 Rep Power: 3 Dear Friends, I have to calculate an expression which includes a term as written below: |Ui-Vi| Where Ui and Vi are velocity vectors of gas and particles. Could you plz suggest me how to write these vectors in expression. In results I found velocities in x, y and z direction available in drop down list. Thanks

 May 20, 2014, 03:37 #2 Senior Member   Matthias Voß Join Date: Mar 2009 Location: Berlin, Germany Posts: 446 Rep Power: 11 Subtract each component and save them in an Expression myVelU = Fluid.Velocity u - Gas.Velocity u myVelV =... myVelW=... and create a User Variable Vector from these 3 components. Or you can skip the variable and apply the norm directly to you expression like myVelNorm = sqrt((myVelU)^2 +....)

May 20, 2014, 03:54
#3
New Member

Join Date: Mar 2014
Posts: 23
Rep Power: 3
Quote:
 Originally Posted by mvoss Subtract each component and save them in an Expression myVelU = Fluid.Velocity u - Gas.Velocity u myVelV =... myVelW=... and create a User Variable Vector from these 3 components. Or you can skip the variable and apply the norm directly to you expression like myVelNorm = sqrt((myVelU)^2 +....)

Dear Matthias,

"myVelNorm = sqrt((myVelU)^2 +....)"

At the same time could you plz suggest me on how to create a User Variable Vector?

Regards

 May 20, 2014, 04:00 #4 Senior Member   Matthias Voß Join Date: Mar 2009 Location: Berlin, Germany Posts: 446 Rep Power: 11 In CFD-Post--> click on Create Variable (little alpha) and select vector instead of scalar.

May 20, 2014, 04:04
#5
New Member

Join Date: Mar 2014
Posts: 23
Rep Power: 3
Quote:
 Originally Posted by mvoss In CFD-Post--> click on Create Variable (little alpha) and select vector instead of scalar.

Thank you again Matthias, its great.

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post fs82 OpenFOAM 37 January 7, 2015 01:31 Mihail CFX 7 September 7, 2014 06:27 arshoon OpenFOAM Running, Solving & CFD 0 April 9, 2013 10:03 be_inspired OpenFOAM Programming & Development 1 March 19, 2013 11:50 DJ Main CFD Forum 1 August 5, 2004 20:01

All times are GMT -4. The time now is 20:13.