-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstartAcceleration.py
More file actions
117 lines (102 loc) · 7.83 KB
/
startAcceleration.py
File metadata and controls
117 lines (102 loc) · 7.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
#######################################################################################################################
#######################################################################################################################
# Title: Python Electric Vehicle Power Toolkit (PyEVPowerKit)
# Topic: EV Modeling
# File: startAcceleration
# Date: 18.03.2024
# Author: Dr. Pascal A. Schirmer
# Version: V.0.1
# Copyright: Pascal Schirmer
#######################################################################################################################
#######################################################################################################################
#######################################################################################################################
# Import external libs
#######################################################################################################################
# ==============================================================================
# Internal
# ==============================================================================
from src.general.smallFnc import initPath, initSetup
from src.main import main
# ==============================================================================
# External
# ==============================================================================
import warnings
#######################################################################################################################
# Format
#######################################################################################################################
warnings.filterwarnings("ignore")
#######################################################################################################################
# Init
#######################################################################################################################
# ==============================================================================
# Path
# ==============================================================================
setupPath = initPath('PyEVPowerKit')
# ==============================================================================
# Setup
# ==============================================================================
setup = initSetup()
#######################################################################################################################
# Setup and Configuration
#######################################################################################################################
# ==============================================================================
# Experiment
# ==============================================================================
# ------------------------------------------
# Files
# ------------------------------------------
setup['Exp']['name'] = 'Tesla3_Vmax' # Name of the simulation
setup['Dat']['name'] = 'data_Vmax_Tesla3' # Name of the data file
setup['Par']['name'] = 'setup_Tesla3' # Name of the setup file
# ------------------------------------------
# Operating Time
# ------------------------------------------
setup['Exp']['on'] = 8000 # total driving time (hrs)
setup['Exp']['km'] = 300000 # total distance (km)
setup['Exp']['life'] = 131400 # total lifetime (hrs)
# ------------------------------------------
# Settings
# ------------------------------------------
setup['Exp']['SOC'] = 0.8 # Starting SOC value of the HVS (p.u.)
setup['Exp']['Vdc'] = 3 # 1) constant nominal voltage, 2) measured voltage, 3) SOC based
setup['Exp']['Cool'] = 3 # 1) constant coolant temperature, 2) measured coolant temperature, 3) calculated coolant temperature
setup['Exp']['Tc'] = 30 # Constant coolant temperature (degC)
setup['Exp']['Ta'] = 20 # Constant ambient temperature (degC)
setup['Exp']['lim'] = 1 # 0) component limits are not used (using Vdc=1000V), 1) component limits enforced, 2) enforce only voltage
# ------------------------------------------
# Plotting
# ------------------------------------------
setup['Exp']['plot'] = 1 # 1) Plotting reduced, 2) Plotting detail, 3) Plotting lifetime
setup['Exp']['plotAxis'] = 'R' # R) Rear axis, F) Front axis, T) Total values
# ------------------------------------------
# Saving
# ------------------------------------------
setup['Exp']['save'] = 0 # 0) files are not saved, 2) files are saved in \results
# ==============================================================================
# Data
# ==============================================================================
setup['Dat']['fs'] = 10 # Sampling frequency of the data (Hz)
# ==============================================================================
# Parameters
# ==============================================================================
# ------------------------------------------
# Architecture
# ------------------------------------------
setup['Par']['xwd'] = 'RWD' # Number of wheels connected to the drive-train: 1) RWD, 2) FWD, 3) AWD
# ------------------------------------------
# Physical
# ------------------------------------------
setup['Par']['p_a'] = 1.2 # air density (kg/m3)
setup['Par']['v_w'] = 0 # wind speed (m/s)
# ------------------------------------------
# Numeric
# ------------------------------------------
setup['Par']['sol'] = 1 # 1) numeric, 2) symbolic
setup['Par']['eps'] = 1e-12 # Small numerical value
setup['Par']['err'] = 1e-6 # Numerical error
setup['Par']['iterMax'] = 100 # Maximum number of iterations
#######################################################################################################################
# Calculations
#######################################################################################################################
if __name__ == "__main__":
main(setup, setupPath)