Exemplo n.º 1
0
# Turn on SIGFPE handling
fpectl.turnon_sigfpe()
np.seterr(all='raise')

DIO = DataIO(P)
start_time = time.time()

DEL_T = P['DEL_T']
DSTEP = P['DSTEP']
TSTEP = P['TSTEP']
T = P['T']
RHO = P['RHO']
RE = P['RE']

(START_COUNTER, COUNTER, SwiP, GeoP, MotP, Swimmers, SolidP, FSIP,
 PyFEAP) = simulation_startup(P, DIO, PC, Swimmer, solid, FSI, PyFEA)

po().calc_input(MotP[0].THETA_MAX / np.pi * 180., RE,
                MotP[0].THETA_MAX / np.pi * 180., DEL_T)
po().initialize_output((START_COUNTER - 1) * DEL_T)
outerCorr = 2

for i in xrange(START_COUNTER, COUNTER):
    if i == 0:
        for Swim in Swimmers:
            Swim.Body.panel_positions(DSTEP, T[i], P['THETA'][i],
                                      P['HEAVE'][i])
            Swim.Body.surface_kinematics(DSTEP, TSTEP, P['THETA_MINUS'][i],
                                         P['THETA_PLUS'][i],
                                         P['HEAVE_MINUS'][i],
                                         P['HEAVE_PLUS'][i], DEL_T, T[i], i)
Exemplo n.º 2
0
from functions_general import archive, simulation_startup

#po().prog_title('1.0.0')
DIO = DataIO(P)
start_time = time.time()

# Defining local variables to minimize dictionary lookups
DEL_T     = P['DEL_T']
DSTEP     = P['DSTEP']
TSTEP     = P['TSTEP']
T         = P['T']
RHO       = P['RHO']
RE        = P['RE']
VERBOSITY = P['VERBOSITY']

(START_COUNTER, COUNTER, SwiL, GeoL, MotL, Swimmers) = simulation_startup(P, DIO, PC, Swimmer)[0:6]

po().calc_input(MotL[0].THETA_MAX/np.pi*180.,RE,MotL[0].THETA_MAX/np.pi*180.,DEL_T)
po().initialize_output(T[START_COUNTER])
outerCorr = 1

for i in xrange(START_COUNTER, COUNTER):
    if i == 0:
        for Swim in Swimmers:
                Swim.Body.panel_positions(P, i)
                Swim.Body.surface_kinematics(P, i)
                Swim.edge_shed(DEL_T, i)
                Swim.wake_shed(DEL_T, i)
        solve_phi(Swimmers, P, i, outerCorr)
        for Swim in Swimmers:
            Swim.Body.force(P, i)
Exemplo n.º 3
0
# Turn on SIGFPE handling
fpectl.turnon_sigfpe()
np.seterr(all='raise')

#po().prog_title('1.0.0')
DIO = DataIO(P)
start_time = time.time()

DEL_T = P['DEL_T']
DSTEP = P['DSTEP']
TSTEP = P['TSTEP']
T = P['T']
RHO = P['RHO']
RE = P['RE']

(START_COUNTER, COUNTER, SwiP, GeoP, MotP, Swimmers, SolidP, FSIP, PyFEAP) = simulation_startup(P, DIO, PC, Swimmer, solid, FSI, PyFEA)

po().calc_input(MotP[0].THETA_MAX/np.pi*180.,RE,MotP[0].THETA_MAX/np.pi*180.,DEL_T)
po().initialize_output(P['T'][START_COUNTER])
outerCorr = 2

for i in xrange(START_COUNTER, COUNTER):
    if i == 0:
        for Swim in Swimmers:
            Swim.Body.panel_positions(DSTEP, T[i], P['THETA'][i], P['HEAVE'][i])
            Swim.Body.surface_kinematics(DSTEP, TSTEP, P['THETA_MINUS'][i], P['THETA_PLUS'][i], P['HEAVE_MINUS'][i], P['HEAVE_PLUS'][i], DEL_T, T[i], i)
            Swim.edge_shed(DEL_T, i)
            Swim.wake_shed(DEL_T, i)
            Swim.Body.force(P['THETA'][i], RHO, P['V0'], P['C'], 1.0, i, P['SW_SV_FORCES'])
        solve_phi(Swimmers, RHO, DEL_T, i, outerCorr)
        wake_rollup(Swimmers, DEL_T, i, P)
Exemplo n.º 4
0
from terminal_output import print_output as po
import functions_graphics as graph
from functions_general import archive, simulation_startup

#po().prog_title('1.0.0')
DIO = DataIO(P)
start_time = time.time()

DEL_T = P['DEL_T']
DSTEP = P['DSTEP']
TSTEP = P['TSTEP']
T = P['T']
RHO = P['RHO']
RE = P['RE']

(START_COUNTER, COUNTER, SwiP, GeoP, MotP, Swimmers) = simulation_startup(P, DIO, PC, Swimmer)[0:6]

po().calc_input(MotP[0].THETA_MAX/np.pi*180.,RE,MotP[0].THETA_MAX/np.pi*180.,DEL_T)
po().initialize_output(P['T'][START_COUNTER])
outerCorr = 1

