SU2
Classes | Functions
state.py File Reference

python package for state More...

Classes

class  SU2.io.state.State
 

Functions

def SU2.io.state.State_Factory (state=None, config=None)
 

Detailed Description

python package for state

Author
T. Lukaczyk, F. Palacios
Version
5.0.0 "Raven"

SU2 Original Developers: Dr. Francisco D. Palacios. Dr. Thomas D. Economon.

SU2 Developers: Prof. Juan J. Alonso's group at Stanford University. Prof. Piero Colonna's group at Delft University of Technology. Prof. Nicolas R. Gauger's group at Kaiserslautern University of Technology. Prof. Alberto Guardone's group at Polytechnic University of Milan. Prof. Rafael Palacios' group at Imperial College London. Prof. Edwin van der Weide's group at the University of Twente. Prof. Vincent Terrapon's group at the University of Liege.

Copyright (C) 2012-2017 SU2, the open-source CFD code.

SU2 is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

SU2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with SU2. If not, see http://www.gnu.org/licenses/.

Function Documentation

§ State_Factory()

def SU2.io.state.State_Factory (   state = None,
  config = None 
)
state = SU2.io.State()
    
    Starts a state class, an extension of ordered_bunch().
    Stores data generated while traversing SU2 tool chain
    
    Fields:
        FUNCTIONS - ordered bunch of objective function values
        GRADIENTS - ordered bunch of gradient value lists
        VARIABLES - ordered bunch of variables
        FILES     - ordered bunch of file types
        HISTORY   - ordered bunch of history information
        
    Fields can be accessed by item or attribute
    ie: state['FUNCTIONS'] or state.FUNCTIONS
    
    Methods:
        update()        - updates self with another state
        pullnlink()     - returns files to pull and link
        design_vector() - vectorizes design variables
        find_files()    - finds existing mesh and solutions
    
    Example of a filled state:
    FUNCTIONS:
        LIFT: 0.2353065809
        DRAG: 0.042149736
        SIDEFORCE: 0.0
        MOMENT_X: 0.0
        MOMENT_Y: 0.0
        MOMENT_Z: 0.046370243
        FORCE_X: 0.0370065195
        FORCE_Y: 0.2361700759
        FORCE_Z: 0.0
        EFFICIENCY: 5.5826347517
    GRADIENTS:
        DRAG: [0.133697, 0.41473, 0.698497, (...)
    VARIABLES:
        DV_VALUE_NEW: [0.002, 0.002, 0.002, (...)
    FILES:
        MESH: mesh.su2
        DIRECT: solution_flow.dat
        ADJOINT_DRAG: solution_adj_cd.dat
    HISTORY:
        DIRECT: {ITERATION=[1.0, 2.0, 3.0, (...)
        ADJOINT_DRAG: {ITERATION=[1.0, 2.0, 3.0, (...)