当前位置: 首页>>代码示例>>Python>>正文


Python CuIBMSimulation.plot_forces方法代码示例

本文整理汇总了Python中snake.cuibm.simulation.CuIBMSimulation.plot_forces方法的典型用法代码示例。如果您正苦于以下问题:Python CuIBMSimulation.plot_forces方法的具体用法?Python CuIBMSimulation.plot_forces怎么用?Python CuIBMSimulation.plot_forces使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在snake.cuibm.simulation.CuIBMSimulation的用法示例。


在下文中一共展示了CuIBMSimulation.plot_forces方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: CuIBMSimulation

# 需要导入模块: from snake.cuibm.simulation import CuIBMSimulation [as 别名]
# 或者: from snake.cuibm.simulation.CuIBMSimulation import plot_forces [as 别名]
time_limits = (32.0, 64.0)
simulation.get_mean_forces(limits=time_limits)
simulation.get_strouhal(limits=time_limits, order=200)

krishnan = CuIBMSimulation(description='Krishnan et al. (2014)')
filepath = os.path.join(os.environ['SNAKE'],
                        'resources',
                        'flyingSnake2d_cuibm_anush',
                        'flyingSnake2dRe2000AoA35',
                        'forces')
krishnan.read_forces(file_path=filepath)
krishnan.get_mean_forces(limits=time_limits)
krishnan.get_strouhal(limits=time_limits, order=200)

simulation.plot_forces(display_coefficients=True,
                       coefficient=2.0,
                       display_extrema=True, order=200,
                       limits=(0.0, 80.0, 0.0, 3.0),
                       other_simulations=krishnan,
                       other_coefficients=2.0,
                       style='mesnardo',
                       save_name='forceCoefficientsCompareKrishnanEtAl2014')

dataframe = simulation.create_dataframe_forces(display_strouhal=True,
                                               display_coefficients=True,
                                               coefficient=2.0)
dataframe2 = krishnan.create_dataframe_forces(display_strouhal=True,
                                              display_coefficients=True,
                                              coefficient=2.0)
print(dataframe.append(dataframe2))
开发者ID:barbagroup,项目名称:cuIBM,代码行数:32,代码来源:plotForceCoefficientsCompareKrishnanEtAl2014.py

示例2: Mesnard

# 需要导入模块: from snake.cuibm.simulation import CuIBMSimulation [as 别名]
# 或者: from snake.cuibm.simulation.CuIBMSimulation import plot_forces [as 别名]
# file: plotForceCoefficients.py
# author: Olivier Mesnard ([email protected])
# description: Plots the instantaneous force coefficients.
# Run this script from the simulation directory.


from snake.cuibm.simulation import CuIBMSimulation


simulation = CuIBMSimulation()
simulation.read_forces()
simulation.get_mean_forces(limits=[32.0, 64.0])
simulation.get_strouhal(limits=[32.0, 64.0], order=200)

simulation.plot_forces(display_coefficients=True,
                       coefficient=2.0,
                       display_extrema=True, order=200,
                       limits=(0.0, 80.0, 0.0, 3.0),
                       save_name='forceCoefficients')
dataframe = simulation.create_dataframe_forces(display_strouhal=True,
                                               display_coefficients=True,
                                               coefficient=2.0)
print(dataframe)
开发者ID:Haider-BA,项目名称:snake,代码行数:25,代码来源:plotForceCoefficients.py

示例3: CuIBMSimulation

# 需要导入模块: from snake.cuibm.simulation import CuIBMSimulation [as 别名]
# 或者: from snake.cuibm.simulation.CuIBMSimulation import plot_forces [as 别名]
simulation = CuIBMSimulation(description='cuIBM')
simulation.read_forces()
simulation.get_mean_forces(limits=[32.0, 64.0])
simulation.get_strouhal(limits=[32.0, 64.0], order=200)

krishnan = CuIBMSimulation(description='Krishnan et al. (2014)')
krishnan.read_forces(file_path='{}/resources/flyingSnake2d_cuibm_anush/'
                               'flyingSnake2dRe2000AoA35/forces'
                               ''.format(os.environ['SNAKE']))
