from snake.simulation import Simulation
from snake.cuibm.simulation import CuIBMSimulation


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

other = Simulation(description='',
                   directory='',
                   software='')
other.read_forces()
other.get_mean_forces(limits=time_limits)
other.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=other,
                       other_coefficients=2.0,
                       style='mesnardo',
                       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,
from snake.simulation import Simulation
from snake.openfoam.simulation import OpenFOAMSimulation


simulation = OpenFOAMSimulation(description='present')
simulation.read_forces(display_coefficients=True)
time_limits = (32.0, 64.0)
simulation.get_mean_forces(limits=time_limits)
simulation.get_strouhal(limits=time_limits, order=200)

other = Simulation(description='',
                   directory='',
                   software='')
other.read_forces()
other.get_mean_forces(limits=time_limits)
other.get_strouhal(limits=time_limits, order=200)

simulation.plot_forces(display_coefficients=True,
                       display_extrema=True, order=200,
                       limits=(0.0, 80.0, 0.0, 3.0),
                       other_simulations=other,
                       other_coefficients=1.0,
                       save_name='forceCoefficientsCompareOther',
                       style='mesnardo',
                       show=True)

dataframe = simulation.create_dataframe_forces(display_strouhal=True,
                                               display_coefficients=True)
dataframe2 = other.create_dataframe_forces(display_strouhal=True,
                                           display_coefficients=True)
print(dataframe.append(dataframe2))
Beispiel #3
0
# description: Plots the instantaneous force coefficients
#              and compare to other results.
# Run this script from the simulation directory.

from snake.simulation import Simulation
from snake.petibm.simulation import PetIBMSimulation

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

other = Simulation(description='', directory='', software='')
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='forceCoefficientsCompare')

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,
from snake.simulation import Simulation
from snake.petibm.simulation import PetIBMSimulation


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

other = Simulation(description='',
                   directory='',
                   software='')
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='forceCoefficientsCompare')

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)