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

Angle variable under CEL.

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 15, 2004, 16:13
Default Angle variable under CEL.
  #1
Gloria Gaynor
Guest
 
Posts: n/a
I'm working on a multiphase rotating frame of reference test case. As long as I apply the rotation (which is not constant) I have to correct the gravity components (i.e. a function of the domain rotation). This issue is explained on the manual but I could not find which is the name of the angle variable which is printed in the out file as the simulation runs. An example of the output is given below:


================================================== ==================== TIME STEP = 544 SIMULATION TIME = 2.85E+01 CPU SECONDS = 3.34E+05 (THIS RUN: 7 7.90E-01 2.71E+02) ---------------------------------------------------------------------- Domain: Rotor rotated -1.67E+02 degrees ( 0.464 pitches) ---------------------------------------------------------------------- Domain interface: Slide Interface

Non-overlap area fraction on side 1 = 0.0 %

Non-overlap area fraction on side 2 = 0.0 %

Pitch ratio: (area side 1)/(area side 2) = 1.000 ----------------------------------------------------------------------


I want to capture this angle (-1.67E+02 degrees) to apply a CEL expression of the gravity components like this:
GravX = 9.81 [m s^-2] * sin(alpha) GravY = 9.81 [m s^-2] * cos(alpha)
I look at the CFX5RULES and CFX5VAR files but it didn't help at all. The manual suggests that I should build the gravity expression as a function of the angular velocity (which, by the way, is function of time). However, the angular velocity is not constant and is hard to figure out what is the exact angle to perform the CEL expression.
Therefore I'm looking a way to get this angle to implement the expression. How is the internal solver name of this variable and how can I get it into CEL?
Thanks in advance, G. G.
  Reply With Quote

Old   April 15, 2004, 17:29
Default Re: Angle variable under CEL.
  #2
Juan Carlos
Guest
 
Posts: n/a
Unfortunately, that variable is not available via CEL and you will require detailed explanation (developer help) of how to access it via User Fortran.

However, since you know the expression for angular velocity, you could integrate it analitically/numerically and create a local angle variable. Then, you match the gravity vector with your local angle variable..

Good luck, Juan Carlos

  Reply With Quote

Old   November 17, 2012, 14:51
Default Rotated degrees or pitches of rotating domain
  #3
Member
 
Shawn
Join Date: Oct 2011
Posts: 56
Rep Power: 14
Shawn_A is on a distinguished road
Has this functionality changed in CFX since these posts? I have a rotating domain and a stationary domain and I would like to output to a monitor (or somewhere) how many degrees or pitches that my rotating domain has traveled. This value appears in the output file, but does not appear to be available as a variable or expression. Even the relative angle between the rotating and stationary domains would be enough.

Could the variable theta be used at all, applied to the rotating domain for example?

Thanks,
Shawn
Shawn_A is offline   Reply With Quote

Old   November 17, 2012, 20:06
Default
  #4
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,655
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Not sure, why not just try it and find out?
ghorrocks is offline   Reply With Quote

Old   November 18, 2012, 15:07
Default
  #5
Member
 
Shawn
Join Date: Oct 2011
Posts: 56
Rep Power: 14
Shawn_A is on a distinguished road
I looked through the help files but couldn't find any variables for "rotated degrees" or similar. I tried a couple names like "rotated" "rotateddegrees" etc. but all gave me errors.

I'm also not sure how to use "theta" in an expression. Tried theta@blade1 and theta()@blade1 but both gave errors. Apparently theta on its own is not single valued. I had considered using time and multiplying by the rotation speed, but since I may have used anoter different speed case as the IC's, the speed would not be have been constant.

I wouldn't have a problem if rounding errors didn't very slowly cause the angular displacement to drift off the 1 degree increments I set. After maybe 4000 timesteps instead of 4000 degrees I'm at 4000.7, for example. The problem keeps getting worse if I use the results from one case as the IC's for another.
Shawn_A is offline   Reply With Quote

Old   November 18, 2012, 16:47
Default
  #6
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,655
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Try the variable "Rotation Velocity". Multiply that by time (and assuming it is constant) you have it. Theta is an available variable but I am not quite sure how to call it.

Also if you use a CEL expression to set the rotational velocity and then use that same expression to calculate theta you should not have the precision error.
ghorrocks is offline   Reply With Quote

Old   November 19, 2012, 00:00
Default
  #7
Member
 
Shawn
Join Date: Oct 2011
Posts: 56
Rep Power: 14
Shawn_A is on a distinguished road
Hi Glenn,

I used the CEL expression "1 [s] * ( 60 / 158 ) / 360" to set my timesteps as 1 degree increments corresponding an angular speed of 158 RPM for my rotating domain. The rotating domain speed was simply set as 158 with the rev/min option chosen. Rotational velocity is constant within each case.

I don't know how to calculate theta, or how to reference it to a single location or value. Error says that theta is a field variable.
Shawn_A is offline   Reply With Quote

Old   November 19, 2012, 06:09
Default
  #8
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,655
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
You could convert theta to a single value with avg(theta)@domain_name.

Alternately: If you define some values with CEL, like:
TimeStep=1[s]
RotSpeed=158 [rpm]

Then set your time step equal to TimeStep, the rotational velocity as RotSpeed and then theta will be TimeStep*RotSpeed. This might improve the accuracy of the calculation.
ghorrocks is offline   Reply With Quote

Old   November 20, 2012, 17:35
Default
  #9
Senior Member
 
Bruno
Join Date: Mar 2009
Location: Brazil
Posts: 277
Rep Power: 21
brunoc is on a distinguished road
Quote:
Originally Posted by ghorrocks View Post
Then set your time step equal to TimeStep, the rotational velocity as RotSpeed and then theta will be TimeStep*RotSpeed.
Actually, theta will be 'Time*RotSpeed'. 'TimeStep*RotSpeed' will give dTheta.

Cheers
brunoc is offline   Reply With Quote

Old   November 20, 2012, 18:28
Default
  #10
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,655
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Yes, well spotted. Thanks for the correction.
ghorrocks is offline   Reply With Quote

Old   November 25, 2012, 11:50
Default
  #11
Member
 
Shawn
Join Date: Oct 2011
Posts: 56
Rep Power: 14
Shawn_A is on a distinguished road
I tried ave(theta)@Rotor and got the error that the "solver does not support the use of this variable in this context." Tried a couple other quantitative functions too like volume(), volumeAve() and areaAve() with the same result. Oh well...

I've defined my values a bit differently now with CEL so I'll see how that works out. Thanks for the help
Shawn_A is offline   Reply With Quote

Old   November 26, 2012, 07:29
Default
  #12
Senior Member
 
Bruno
Join Date: Mar 2009
Location: Brazil
Posts: 277
Rep Power: 21
brunoc is on a distinguished road
The solver won't let you calculate averages of some variables, but I think you can trick it into doing that by creating an algebraic additional variable that is equal to the variable you want to measure (theta, in your case) and then average this variable instead.

But what about just getting the theta value from time and rotational speed? That didn't work out?
brunoc is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Netgen] Import netgen mesh to OpenFOAM hsieh OpenFOAM Meshing & Mesh Conversion 32 September 13, 2011 06:50
emag beta feature: charge density charlotte CFX 4 March 22, 2011 10:14
error in COMSOL:'ERROR:6164 Duplicate Variable' bhushas COMSOL 1 May 30, 2008 05:35
Env variable not set gruber2 OpenFOAM Installation 5 December 30, 2005 05:27
Replace periodic by inlet-outlet pair lego CFX 3 November 5, 2002 21:09


All times are GMT -4. The time now is 03:57.