krishnan.get_mean_forces(limits=[32.0, 64.0])
krishnan.get_strouhal(limits=[32.0, 64.0], order=200)

simulation.plot_forces(indices=[1],
                       display_coefficients=True,
                       coefficient=2.0,
                       display_extrema=True, order=200,
                       limits=(0.0, 80.0, 0.0, 3.0),
                       other_simulations=krishnan,
                       other_coefficients=2.0,
                       save_name='liftCoefficientCompareKrishnanEtAl2014')
dataframe = simulation.create_dataframe_forces(indices=[1],
                                               display_strouhal=True,
                                               display_coefficients=True,
                                               coefficient=2.0)
dataframe2 = krishnan.create_dataframe_forces(indices=[1],
                                              display_strouhal=True,
                                              display_coefficients=True,
                                              coefficient=2.0)
dataframe = dataframe.append(dataframe2)
print(dataframe)
开发者ID:Haider-BA,项目名称:snake,代码行数:32,代码来源:plotLiftCoefficientCompareKrishnanEtAl2014.py

示例4: CuIBMSimulation

# 需要导入模块: from snake.cuibm.simulation import CuIBMSimulation [as 别名]
# 或者: from snake.cuibm.simulation.CuIBMSimulation import plot_forces [as 别名]
from snake.cuibm.simulation import CuIBMSimulation


simulation = CuIBMSimulation(description='cuIBM (present)')
simulation.read_forces()
simulation.get_mean_forces(limits=[32.0, 64.0])
simulation.get_strouhal(limits=[32.0, 64.0], order=200)

other = CuIBMSimulation(description='',
                        directory='')
other.read_forces()
other.get_mean_forces(limits=[32.0, 64.0])
other.get_strouhal(limits=[32.0, 64.0], order=200)

simulation.plot_forces(display_coefficients=True,
                       coefficient=2.0,
                       display_extrema=True, order=200,
                       limits=(0.0, 80.0, 0.0, 3.0),
                       other_simulations=other,
                       other_coefficients=2.0,
                       save_name='forceCoefficientsCompareOther')
dataframe = simulation.create_dataframe_forces(display_strouhal=True,
                                               display_coefficients=True,
                                               coefficient=2.0)
dataframe2 = other.create_dataframe_forces(display_strouhal=True,
                                           display_coefficients=True,
                                           coefficient=2.0)
dataframe = dataframe.append(dataframe2)
print(dataframe)
开发者ID:Haider-BA,项目名称:snake,代码行数:31,代码来源:plotForceCoefficientsCompareOther.py

示例5: CuIBMSimulation

# 需要导入模块: from snake.cuibm.simulation import CuIBMSimulation [as 别名]
# 或者: from snake.cuibm.simulation.CuIBMSimulation import plot_forces [as 别名]
"""
Post-processes the force coefficients from a cuIBM simulation.

This script reads the forces, computes the mean forces within a given range,
computes the Strouhal number within a range, plots the force coefficients,
saves the figure, and prints a data-frame that contains the mean values.
"""

from snake.cuibm.simulation import CuIBMSimulation


simulation = CuIBMSimulation()
simulation.read_forces()
time_limits = (60.0, 80.0)
simulation.get_mean_forces(limits=time_limits)
simulation.get_strouhal(limits=time_limits, order=200)

simulation.plot_forces(display_coefficients=True,
                       coefficient=2.0,
                       limits=(0.0, 80.0, -0.5, 1.5),
                       style='seaborn-dark',
                       save_name='forceCoefficients')

dataframe = simulation.create_dataframe_forces(display_strouhal=True,
                                               display_coefficients=True,
                                               coefficient=2.0)
print(dataframe)
开发者ID:barbagroup,项目名称:cuIBM,代码行数:29,代码来源:plotForceCoefficients.py


注:本文中的snake.cuibm.simulation.CuIBMSimulation.plot_forces方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。