# Data points per cycle == 1/(F*DEL_T)
for i in xrange(START_COUNTER, COUNTER):
    if i == 0:
        for Swim in Swimmers:
                Swim.Body.panel_positions(DSTEP, T[i], P['THETA'][i], P['HEAVE'][i])
                Swim.Body.surface_kinematics(DSTEP, TSTEP, P['THETA_MINUS'][i], P['THETA_PLUS'][i], P['HEAVE_MINUS'][i], P['HEAVE_PLUS'][i], DEL_T, T[i], i)
                Swim.edge_shed(DEL_T, i)
                Swim.wake_shed(DEL_T, i)
                Swim.Body.force(P['THETA'][i], RHO, P['V0'], P['C'], 1.0, i, P['SW_SV_FORCES'])
        solve_phi(Swimmers, RHO, DEL_T, i, outerCorr)
Exemplo n.º 5
0
#po().prog_title('1.0.0')
DIO = DataIO(P)
start_time = time.time()

# Defining local variables to minimize dictionary lookups
DEL_T = P['DEL_T']
DSTEP = P['DSTEP']
TSTEP = P['TSTEP']
T = P['T']
RHO = P['RHO']
RE = P['RE']
VERBOSITY = P['VERBOSITY']

(START_COUNTER, COUNTER, SwiL, GeoL, MotL,
 Swimmers) = simulation_startup(P, DIO, PC, Swimmer)[0:6]

po().calc_input(MotL[0].THETA_MAX / np.pi * 180., RE,
                MotL[0].THETA_MAX / np.pi * 180., DEL_T)
po().initialize_output(T[START_COUNTER])
outerCorr = 1

for i in xrange(START_COUNTER, COUNTER):
    if i == 0:
        for Swim in Swimmers:
            Swim.Body.panel_positions(P, i)
            Swim.Body.surface_kinematics(P, i)
            Swim.edge_shed(DEL_T, i)
            Swim.wake_shed(DEL_T, i)
        solve_phi(Swimmers, P, i, outerCorr)
        for Swim in Swimmers:
Exemplo n.º 6
0
from functions_general import simulation_startup, archive
import functions_graphics as graph

DIO = DataIO(P)
start_time = time.time()

DEL_T = P['DEL_T']
DSTEP1 = P['DSTEP']
DSTEP2 = P['DSTEP']
DSTEP3 = P['DSTEP']
TSTEP = P['TSTEP']
T = P['T']
RHO = P['RHO']
RE = P['RE']

(START_COUNTER, COUNTER, SwiP, GeoP, MotP, Swimmers) = simulation_startup(P, DIO, PC, Swimmer)[0:6]

po().calc_input(MotP[0].THETA_MAX/np.pi*180.,RE,MotP[0].THETA_MAX/np.pi*180.,DEL_T)
po().initialize_output(P['T'][START_COUNTER])

outerCorr = 1
for i in xrange(START_COUNTER, COUNTER):
    if i == 0:
        for Swim in Swimmers:

                Swim.Body.panel_positions(DSTEP1, DSTEP2, DSTEP3, T[i], P['THETA'][i], P['HEAVE'][i])
                Swim.Body.surface_kinematics(DSTEP1, DSTEP2, DSTEP3, TSTEP, P['THETA_MINUS'][i], P['THETA_PLUS'][i], P['HEAVE_MINUS'][i], P['HEAVE_PLUS'][i], DEL_T, T[i], i)
                Swim.edge_shed(DEL_T, i)
                Swim.wake_shed(DEL_T, i)
#                Swim.Body.force(P['THETA'][i], RHO, P['V0'], P['C'], 1.0, i, P['SW_SV_FORCES'])
#        solve_phi(Swimmers, RHO, DEL_T, i, outerCorr)
Exemplo n.º 7
0
# Defining local variables to minimize dictionary lookups
DEL_T           = P['DEL_T']
DSTEP           = P['DSTEP']
TSTEP           = P['TSTEP']
T               = P['T']
RHO             = P['RHO']
RE              = P['RE']
VERBOSITY       = P['VERBOSITY']
COUPLING_SCHEME = P['COUPLING_SCHEME']
M_TYPE          = P['M_TYPE']
OUTER_CORR_TOL  = P['OUTER_CORR_TOL']
N_OUTERCORR_MAX = P['N_OUTERCORR_MAX']
SW_INTERP_MTD   = P['SW_INTERP_MTD']

(START_COUNTER, COUNTER, SwiL, GeoL, MotL, Swimmers, SolidL, FSIL, PyFEAL) = simulation_startup(P, DIO, PC, Swimmer, solid, FSI, PyFEA)

po().calc_input(MotL[0].THETA_MAX/np.pi*180.,RE,MotL[0].THETA_MAX/np.pi*180.,DEL_T)
po().initialize_output(T[START_COUNTER])
outerCorr = 2

for i in xrange(START_COUNTER, COUNTER):
    if i == 0:
        for Swim in Swimmers:
            Swim.Body.free_swimming(P, i)
            Swim.Body.panel_positions(P, i)
            Swim.Body.surface_kinematics(P, i)
            Swim.edge_shed(DEL_T, i)
            Swim.wake_shed(DEL_T, i)
        solve_phi(Swimmers, P, i, outerCorr)
        for Swim in Swimmers: