CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > CFX

calc in table viewer

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 20, 2007, 07:44
Default calc in table viewer
  #1
jan
Guest
 
Posts: n/a
let say i want to define density *0.5

how do i do this ,becuase i can do it with a variable but when i want to have this in table viewer it cannot done

why is that , so i cannot include this in a report
  Reply With Quote

Old   July 21, 2007, 11:48
Default Re: calc in table viewer
  #2
Jinji
Guest
 
Posts: n/a
Very nice question, I'd like to know it as well!!
  Reply With Quote

Old   July 22, 2007, 18:30
Default Re: calc in table viewer
  #3
Glenn Horrocks
Guest
 
Posts: n/a
Hi,

What do you mean? Do you want to define density as a function of other variables so you can do a compressible or buoyant flow simulation?

Glenn Horrocks
  Reply With Quote

Old   July 23, 2007, 06:42
Default Re: calc in table viewer
  #4
jan
Guest
 
Posts: n/a
yes define as a function of other variables like determine of surface drag you need 0.5 times density or density /2

its just impossible to do this in table viewer
  Reply With Quote

Old   July 23, 2007, 09:19
Default Re: calc in table viewer
  #5
Robin
Guest
 
Posts: n/a
The table viewer can only display single values. The expression 'density*0.5' resolves to a variable. If you write an expression as a function of density which resolves to a single value you will have no problem. For example, enter the following expression into a table cell =massFlowAve(1/2*density)@wing.

Regards, Robin
  Reply With Quote

Old   July 23, 2007, 11:24
Default Re: calc in table viewer
  #6
jan
Guest
 
Posts: n/a
thanks only if you do more then this i still have a problem

entering the drag formula in that table cell

or do you also a have a solution for this?

  Reply With Quote

Old   July 23, 2007, 11:50
Default Re: calc in table viewer
  #7
Robin
Guest
 
Posts: n/a
Make sure your Expression results in a single value. If your drag formula does, you will not have a problem. Post the actual expression you are using here if you like and I can point out any problems.

-Robin
  Reply With Quote

Old   July 23, 2007, 12:05
Default Re: calc in table viewer
  #8
jan
Guest
 
Posts: n/a
Cd = force_x()@Surface / (0.5*Rho*U^2*A)
  Reply With Quote

Old   July 23, 2007, 13:00
Default Re: calc in table viewer
  #9
Robin
Guest
 
Posts: n/a
Ah. The problem is that while the numerator of your expression results in a single value, the denominator doesn't. Instead, use:

Cd = force_x()@Surface/areaAve(0.5*Rho*U^2*A)@Surface

Regards, Robin
  Reply With Quote

Old   July 23, 2007, 13:30
Default Re: calc in table viewer
  #10
Robin
Guest
 
Posts: n/a
Actually, the numerator should be calculated as a mass flow average on your reference boundary, probably your inlet, since the dynamic pressure at the surface will be zero. Also, since the dynamic pressure is simply the difference between the static and total pressure, 'p-ptot' is an easier expression to use. This will also give you the right dynamic pressure for compressible flows.

Cd = force_x()@Surface/massFlowAve(p-ptot)@Inlet

Regards, Robin

  Reply With Quote

Old   July 23, 2007, 13:31
Default oops
  #11
Robin
Guest
 
Posts: n/a
Sorry, meant denominator, not numerator. I think you get the point
  Reply With Quote

Old   July 23, 2007, 15:55
Default Re: oops
  #12
jan
Guest
 
Posts: n/a
thanks i will try that tomorrow

now 22.00

thanks a bunch anyway
  Reply With Quote

Old   July 23, 2007, 16:02
Default Re: calc in table viewer
  #13
jan
Guest
 
Posts: n/a
also can you tell me how i can get in legend CP values

that is a presssure coeff

P-Pa

but i guess that massflow Ave (p-ptot)@default default domain

is that right?
  Reply With Quote

Old   July 23, 2007, 16:08
Default Re: calc in table viewer
  #14
Robin
Guest
 
Posts: n/a
I'm not sure I understand. Do you want to plot the pressure coefficient? If that is the case, just define a Variable in Post equal to 'ptot-p' or 'Total Pressure - Pressure' and plot it.

(I meant to use 'ptot-p' earlier but it came out as 'p-ptot'. Damn Mondays ;-)

Regards, Robin
  Reply With Quote

Old   July 23, 2007, 16:58
Default Re: calc in table viewer
  #15
jan
Guest
 
Posts: n/a
areaAve(0.5*Rho*U^2*A)@Surface

still cannot define this

ok can do 0.5*rho

but not the part U^2 this is the speed in ^2 so i cannot define this drag coeff

  Reply With Quote

Old   July 24, 2007, 10:04
Default Re: calc in table viewer
  #16
Robin
Guest
 
Posts: n/a
The speed squared would be u^2+v^2+w^2, 'U' is not a variable. Try:

areaAve(0.5*Density*(u^2+v^2+w^2))@Surface

Or you could define U in another expression as:

U = sqrt(u^2+v^2+w^2)

... and us it in your original.

What is the '*A' for? Also, keep in mind that for the drag coefficient you don't want the dynamic pressure at the surface, you need it from a reference location such as your inlet or a plane upstream. Also, as I pointed out before, the easiest way to calculate the dynamic pressure is to subtract the static pressure from the total pressure (Total Pressure is sometimes referred to as the Stagnation Pressure).

Regards, Robin
  Reply With Quote

Old   July 24, 2007, 13:07
Default Re: calc in table viewer
  #17
jan
Guest
 
Posts: n/a
thanks why w^2 ?

and A is aera

and i cannot do a CP on the object CP= coeff pressure

this is used to see how each pascal is this means or it has pressure force yes or no and normaly it between -1 and 2 with this you can see where there is a problem spikes are easily seen and its effect also where from laminar goes to turbulant its impossible for me to see on the object p-ptot who to solev this?

  Reply With Quote

Old   July 24, 2007, 18:38
Default Re: calc in table viewer
  #18
jan
Guest
 
Posts: n/a
The speed squared would be u^2+v^2+w^2, 'U' is not a variable. Try:

areaAve(0.5*Density*(u^2+v^2+w^2))@Surface

Or you could define U in another expression as:

U = sqrt(u^2+v^2+w^2)

sorry does not work!!!!!!!!!
  Reply With Quote

Old   July 25, 2007, 09:43
Default Re: calc in table viewer
  #19
Robin
Guest
 
Posts: n/a
Did you include an equal sign '=' ahead of the expression when you entered it into the table cell? Does the expression work in the expression editor?
  Reply With Quote

Old   July 25, 2007, 11:56
Default Re: calc in table viewer
  #20
jan
Guest
 
Posts: n/a
yes i did have the = sign and it does work in experssion but not in table viewer

  Reply With Quote

Reply

Thread Tools
Display Modes

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 Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run time Selection Mechanism - Some help required to understand jaswi OpenFOAM Programming & Development 2 April 18, 2014 07:44
Refering to cells in table viewer Daniel CFX 1 May 11, 2006 12:19
Table Manipulation furkan CD-adapco 0 April 4, 2006 10:23
transient results in table viewer Andrew Fine CFX 2 December 16, 2005 00:39
Rotation flow calc. II. Andy Christian Main CFD Forum 2 April 10, 2003 04:06


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