def main(args): """Plots the instantaneous drag coefficient and compares to Koumoutsakos and Leonard (1995). """ print('[info] simulation: {}'.format(args.directory)) simulation = Simulation(directory=args.directory, description=args.description, software=args.software) simulation.read_forces(display_coefficients=True) validation_data = KoumoutsakosLeonard1995() validation_data.read_drag(args.validation_data_path) plot_drag_coefficients(simulation, validation_data, directory=args.directory, save_name=args.save_name, limits=args.plot_limits, show=args.show)
""" 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)
""" 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,