# Average value of expression in transient flow analysis

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 May 22, 2013, 08:02 Average value of expression in transient flow analysis #1 New Member   Jacob Fogh Knudsen Join Date: May 2013 Location: Aarhus, Denmark Posts: 1 Rep Power: 0 Hi, I am currently trying to set up a transient flow analysis of an aerofoil. I want to extract the average drag coefficient as a parameter for a study, but have run into some problems. Currently i am so far: I have set up the basic model and it runs. Created an expression for the drag coefficient: 2*force_x()@AntennaSurface/(areaAve(Density)@Inlet*(areaAve(Velocity u)@Inlet)^2*FrontalArea). Created an additional variable with: Type: Unspecified, Unit: [ ], Tensor Type: Scalar. Included the additional variable in my domain and set its value to the expression for the drag coefficient. In the "Trn Stats" tab under "Output control" I have created a Transient Statistics Object and added the additional value and set the "Option" to "Arithmetic Average". When I run the model I get an instant error saying: | PROBLEM ENCOUNTERED WHEN EXECUTING CFX EXPRESSION LANGUAGE | | | | The CFX expression language was evaluating: | | Additional Variable Value | | | | The problem was: | | DIVIDE-BY-ZERO | Have I missed some small detail or am I doing it completely wrong? Please help. Thanks!

 May 22, 2013, 08:52 #2 Senior Member   Lance Join Date: Mar 2009 Posts: 606 Rep Power: 14 I've done almost the same thing as you, but used two AVs and the .Trnavg operator instead. It worked for me. edit: what was the initial condition for your AV? If it was set to zero it could explain your error. Code: ``` LIBRARY: ADDITIONAL VARIABLE: Additional Variable 1 Boundary Only Field = On Option = Definition Tensor Type = SCALAR Units = [Pa] Variable Type = Unspecified END ADDITIONAL VARIABLE: Additional Variable 2 Boundary Only Field = On Option = Definition Tensor Type = SCALAR Units = [Pa] Variable Type = Unspecified END and FLUID MODELS: ADDITIONAL VARIABLE: Additional Variable 1 Additional Variable Value = areaAve(Pressure)@boundary <--- your expression Option = Algebraic Equation END ADDITIONAL VARIABLE: Additional Variable 2 Additional Variable Value = Additional Variable 1.Trnavg <--- time average Option = Algebraic Equation END``` mvoss likes this.

 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 CRT FLUENT 0 July 20, 2012 13:03 kmgraju FLUENT 0 May 20, 2011 02:19 munna1981 Main CFD Forum 3 February 14, 2011 13:04 carno FLUENT 0 April 12, 2007 06:37 manish CFX 2 January 16, 2006 04:58

All times are GMT -4. The time now is 17:51.

 Contact Us - CFD Online - Top