# IMPORTS #============================================================================== import os import sys import pytest from pytest import approx from ceasiompy.utils.ceasiomlogger import get_logger from ceasiompy.utils.cpacsfunctions import open_tixi, open_tigl, close_tixi, get_value from ceasiompy.SkinFriction.skinfriction import get_largest_wing_dim, \ estimate_skin_friction_coef, \ add_skin_friction log = get_logger(__file__.split('.')[0]) # Default CPACS file to test MODULE_DIR = os.path.dirname(os.path.abspath(__file__)) CPACS_IN_PATH = MODULE_DIR + '/ToolInput/D150_AGILE_Hangar_v3.xml' CPACS_OUT_PATH = MODULE_DIR + '/ToolOutput/ToolOutput.xml' #============================================================================== # CLASSES #============================================================================== #============================================================================== # FUNCTIONS #==============================================================================
| Date of creation: 2018-09-27 """ # ============================================================================= # IMPORTS # ============================================================================= import numpy as np import math from cpacspy.cpacsfunctions import open_tigl, open_tixi from ceasiompy.utils.ceasiomlogger import get_logger log = get_logger(__file__.split(".")[0]) # ============================================================================= # CLASSES # ============================================================================= """All classes are defined inside the classes and into the InputClasses/Unconventional folder.""" # ============================================================================= # FUNCTIONS # ============================================================================= def fuselage_inertia(SPACING, center_of_gravity, mass_seg_i, afg, cpacs_in): """Thefunction evaluates the inertia of the fuselage using the lumped masses method.
#============================================================================== import os import sys import pytest from ceasiompy.utils.ceasiomlogger import get_logger # Delete the log file if exist, to simplify the test if os.path.exists('testlogger.log'): os.remove('testlogger.log') # Set logger name and create a logger with this name logger_name = __file__.split('.')[0] log = get_logger(logger_name) logger_file_name = logger_name + '.log' #============================================================================== # CLASSES #============================================================================== #============================================================================== # FUNCTIONS #============================================================================== def test_logger(): """Test if ceasiompy logger return the correct lines on the log file. """