Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New release for MachSysS 0.6.7 #26

Open
wants to merge 29 commits into
base: release
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
a67aa07
A bug fixed
kevinksyTRD Aug 14, 2024
ed3f51e
Merge pull request #25 from SINTEF/fix/convert_feems_result_ptipto_co…
kevinksyTRD Aug 14, 2024
027ef5f
fixed the bug
kevinksyTRD Sep 16, 2024
2b24eac
lint and version
kevinksyTRD Sep 16, 2024
8e29f2e
Merge pull request #28 from SINTEF/bugfix/error-in-feemsresultconvert…
kevinksyTRD Sep 16, 2024
f6d52f9
fixed engine conversion to include engine cycle type
kevinksyTRD Nov 25, 2024
33a6fc7
version for feems
kevinksyTRD Nov 25, 2024
4abbb34
Merge pull request #31 from SINTEF/30-convert-engine-to-pb-missing-en…
kevinksyTRD Nov 25, 2024
3bf7ea8
fuel eu maritime ghg factors updated
kevinksyTRD Nov 26, 2024
a0f407f
Merge pull request #33 from SINTEF/32-update-ghg-factors
kevinksyTRD Nov 26, 2024
bab88f6
error converting engine fixed
kevinksyTRD Dec 17, 2024
dfddc9b
Merge pull request #34 from SINTEF/hotfix/convert-engine-emission-error
kevinksyTRD Dec 17, 2024
245e077
FuelEU Maritime data updated
kevinksyTRD Jan 3, 2025
2bf5002
Merge pull request #35 from SINTEF/hotfix/wtw-co2-calculation
kevinksyTRD Jan 3, 2025
e766fb2
fuel eu maritime factor updated and bug fixed
kevinksyTRD Jan 6, 2025
685157b
Merge pull request #36 from SINTEF/hotfix/wtw-co2-calculation
kevinksyTRD Jan 6, 2025
1ecdb95
fuel eu maritime table bug fixed
kevinksyTRD Jan 6, 2025
67693c0
python version
kevinksyTRD Jan 6, 2025
c415052
Merge pull request #37 from SINTEF/hotfix/wtw-co2-calculation
kevinksyTRD Jan 6, 2025
8df8104
feems result co2 emission updated
kevinksyTRD Jan 23, 2025
1938c1f
syntex error fixed
kevinksyTRD Jan 23, 2025
595f032
syntax error fixed
kevinksyTRD Jan 23, 2025
0384d6f
Merge pull request #38 from SINTEF/feat/feems-result-co2-emissions-up…
kevinksyTRD Jan 23, 2025
72b7202
github action updated
kevinksyTRD Jan 23, 2025
f2b71be
Merge pull request #39 from SINTEF/feat/feems-result-co2-emissions-up…
kevinksyTRD Jan 23, 2025
e7669fd
github action updated
kevinksyTRD Jan 23, 2025
f9f4bc2
Merge pull request #40 from SINTEF/feat/feems-result-co2-emissions-up…
kevinksyTRD Jan 23, 2025
bfffddc
ghg emission without slip added
kevinksyTRD Jan 24, 2025
a3947f5
Merge pull request #41 from SINTEF/feat/feems-result-co2-emissions-up…
kevinksyTRD Jan 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed .DS_Store
Binary file not shown.
7 changes: 7 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM "mcr.microsoft.com/devcontainers/python:3.12"

