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

Calculate drag in su2 v7.0.0

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 17, 2019, 19:10
Default Calculate drag in su2 v7.0.0
  #1
New Member
 
Fabio Michael Bluhm
Join Date: Nov 2019
Posts: 2
Rep Power: 0
fabiox8 is on a distinguished road
Hello,

today I decided to switch from SU2 V6.0.0 to V7.0.0 and a problem occured.

I want to calculate the DRAG (or any other function like LIFT, SIDEFORCE, ...).
With SU2 V6.0.0 I use this python script to get the DRAG:

Code:
import SU2

config = SU2.io.Config("inv_ONERAM6_V6.cfg")
config.MATH_PROBLEM = "DIRECT"
config.RESTART_SOL = "NO"
config.NUMBER_PART = 4
config.NZONES = 1  # no multizone simulation
config.EXT_ITER = 1 # just for fast debugging
state = SU2.io.State()

info = SU2.run.direct(config)
state.update(info)

responseValue = SU2.eval.functions.function("DRAG", config, state)
print(responseValue)
However in SU2 V7.0.0 This does not work anymore.
I get this error message:
Quote:
Traceback (most recent call last):
File "a.py", line 21, in <module>
responseValue = SU2.eval.functions.function("DRAG", config, state)
File "/home/fabio/SU2/SU2_V7.0/bin/SU2/eval/functions.py", line 118, in function
func_out = state['FUNCTIONS'][func_name]
KeyError: 'DRAG'
It seems like info = SU2.run.direct(config) does not contain anything in info['FUNCTIONS'] and therefore SU2.eval.functions.function("DRAG", config, state) can not retrieve any information.

I would be happy to get suggestions on how to solve this problem.

Best

Fabio
fabiox8 is offline   Reply With Quote

Old   December 18, 2019, 11:12
Default
  #2
Super Moderator
 
Tim Albring
Join Date: Sep 2015
Posts: 195
Rep Power: 11
talbring is on a distinguished road
Hi Fabio,

you have to add the output group "AERO_COEFF" to the history output option.

e.g:

Code:
config["HISTORY_OUTPUT"].append("AERO_COEFF")
Regards,
Tim
__________________
Developer Director @ SU2 Foundation

Get involved:
talbring is offline   Reply With Quote

Old   December 18, 2019, 17:31
Smile Solved
  #3
New Member
 
Fabio Michael Bluhm
Join Date: Nov 2019
Posts: 2
Rep Power: 0
fabiox8 is on a distinguished road
Hi Tim,

this works. Thank's a lot!

Now that you explained it to me, I also found the new user guide

Best

Fabio
fabiox8 is offline   Reply With Quote

Reply

Tags
blackbird, eval.functions, problem, run.direct


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
How to calculate Cn (normal Drag Co-effiecient) and Ct (tangential drag co-efficient) amianjan FLUENT 0 February 12, 2014 03:00
how to calculate mean value of lift and drag aamer Main CFD Forum 9 December 21, 2010 01:23
does anyone know about using comsol 4.0 to calculate drag force sl424 COMSOL 0 November 13, 2010 23:28
How should we calculate the drag force ?? Thinnapong FLUENT 5 May 4, 2008 14:46
How to calculate the drag force? James CFX 1 April 24, 2008 01:59


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