CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   calc in table viewer (https://www.cfd-online.com/Forums/cfx/24293-calc-table-viewer.html)

jan July 20, 2007 07:44

calc in table viewer
 
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

Jinji July 21, 2007 11:48

Re: calc in table viewer
 
Very nice question, I'd like to know it as well!!

Glenn Horrocks July 22, 2007 18:30

Re: calc in table viewer
 
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

jan July 23, 2007 06:42

Re: calc in table viewer
 
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

Robin July 23, 2007 09:19

Re: calc in table viewer
 
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

jan July 23, 2007 11:24

Re: calc in table viewer
 
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?


Robin July 23, 2007 11:50

Re: calc in table viewer
 
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

jan July 23, 2007 12:05

Re: calc in table viewer
 
Cd = force_x()@Surface / (0.5*Rho*U^2*A)

Robin July 23, 2007 13:00

Re: calc in table viewer
 
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

Robin July 23, 2007 13:30

Re: calc in table viewer
 
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


Robin July 23, 2007 13:31

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

jan July 23, 2007 15:55

Re: oops
 
thanks i will try that tomorrow

now 22.00

thanks a bunch anyway

jan July 23, 2007 16:02

Re: calc in table viewer
 
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?

Robin July 23, 2007 16:08

Re: calc in table viewer
 
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

jan July 23, 2007 16:58

Re: calc in table viewer
 
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


Robin July 24, 2007 10:04

Re: calc in table viewer
 
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

jan July 24, 2007 13:07

Re: calc in table viewer
 
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?


jan July 24, 2007 18:38

Re: calc in table viewer
 
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!!!!!!!!!

Robin July 25, 2007 09:43

Re: calc in table viewer
 
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?

jan July 25, 2007 11:56

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



All times are GMT -4. The time now is 23:34.