
[Sponsors] 
July 20, 2007, 07:44 
calc in table viewer

#1 
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 

July 21, 2007, 11:48 
Re: calc in table viewer

#2 
Guest
Posts: n/a

Very nice question, I'd like to know it as well!!


July 22, 2007, 18:30 
Re: calc in table viewer

#3 
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 

July 23, 2007, 06:42 
Re: calc in table viewer

#4 
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 

July 23, 2007, 09:19 
Re: calc in table viewer

#5 
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 

July 23, 2007, 11:24 
Re: calc in table viewer

#6 
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? 

July 23, 2007, 11:50 
Re: calc in table viewer

#7 
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 

July 23, 2007, 12:05 
Re: calc in table viewer

#8 
Guest
Posts: n/a

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


July 23, 2007, 13:00 
Re: calc in table viewer

#9 
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 

July 23, 2007, 13:30 
Re: calc in table viewer

#10 
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, 'pptot' is an easier expression to use. This will also give you the right dynamic pressure for compressible flows.
Cd = force_x()@Surface/massFlowAve(pptot)@Inlet Regards, Robin 

July 23, 2007, 13:31 
oops

#11 
Guest
Posts: n/a

Sorry, meant denominator, not numerator. I think you get the point


July 23, 2007, 15:55 
Re: oops

#12 
Guest
Posts: n/a

thanks i will try that tomorrow
now 22.00 thanks a bunch anyway 

July 23, 2007, 16:02 
Re: calc in table viewer

#13 
Guest
Posts: n/a

also can you tell me how i can get in legend CP values
that is a presssure coeff PPa but i guess that massflow Ave (pptot)@default default domain is that right? 

July 23, 2007, 16:08 
Re: calc in table viewer

#14 
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 'ptotp' or 'Total Pressure  Pressure' and plot it.
(I meant to use 'ptotp' earlier but it came out as 'pptot'. Damn Mondays ;) Regards, Robin 

July 23, 2007, 16:58 
Re: calc in table viewer

#15 
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 

July 24, 2007, 10:04 
Re: calc in table viewer

#16 
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 

July 24, 2007, 13:07 
Re: calc in table viewer

#17 
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 pptot who to solev this? 

July 24, 2007, 18:38 
Re: calc in table viewer

#18 
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!!!!!!!!! 

July 25, 2007, 09:43 
Re: calc in table viewer

#19 
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?


July 25, 2007, 11:56 
Re: calc in table viewer

#20 
Guest
Posts: n/a

yes i did have the = sign and it does work in experssion but not in table viewer


Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Run time Selection Mechanism  Some help required to understand  jaswi  OpenFOAM Programming & Development  3  October 29, 2015 14:42 
Refering to cells in table viewer  Daniel  CFX  1  May 11, 2006 12:19 
Table Manipulation  furkan  Siemens  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 