RUN curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v24.4/protoc-24.4-linux-x86_64.zip \
&& unzip protoc-24.4-linux-x86_64.zip -d protoc \
&& mv protoc/bin/protoc /usr/local/bin/protoc \
&& mv protoc/include/* /usr/local/include/ \
&& rm -rf protoc protoc-24.4-linux-x86_64.zip
Empty file added .devcontainer/devcontainer.env
Empty file.
12 changes: 4 additions & 8 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,17 @@
// README at: https://github.com/devcontainers/templates/tree/main/src/python
{
"name": "Python 3",
"dockerComposeFile": "docker-compose.yml",
"workspaceFolder": "/workspaces/FEEMS",
"service": "app"
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/python:1-3.10-buster",

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "pip3 install --user -r requirements_dev.txt"

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
}
14 changes: 14 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: "3.8"

services:
app:
build:
context: ..
dockerfile: .devcontainer/Dockerfile

volumes:
- ../..:/workspaces:cached
env_file: devcontainer.env

# Overrides default command so things don't shut down after the process ends.
command: sleep infinity
4 changes: 2 additions & 2 deletions .github/workflows/publish_MachSysS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
cd machinery-system-structure
python -m build
- name: Store the distribution packages 📦
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: python-package-distributions-MachSysS
path: machinery-system-structure/dist/
Expand All @@ -41,7 +41,7 @@ jobs:
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: python-package-distributions-MachSysS
path: dist/
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish_RunFeemsSim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
cd RunFEEMSSim
python -m build
- name: Store the distribution packages 📦
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: python-package-distributions-RunFeemsSim
path: RunFEEMSSim/dist/
Expand All @@ -41,7 +41,7 @@ jobs:
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: python-package-distributions-RunFeemsSim
path: dist/
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish_feems.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
cd feems
poetry build
- name: Store the distribution packages 📦
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: python-package-distributions-feems
path: feems/dist/
Expand All @@ -41,7 +41,7 @@ jobs:
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: python-package-distributions-feems
path: dist/
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ __pycache__/
Data
PythonScript
venv
.venv
.idea/
build
dist
Expand Down
59 changes: 43 additions & 16 deletions RunFEEMSSim/00_machinery_calculation.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The autoreload extension is already loaded. To reload it, use:\n",
" %reload_ext autoreload\n"
]
}
],
"outputs": [],
"source": [
"# | default_exp machinery_calculation\n",
"%load_ext autoreload\n",
Expand Down Expand Up @@ -457,6 +448,8 @@
" }\n",
" order_from_switchboard_or_shaftline: 2\n",
" nox_calculation_method: TIER_3\n",
" engine_cycle_type: DIESEL\n",
" uid: \"bcc2923f-7959-470c-9e42-6ac70d7013de\"\n",
" }\n",
" electric_machine {\n",
" name: \"Generator 1\"\n",
Expand Down Expand Up @@ -487,12 +480,14 @@
" }\n",
" }\n",
" order_from_switchboard_or_shaftline: 1\n",
" uid: \"019a4d72-3dbb-4070-a4de-c01a51eabfa4\"\n",
" }\n",
" power_type: POWER_SOURCE\n",
" component_type: GENSET\n",
" name: \"Genset 1\"\n",
" rated_power_kw: 1000\n",
" rated_speed_rpm: 1000\n",
" uid: \"3105a988-1f31-4dc3-9b35-a4b2e37c7450\"\n",
" }\n",
" subsystems {\n",
" engine {\n",
Expand Down Expand Up @@ -531,6 +526,8 @@
" }\n",
" order_from_switchboard_or_shaftline: 2\n",
" nox_calculation_method: TIER_3\n",
" engine_cycle_type: DIESEL\n",
" uid: \"cc2db81c-78a8-40f4-822a-38fb84133e09\"\n",
" }\n",
" electric_machine {\n",
" name: \"Generator 2\"\n",
Expand Down Expand Up @@ -561,12 +558,14 @@
" }\n",
" }\n",
" order_from_switchboard_or_shaftline: 1\n",
" uid: \"a2530555-6656-4af1-b316-9d72c1ec18a4\"\n",
" }\n",
" power_type: POWER_SOURCE\n",
" component_type: GENSET\n",
" name: \"Genset 2\"\n",
" rated_power_kw: 1000\n",
" rated_speed_rpm: 1000\n",
" uid: \"c92c21c9-ccec-4d8a-ae63-33a311e6c918\"\n",
" }\n",
" subsystems {\n",
" converter1 {\n",
Expand Down Expand Up @@ -601,6 +600,7 @@
" }\n",
" }\n",
" order_from_switchboard_or_shaftline: 1\n",
" uid: \"424c257d-9a84-4ae7-9e84-6f84aa40bd5b\"\n",
" }\n",
" battery {\n",
" name: \"Battery 1\"\n",
Expand All @@ -611,11 +611,13 @@
" efficiency_discharging: 0.975\n",
" initial_state_of_charge: 0.8\n",
" order_from_switchboard_or_shaftline: 2\n",
" uid: \"6f342b98-d8a1-4d82-80cf-b20c6a293d58\"\n",
" }\n",
" power_type: ENERGY_STORAGE\n",
" component_type: BATTERY_SYSTEM\n",
" name: \"Battery system 1\"\n",
" rated_power_kw: 1000\n",
" uid: \"8d22bfea-9848-4ef9-b30b-1c9774878ec1\"\n",
" }\n",
" subsystems {\n",
" electric_machine {\n",
Expand Down Expand Up @@ -651,6 +653,7 @@
" }\n",
" }\n",
" order_from_switchboard_or_shaftline: 2\n",
" uid: \"3b8d0c11-99d7-463e-b9ae-ebdbb8d92849\"\n",
" }\n",
" converter1 {\n",
" name: \"Converter 1\"\n",
Expand Down Expand Up @@ -684,12 +687,14 @@
" }\n",
" }\n",
" order_from_switchboard_or_shaftline: 1\n",
" uid: \"0ed3d86c-39b2-43e3-9642-ced5d1a75cd8\"\n",
" }\n",
" power_type: POWER_CONSUMER\n",
" component_type: PROPULSION_DRIVE\n",
" name: \"Propulsion Drive 1\"\n",
" rated_power_kw: 2000\n",
" rated_speed_rpm: 1000\n",
" uid: \"2bdb382d-baf6-41d2-91d1-73a05dbd9b01\"\n",
" }\n",
" subsystems {\n",
" other_load {\n",
Expand All @@ -711,11 +716,13 @@
" }\n",
" }\n",
" order_from_switchboard_or_shaftline: 1\n",
" uid: \"327196ed-b153-41da-8863-0264bb9cb2d5\"\n",
" }\n",
" power_type: POWER_CONSUMER\n",
" component_type: OTHER_LOAD\n",
" name: \"Other load 1\"\n",
" rated_power_kw: 1000\n",
" uid: \"327196ed-b153-41da-8863-0264bb9cb2d5\"\n",
" }\n",
" subsystems {\n",
" converter1 {\n",
Expand Down Expand Up @@ -750,6 +757,7 @@
" }\n",
" }\n",
" order_from_switchboard_or_shaftline: 1\n",
" uid: \"6ff5cf31-f355-4fe0-8d8a-8e347de8c99f\"\n",
" }\n",
" fuel_cell {\n",
" name: \"Fuel cell 1\"\n",
Expand Down Expand Up @@ -788,11 +796,13 @@
" fuel_origin: RENEWABLE_NON_BIO\n",
" }\n",
" number_modules: 3\n",
" uid: \"ce1f21bb-9515-410e-8f47-7b2ce7720cf5\"\n",
" }\n",
" power_type: POWER_SOURCE\n",
" component_type: FUEL_CELL_SYSTEM\n",
" name: \"Fuel cell system 1\"\n",
" rated_power_kw: 3150\n",
" uid: \"f557d4e3-6c02-4438-8f12-528db9e05f66\"\n",
" }\n",
" }\n",
" switchboards {\n",
Expand Down Expand Up @@ -834,6 +844,8 @@
" }\n",
" order_from_switchboard_or_shaftline: 2\n",
" nox_calculation_method: TIER_3\n",
" engine_cycle_type: DIESEL\n",
" uid: \"7946d0dc-ff07-448f-af38-9f5decd7784d\"\n",
" }\n",
" electric_machine {\n",
" name: \"Generator 3\"\n",
Expand Down Expand Up @@ -864,12 +876,14 @@
" }\n",
" }\n",
" order_from_switchboard_or_shaftline: 1\n",
" uid: \"e593462e-0fd4-4d41-b318-d636bd124baa\"\n",
" }\n",
" power_type: POWER_SOURCE\n",
" component_type: GENSET\n",
" name: \"Genset 3\"\n",
" rated_power_kw: 1000\n",
" rated_speed_rpm: 1000\n",
" uid: \"a2ae9fb2-5f1b-4ce5-bfa5-7f062fdc6fc1\"\n",
" }\n",
" subsystems {\n",
" engine {\n",
Expand Down Expand Up @@ -908,6 +922,8 @@
" }\n",
" order_from_switchboard_or_shaftline: 2\n",
" nox_calculation_method: TIER_3\n",
" engine_cycle_type: DIESEL\n",
" uid: \"b90ad174-4641-41d1-aa0e-2bfb9a4ea654\"\n",
" }\n",
" electric_machine {\n",
" name: \"Generator 4\"\n",
Expand Down Expand Up @@ -938,12 +954,14 @@
" }\n",
" }\n",
" order_from_switchboard_or_shaftline: 1\n",
" uid: \"aef74cf1-511b-4b1c-a959-b017e56e75e9\"\n",
" }\n",
" power_type: POWER_SOURCE\n",
" component_type: GENSET\n",
" name: \"Genset 4\"\n",
" rated_power_kw: 1000\n",
" rated_speed_rpm: 1000\n",
" uid: \"a8b24a40-d369-40fe-9e87-9b09081f845f\"\n",
" }\n",
" subsystems {\n",
" converter1 {\n",
Expand Down Expand Up @@ -978,6 +996,7 @@
" }\n",
" }\n",
" order_from_switchboard_or_shaftline: 1\n",
" uid: \"ddbd647e-feb4-4441-85fa-459a18d4622e\"\n",
" }\n",
" battery {\n",
" name: \"Battery 1\"\n",
Expand All @@ -988,11 +1007,13 @@
" efficiency_discharging: 0.975\n",
" initial_state_of_charge: 0.8\n",
" order_from_switchboard_or_shaftline: 2\n",
" uid: \"cfb24a85-556a-4273-b85e-71f891083142\"\n",
" }\n",
" power_type: ENERGY_STORAGE\n",
" component_type: BATTERY_SYSTEM\n",
" name: \"Battery system 1\"\n",
" rated_power_kw: 1000\n",
" uid: \"0fba04e1-2625-4d81-bab5-2ab75c93a605\"\n",
" }\n",
" subsystems {\n",
" electric_machine {\n",
Expand Down Expand Up @@ -1028,6 +1049,7 @@
" }\n",
" }\n",
" order_from_switchboard_or_shaftline: 2\n",
" uid: \"6e578bf0-defb-4a94-a427-d1909f2c3660\"\n",
" }\n",
" converter1 {\n",
" name: \"Converter 1\"\n",
Expand Down Expand Up @@ -1061,12 +1083,14 @@
" }\n",
" }\n",
" order_from_switchboard_or_shaftline: 1\n",
" uid: \"e0330611-b1f7-4c2b-bf83-106a40afd209\"\n",
" }\n",
" power_type: POWER_CONSUMER\n",
" component_type: PROPULSION_DRIVE\n",
" name: \"Propulsion Drive 1\"\n",
" rated_power_kw: 2000\n",
" rated_speed_rpm: 1000\n",
" uid: \"74312963-448a-441e-b1cf-4af993280711\"\n",
" }\n",
" subsystems {\n",
" converter1 {\n",
Expand Down Expand Up @@ -1101,9 +1125,10 @@
" }\n",
" }\n",
" order_from_switchboard_or_shaftline: 1\n",
" uid: \"ce755493-c839-4835-b9e9-16c81a374f5a\"\n",
" }\n",
" fuel_cell {\n",
" name: \"Fuel cell 1\"\n",
" name: \"Fuel cell 2\"\n",
" rated_power_kw: 1000\n",
" efficiency {\n",
" curve {\n",
Expand Down Expand Up @@ -1139,16 +1164,18 @@
" fuel_origin: RENEWABLE_NON_BIO\n",
" }\n",
" number_modules: 3\n",
" uid: \"97fae989-92ce-49c1-a762-3a52759bdcc8\"\n",
" }\n",
" power_type: POWER_SOURCE\n",
" component_type: FUEL_CELL_SYSTEM\n",
" name: \"Fuel cell system 1\"\n",
" name: \"Fuel cell system 2\"\n",
" rated_power_kw: 3150\n",
" uid: \"17eb0cb4-76af-4c8e-9a3f-1114c21fffed\"\n",
" }\n",
" }\n",
"}\n",
"\n",
"Average bsfc for engines: 248.41624983126195 g/kWh\n"
"Average bsfc for engines: 270.1984632538806 g/kWh\n"
]
}
],
Expand Down Expand Up @@ -1253,9 +1280,9 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Average bsfc for main engine: 142.94064926651433 g/kWh\n",
"Average bsfc for pilot fuel for main engine: 0.8867935846667633 g/kWh\n",
"Average bsfc for auxiliary engines: 213.1961969407553 g/kWh\n"
"Average bsfc for main engine: 142.9406492665165 g/kWh\n",
"Average bsfc for pilot fuel for main engine: 0.886793584666771 g/kWh\n",
"Average bsfc for auxiliary engines: 213.19619694076079 g/kWh\n"
]
}
],
Expand Down
Binary file modified RunFEEMSSim/tests/mechanical_propulsion_with_electric_system.mss
Binary file not shown.
Binary file modified RunFEEMSSim/tests/system_proto.mss
Binary file not shown.
Binary file modified feems/feems/.DS_Store
Binary file not shown.
Loading
Loading