From be3027bca39a7fdac81525481096a45f99127528 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 11 Mar 2019 18:36:12 +0330 Subject: [PATCH 01/85] Update art from 3.0 to 3.1 --- dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index be0ff05d..0acc16cd 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,5 +1,5 @@ codecov==2.0.15 -art==3.0 +art==3.1 requests==2.21.0 pytest==4.3.0 pytest-cov==2.6.1 From 7bfe00ac0d7b9b7381915a489db41472c7cd3773 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 18 Mar 2019 18:35:11 +0330 Subject: [PATCH 02/85] Update pytest from 4.3.0 to 4.3.1 --- dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index 0acc16cd..c350c23f 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,7 +1,7 @@ codecov==2.0.15 art==3.1 requests==2.21.0 -pytest==4.3.0 +pytest==4.3.1 pytest-cov==2.6.1 setuptools==40.8.0 bandit==1.5.1 From 1eb17c57d7c214ec15edb181b9f36411750fec09 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 1 Apr 2019 19:39:06 +0430 Subject: [PATCH 03/85] Update pytest from 4.3.1 to 4.4.0 --- dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index c350c23f..d7433da3 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,7 +1,7 @@ codecov==2.0.15 art==3.1 requests==2.21.0 -pytest==4.3.1 +pytest==4.4.0 pytest-cov==2.6.1 setuptools==40.8.0 bandit==1.5.1 From 27b692a4038be07aa88ae36fe33c02dccf896500 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 8 Apr 2019 19:39:06 +0430 Subject: [PATCH 04/85] Update art from 3.1 to 3.2 --- dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index d7433da3..8beb7de8 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,5 +1,5 @@ codecov==2.0.15 -art==3.1 +art==3.2 requests==2.21.0 pytest==4.4.0 pytest-cov==2.6.1 From 6300b110b6b2dde3ea3c72aaf35353d8885a6400 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 8 Apr 2019 19:39:07 +0430 Subject: [PATCH 05/85] Update setuptools from 40.8.0 to 41.0.0 --- dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index 8beb7de8..9f809e49 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -3,6 +3,6 @@ art==3.2 requests==2.21.0 pytest==4.4.0 pytest-cov==2.6.1 -setuptools==40.8.0 +setuptools==41.0.0 bandit==1.5.1 vulture==1.0 \ No newline at end of file From 44e2e42cb550eb2e2dcf0077c5b0fa13eafb70ac Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 15 Apr 2019 19:40:12 +0430 Subject: [PATCH 06/85] Update art from 3.2 to 3.3 --- dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index 9f809e49..bf756850 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,5 +1,5 @@ codecov==2.0.15 -art==3.2 +art==3.3 requests==2.21.0 pytest==4.4.0 pytest-cov==2.6.1 From 0ad14f9170918a83f726e4fd7a86ec407b54a471 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 22 Apr 2019 19:39:05 +0430 Subject: [PATCH 07/85] Update art from 3.3 to 3.4 --- dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index bf756850..818df043 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,5 +1,5 @@ codecov==2.0.15 -art==3.3 +art==3.4 requests==2.21.0 pytest==4.4.0 pytest-cov==2.6.1 From c28749a537ef0840c19f155693c705591f95d7f6 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 22 Apr 2019 19:39:06 +0430 Subject: [PATCH 08/85] Update pytest from 4.4.0 to 4.4.1 --- dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index 818df043..e93cf585 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,7 +1,7 @@ codecov==2.0.15 art==3.4 requests==2.21.0 -pytest==4.4.0 +pytest==4.4.1 pytest-cov==2.6.1 setuptools==41.0.0 bandit==1.5.1 From 4a57ae5b4f7e5fc3caff43cf8c6db7874336eb52 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Wed, 24 Apr 2019 03:48:23 +0430 Subject: [PATCH 09/85] doc : minor edit in README --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 42a1c24e..5194157a 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,6 @@ Modeling and simulation of proton-exchange membrane fuel cells (PEMFC) may work Code Quality CodeFactor - codebeat badge From a3e9a6a0d87002725d76d859ed391643431c4e61 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Wed, 24 Apr 2019 14:49:38 +0430 Subject: [PATCH 10/85] fix : unused library removed from setup.py --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index af295c85..8eee4781 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,6 @@ from setuptools import setup except ImportError: from distutils.core import setup -import logging def get_requirements(): From 07aaf166923b5408b65afab1af08711e5147c341 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Wed, 24 Apr 2019 15:18:37 +0430 Subject: [PATCH 11/85] doc : Functions.py docstring modified #108 --- opem/Functions.py | 283 +++++++++++++++++++++++++++------------------- 1 file changed, 164 insertions(+), 119 deletions(-) diff --git a/opem/Functions.py b/opem/Functions.py index 82a98194..c7554ecd 100644 --- a/opem/Functions.py +++ b/opem/Functions.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# -*- coding: utf-8 -*- +"""OPEM functions.""" import datetime from art import text2art import opem.Script @@ -12,14 +12,15 @@ def integrate(y_vals, h): - ''' - This function calculate integral with Simpson's Rule + """ + Calculate integral with Simpson's Rule. + :param y_vals: output values :type y_valS : list :param h: interval :type h : float :return: integrate output as float - ''' + """ try: i = 1 total = y_vals[0] + y_vals[-1] @@ -35,14 +36,15 @@ def integrate(y_vals, h): def linear_plot(x, y): - ''' - This function clear input data and call estimate_coef + """ + Clear input data and call estimate_coef. + :param x: x data :type x : list :param y: y data :type y : list :return: [estimated_y,intercept,slope] as list - ''' + """ clear_x = [] clear_y = [] estimate_y = [] @@ -63,14 +65,15 @@ def linear_plot(x, y): def estimate_coef(clear_x, clear_y): - ''' - This function use simple linear regression for linear approxiamtion + """ + Simple linear regression for linear approximation. + :param clear_x: cleared_x :type clear_x : list :param clear_y: cleared_y :type clear_y : list :return: [slope,intercept] - ''' + """ try: n = len(clear_x) mean_x = sum(clear_x) / n @@ -90,22 +93,24 @@ def estimate_coef(clear_x, clear_y): def line(num=11, char="#"): - ''' - This function print line of char + """ + Print line of char. + :param num: number of character in this line :type num : int :param char: character :type char : str :return: None - ''' + """ print(char * num) def check_update(Version): - ''' - This function check for new opem version in website + """ + Check for new opem version in website. + :return: None - ''' + """ try: update_obj = requests.get(UpdateUrl) update_data = update_obj.text @@ -119,14 +124,15 @@ def check_update(Version): def filter_default(input_dict, params_default): - ''' - This function filter input parameters with default params + """ + Filter input parameters with default params. + :param input_dict: input parameters :type input_dict : dict :param params_default: default parameters :type params_default : dict :return: modified input_dict as dict - ''' + """ for i in params_default.keys(): if i not in input_dict.keys(): input_dict[i] = params_default[i] @@ -134,12 +140,13 @@ def filter_default(input_dict, params_default): def get_precision(input_number): - ''' - This function return precision of input number + """ + Return precision of input number. + :param input_number: input number :type input_number : float :return: precision as int - ''' + """ input_string = str(input_number) if "." in input_string: splitted_input = input_string.split(".") @@ -148,12 +155,13 @@ def get_precision(input_number): def isfloat(value): - ''' - This function check input for float conversion + """ + Check input for float conversion. + :param value: input value :type value:str :return: True if input_value is a number and False otherwise - ''' + """ try: float(value) return True @@ -162,14 +170,15 @@ def isfloat(value): def rounder(input_number, digit=2): - ''' - This function round input number + """ + Round input number. + :param input_number: input number :type input_number : anything :param digit: precision :type digit : int :return: round number as float - ''' + """ try: if isfloat(input_number): return round(input_number, digit) @@ -179,21 +188,23 @@ def rounder(input_number, digit=2): def input_test(a): - ''' - This function is for test Get_Input + """ + This function is for test Get_Input. + :param a: input :return: "1" - ''' + """ return "1" def Get_Input(InputParams, input_item=input, params_default={}): """ - This function get inputs from users - :param InputParams : InputParams for each model + Get inputs from users. + + :param InputParams : input parameters for each model :type InputParams :dict :param input_item : input function (this parameter added for Get_Input doctest) - :return: Input Dictionary + :return: input dictionary """ try: Input_Keys = sorted(InputParams.keys()) @@ -237,12 +248,13 @@ def Output_Save( file, PrintMode): """ - This function write analysis result in Simulation-Result.opem file - :param OutputParamsKeys : OutputParams Key as list + Write analysis result in Simulation-Result.opem file. + + :param OutputParamsKeys : output parameters keys :type OutputParamsKeys : list - :param OutputDict: Analysis Result Dictionary - :type OutputDict:dict - :param OutputParams : Output Params as dict + :param OutputDict: analysis result dictionary + :type OutputDict: dict + :param OutputParams : output parameters :type OutputParams : dict :param i: cell load current [A] :type i : float @@ -275,10 +287,11 @@ def Output_Save( def Output_Init(InputDict, Title, Name): """ - This function initialize output file - :param InputDict: Input Test Vector + Initialize output file. + + :param InputDict: input test vector :type InputDict:dict - :param Title : Simulation Title + :param Title : simulation title :type Title :str :return: file object """ @@ -305,10 +318,11 @@ def Output_Init(InputDict, Title, Name): def CSV_Init(OutputParamsKeys, OutputParams, Title, Name): """ - This function initialize csv file - :param OutputParamsKeys: OutputParams Key as list + Initialize csv file. + + :param OutputParamsKeys: output parameters Keys :type OutputParamsKeys : list - :param OutputParams : Output Params as dict + :param OutputParams : output parameters :type OutputParams : dict :return: file object """ @@ -325,26 +339,28 @@ def CSV_Init(OutputParamsKeys, OutputParams, Title, Name): def None_Omit(Input_Str): - ''' - This function replace None object with "None" string - :param Input_Str: Input String + """ + Replace None object with "None" string. + + :param Input_Str: input string :type Input_Str : str :return: modified string as str - ''' + """ result = Input_Str result = result.replace("None", '\"None\"') return result def HTML_Init(Title, Name): - ''' - This function initialize html file - :param Title: Simulation title (analysis model) + """ + Initialize html file. + + :param Title: simulation title (analysis model) :type Title : str :param Name: file name :type Name : str :return: HTML file as file obj - ''' + """ if Title not in os.listdir(os.getcwd()): os.mkdir(Title) HTMLFile = io.open( @@ -367,16 +383,17 @@ def HTML_Init(Title, Name): def HTML_Desc(Title, Description, file): - ''' - This function write model description in html file - :param Title: Simulation title (analysis model) + """ + Write model description in html file. + + :param Title: simulation title (analysis model) :type Title : str - :param Description: Model description + :param Description: model description :type Description : str :param file: html file object :type file : file object :return: None - ''' + """ file.write('

What is ' + Title + ' ?

\n') file.write( '

' + @@ -385,8 +402,9 @@ def HTML_Desc(Title, Description, file): def HTML_Chart(x, y, color, x_label, y_label, chart_name, size, file): - ''' - This function write chartjs chart in html file + """ + Write chartjs chart in html file. + :param x: x data as a string list :type x : str :param y: y data as string list (or list of y) @@ -401,7 +419,7 @@ def HTML_Chart(x, y, color, x_label, y_label, chart_name, size, file): :param file: html file object :type file : file object :return: None - ''' + """ chart_data = "" chart_title = str(chart_name) if isinstance(y, list): @@ -427,16 +445,17 @@ def HTML_Chart(x, y, color, x_label, y_label, chart_name, size, file): def HTML_Input_Table(Input_Dict, Input_Params, file): - ''' - This function add table to html file - :param Input_Dict: Input values dictionary + """ + Add table to html file. + + :param Input_Dict: input values dictionary :type Input_Dict : dict - :param Input_Params: Input params dictionary + :param Input_Params: input parameters dictionary :type Input_Params : dict :param file: html file object :type file : file object :return: None - ''' + """ file.write('

Inputs

\n') file.write( '\n') @@ -476,16 +495,17 @@ def HTML_Overall_Params_Table( Input_Params, file, header=False): - ''' - This function add table to html file - :param Input_Dict: Input values dictionary + """ + Add table to html file. + + :param Input_Dict: input values dictionary :type Input_Dict : dict - :param Input_Params: Input params dictionary + :param Input_Params: input parameters dictionary :type Input_Params : dict :param file: html file object :type file : file object :return: None - ''' + """ if header: file.write('

Overall Parameters

\n') file.write( @@ -524,12 +544,13 @@ def HTML_Overall_Params_Table( def HTML_End(file): - ''' - This function add end part of html file + """ + Add end part of html file. + :param file: html file object :type file : file object :return: None - ''' + """ file.write( '

Generated By ' @@ -541,10 +562,11 @@ def HTML_End(file): def CSV_Save(OutputParamsKeys, OutputDict, i, file): """ - This Function Save Parameters In CSV File - :param OutputParamsKeys : OutputParams Key as list + Save parameters in CSV file. + + :param OutputParamsKeys : output parameters keys :type OutputParamsKeys : list - :param OutputDict: Analysis Result Dictionary + :param OutputDict: analysis result dictionary :type OutputDict:dict :param i: cell load current [A] :type i : float @@ -560,12 +582,13 @@ def CSV_Save(OutputParamsKeys, OutputDict, i, file): def filter_lambda(Input_Dict): - ''' - This function filter lambda parameter - :param Input_Dict: Input Parameters Dictionary + """ + Filter lambda parameter. + + :param Input_Dict: input parameters dictionary :type Input_Dict : dict - :return: Modified Dictionary - ''' + :return: modified dictionary + """ try: if Input_Dict["lambda"] > 23: Input_Dict["lambda"] = 23 @@ -581,26 +604,28 @@ def filter_lambda(Input_Dict): def left_justify(words, width): - ''' - This function left justify words + """ + Left justify words. + :param words: list of words :type words : list :param width: width of each line :type width: int :return: left justified words as list - ''' + """ return ' '.join(words).ljust(width) def justify(words, width): - ''' - This function justify input words + """ + Justify input words. + :param words: list of words :type words : list :param width: width of each line :type width : int :return: list of justified words as list - ''' + """ line = [] col = 0 for word in words: @@ -626,16 +651,17 @@ def justify(words, width): def description_print(Analysis_Name, Description_Dict, Width=100): - ''' - This function print justified text for overview and each model description in console - :param Analysis_Name: Analysis model name + """ + Print justified text for overview and each model description in console. + + :param Analysis_Name: analysis model name :type Analysis_Name : str - :param Description_Dict: Description dict ( in Params) + :param Description_Dict: description dict (in params) :type Description_Dict : dict - :param Width: Width of each line (for justify) + :param Width: width of each line (for justify) :type Width : int :return: None - ''' + """ line() if Analysis_Name.find("Padulles") != -1: print("\n") @@ -660,6 +686,21 @@ def description_control( User_Input, Links_Dict, Vectors_Dict): + """ + Control each analysis description. + + :param Analysis_Name: analysis name + :type Analysis_Name: str + :param Analysis_List: analysis list + :type Analysis_List: list + :param User_Input: user input + :type User_Input: str + :param Links_Dict: documents links + :type Links_Dict: dict + :param Vectors_Dict: test vectors + :type Vectors_Dict: dict + :return: None + """ if User_Input.upper() == "M": webbrowser.open_new(Links_Dict[Analysis_Name]) elif User_Input.upper() == "T": @@ -678,12 +719,13 @@ def description_control( def filter_alpha(Input_Dict): - ''' - This function filter alpha parameter - :param Input_Dict: Input Parameters Dictionary + """ + Filter alpha parameter. + + :param Input_Dict: input parameters dictionary :type Input_Dict : dict - :return: Modified Dictionary - ''' + :return: modified dictionary + """ try: if Input_Dict["alpha"] > 1: Input_Dict["alpha"] = 1 @@ -697,18 +739,19 @@ def filter_alpha(Input_Dict): def warning_check_1(Vcell, I_Warning, I, warning_flag): - ''' - This function check Vcell is negative or not - :param Vcell: Vcell of FC Voltage + """ + Check Vcell is negative or not. + + :param Vcell: Vcell of FC voltage :type Vcell : float - :param I_Warning: First I of negative range + :param I_Warning: first I of negative range :type I_Warning : float - :param I: Test current + :param I: test current :type I : float - :param warning_flag: Input warning flag + :param warning_flag: input warning flag :type warning_flag : bool :return: update warning_flag and I_Warning [bool,float] - ''' + """ if not warning_flag: try: if Vcell < 0: @@ -721,14 +764,15 @@ def warning_check_1(Vcell, I_Warning, I, warning_flag): def warning_check_2(Vcell, warning_flag): - ''' - This function check Vcell is None or not + """ + Check Vcell is None or not. + :param Vcell: Vcell of FC Voltage :type Vcell : float - :param warning_flag: Input warning flag + :param warning_flag: input warning flag :type warning_flag : bool :return: update warning_flag as bool - ''' + """ if not warning_flag: if Vcell is None: return True @@ -742,20 +786,21 @@ def warning_print( I_Warning, file, PrintMode): - ''' - This function print warning message and write messages to HTML report - :param warning_flag_1: First warning message (Vcell <0) + """ + Print warning message and write messages to HTML report. + + :param warning_flag_1: first warning message (Vcell <0) :type warning_flag_1 : bool - :param warning_flag_2: Second warning message (Vcell==None) + :param warning_flag_2: second warning message (Vcell==None) :type warning_flag_2 : bool - :param I_Warning: First I of negative range + :param I_Warning: first I of negative range :type I_Warning : float :param file: html file object :type file : file object - :param PrintMode : Print Mode Control Flag (True : Print Outputs) - :type PrintMode:bool - :return: - ''' + :param PrintMode : print mode control flag (True : print outputs) + :type PrintMode: bool + :return: None + """ if warning_flag_1: file.write( '

' + From bc8abcbc997024453a613235d5c8e74448062842 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Wed, 24 Apr 2019 15:19:57 +0430 Subject: [PATCH 12/85] doc : Params.py docstring modified #108 --- opem/Params.py | 1 + 1 file changed, 1 insertion(+) diff --git a/opem/Params.py b/opem/Params.py index d7e776f1..df5c66ae 100644 --- a/opem/Params.py +++ b/opem/Params.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +"""OPEM parameters.""" Version = 1.0 Website = "http://www.ecsim.ir/opem" UpdateUrl = "http://www.ecsim.ir/opem/update" From d9567865d7070c3e1e3bdf2d55cf57c180a558e3 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Wed, 24 Apr 2019 15:20:24 +0430 Subject: [PATCH 13/85] doc : Profile.py docstring modified #108 --- opem/Profile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/opem/Profile.py b/opem/Profile.py index 1172f9f6..6041f452 100644 --- a/opem/Profile.py +++ b/opem/Profile.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +"""OPEM profile.""" from opem.Static.Amphlett import Static_Analysis as Amphlett_Static_Analysis Test_Vector={"T":343.15,"PH2":1,"PO2":1,"i-start":0,"i-stop":100,"i-step":0.005,"A":50.6,"l":0.0178,"lambda":23,"N":1,"R":0,"JMax":1.5,"B":0.016,"Name":"Test"} Result = Amphlett_Static_Analysis(InputMethod=Test_Vector,TestMode=True,PrintMode=False,ReportMode=True) From da2ffb569ffb40e5c28311491db215ea6512607d Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Wed, 24 Apr 2019 15:21:10 +0430 Subject: [PATCH 14/85] doc : Script.py docstring modified #108 --- opem/Script.py | 1 + 1 file changed, 1 insertion(+) diff --git a/opem/Script.py b/opem/Script.py index 54089b65..06bc576c 100644 --- a/opem/Script.py +++ b/opem/Script.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +"""Chart.js script.""" JS_SCRIPT = r''' /*! * Chart.js From 47841e92880ae860a2fcca492a543e255a32f93d Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Wed, 24 Apr 2019 15:22:03 +0430 Subject: [PATCH 15/85] doc : __main__.py docstring modified #108 --- opem/__main__.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/opem/__main__.py b/opem/__main__.py index 07d15a76..454f54d8 100644 --- a/opem/__main__.py +++ b/opem/__main__.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- -''' -OPEM Main File -''' +"""OPEM main.""" import sys import os import doctest From 50c2d6cbb92ea64875c34b29e4bd8a423b48b0d8 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Wed, 24 Apr 2019 15:22:36 +0430 Subject: [PATCH 16/85] doc : __init__.py docstring modified #108 --- opem/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/opem/__init__.py b/opem/__init__.py index 80506b6a..c1d3d436 100644 --- a/opem/__init__.py +++ b/opem/__init__.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- -''' -OPEM Init -''' +"""OPEM modules.""" + import opem.Static.Amphlett import opem.Static.Larminie_Dicks import opem.Static.Chamberline_Kim From 0f0ccb4c53f2a086128508273c974d0297ba5cbb Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Wed, 24 Apr 2019 15:34:03 +0430 Subject: [PATCH 17/85] doc : Amphlett.py docstring modified #108 --- opem/Static/Amphlett.py | 177 ++++++++++++++++++++++------------------ opem/Static/__init__.py | 1 + 2 files changed, 100 insertions(+), 78 deletions(-) diff --git a/opem/Static/Amphlett.py b/opem/Static/Amphlett.py index ea4e7e1a..235a53d0 100644 --- a/opem/Static/Amphlett.py +++ b/opem/Static/Amphlett.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +"""Amphlett model functions.""" import math from opem.Params import Amphlett_InputParams as InputParams from opem.Params import Amphlett_OutputParams as OutputParams @@ -10,16 +11,17 @@ def Power_Thermal_Calc(VStack, N, i): - ''' - This function calculate thermal power + """ + Calculate thermal power. + :param VStack: VStack [V] :type VStack : float :param N: number of single cells :type N : int - :param i: Cell load current [A] + :param i: cell load current [A] :type i : float - :return: Thermal power [W] - ''' + :return: thermal power [W] + """ try: return i * ((N * Eth) - VStack) except TypeError: @@ -27,16 +29,17 @@ def Power_Thermal_Calc(VStack, N, i): def Power_Total_Calc(VStack_List, i_step, N): - ''' - This function calculate total elec power and total thermal power by calling integrate function + """ + Calculate total elec power and total thermal power by calling integrate function. + :param VStack_List: Vstack list :type VStack_List : list - :param i_step: Cell load current step + :param i_step: cell load current step :type i_step : float :param N: number of single cells :type N : int - :return: [Total elec power,Total thermal power] as list - ''' + :return: [total elec power,total thermal power] as list + """ try: Filtered_List = list(filter(lambda x: x is not None, VStack_List)) Filtered_List_Not = list(map(lambda x: (N * Eth) - x, Filtered_List)) @@ -49,14 +52,15 @@ def Power_Total_Calc(VStack_List, i_step, N): def Linear_Aprox_Params_Calc(B0, B1): - ''' - This function calculate linear approximation overall parameters + """ + Calculate linear approximation overall parameters. + :param B0: intercept :type B0 : float :param B1: slope :type B1 : float :return: [Wmax,Vcell_Wmax] as list - ''' + """ Wmax = 0 Vcell_Wmax = 0 try: @@ -75,16 +79,17 @@ def Linear_Aprox_Params_Calc(B0, B1): def Max_Params_Calc(Power_List, EFF_List, VStack_List): - ''' - This function calculate maximum overall parameters - :param Power_List: Power list + """ + Calculate maximum overall parameters. + + :param Power_List: power list :type Power_List : list - :param EFF_List: Efficiency list + :param EFF_List: efficiency list :type EFF_List : list :param VStack_List: Vstack list :type VStack_List : list - :return: {Max Power,Max Efficiency,Max VStack] as list - ''' + :return: {max power,max efficiency,max VStack] as list + """ Max_Power = max(list(filter(lambda x: x is not None, Power_List))) Max_EFF = EFF_List[Power_List.index(Max_Power)] Max_VStack = VStack_List[Power_List.index(Max_Power)] @@ -95,14 +100,15 @@ def Max_Params_Calc(Power_List, EFF_List, VStack_List): def R_Calc(V, i): - ''' - This function calculate cell total resistance + """ + Calculate cell total resistance. + :param V: cell voltage [V] :type V : float - :param i: Cell load current [A] + :param i: cell load current [A] :type i : float - :return: Resistance as float [ohm] - ''' + :return: resistance as float [ohm] + """ try: return V / i except (TypeError, ZeroDivisionError): @@ -113,10 +119,11 @@ def R_Calc(V, i): def Enernst_Calc(T, PH2, PO2): """ - This function calculate Enernst - :param T: Cell Operation Temperature [K] + Calculate Enernst. + + :param T: cell operation temperature [K] :type T : float - :param PH2: Partial Pressure [atm] + :param PH2: partial pressure [atm] :type PH2 : float :param PO2: partial Pressure [atm] :type PO2: float @@ -134,10 +141,11 @@ def Enernst_Calc(T, PH2, PO2): def CH2_Calc(PH2, T): """ - This function calculate CH2 - :param PH2: Partial Pressure [atm] + Calculate CH2. + + :param PH2: partial pressure [atm] :type PH2 : float - :param T: Cell Operation Temperature [K] + :param T: cell operation temperature [K] :type T:float :return: CH2 [mol/cm^3] as float """ @@ -152,10 +160,11 @@ def CH2_Calc(PH2, T): def CO2_Calc(PO2, T): """ - This function calculate CO2 - :param PO2: Partial Pressure [atm] + Calculate CO2. + + :param PO2: partial pressure [atm] :type PO2 : float - :param T: Cell Operation Temperature [K] + :param T: cell operation temperature [K] :type T : float :return: CO2 [mol/cm^3] as float """ @@ -170,16 +179,17 @@ def CO2_Calc(PO2, T): def Rho_Calc(i, A, T, lambda_param): """ - This function calculate Rho - :param i: Cell load current [A] + Calculate Rho. + + :param i: cell load current [A] :type i : float :param A: active area [cm^2] :type A:float - :param T: Cell Operation Temperature [K] + :param T: cell operation temperature [K] :type T:float :param lambda_param: is an adjustable parameter with a possible maximum value of 23 :type lambda_param : float - :return: Rho -- > Membrane Specific Resistivity [ohm.cm] as float + :return: Rho -- > membrane specific resistivity [ohm.cm] as float """ try: result = (181.6 * (1 + 0.03 * (i / A) + 0.062 * ((T / 303) ** 2) * ((i / A) ** 2.5)) @@ -193,12 +203,13 @@ def Rho_Calc(i, A, T, lambda_param): def Xi2_Calc(A, PH2, T): """ - This function calculate Xi2 + Calculate Xi2. + :param A: active area [cm^2] :type A : float - :param PH2: Partial Pressure [atm] + :param PH2: partial pressure [atm] :type PH2:float - :param T: Cell Operation Temperature [K] + :param T: cell operation temperature [K] :type T:float :return: Xi2 as float """ @@ -215,12 +226,13 @@ def Xi2_Calc(A, PH2, T): def Eta_Conc_Calc(i, A, B, JMax): """ - This function calculate Eta Concentration - :param i: Cell load current [A] + Calculate Eta concentration. + + :param i: cell load current [A] :type i :float :param A: active area [cm^2] :type A : float - :return: Eta Concentration [V] as float + :return: Eta concentration [V] as float """ try: if i != 0: @@ -236,20 +248,21 @@ def Eta_Conc_Calc(i, A, B, JMax): def Eta_Ohmic_Calc(i, l, A, T, lambda_param, R_elec=None): """ - This function calculate Eta Ohmic - :param R_elec: R-Electronic [ohm] + Calculate Eta ohmic. + + :param R_elec: R electronic [ohm] :type R_elec:float :param i: cell load current [A] :type i:float - :param l: Membrane Thickness [cm] + :param l: membrane thickness [cm] :type l:float :param A: active area [cm^2] :type A:float - :param T: Cell Operation Temperature [K] + :param T: cell operation temperature [K] :type T:float :param lambda_param: is an adjustable parameter with a possible maximum value of 23 :type lambda_param:float - :return: Eta Ohmic [V] as float + :return: Eta ohmic [V] as float """ try: if i != 0: @@ -269,14 +282,15 @@ def Eta_Ohmic_Calc(i, l, A, T, lambda_param, R_elec=None): def Eta_Act_Calc(T, PO2, PH2, i, A): """ - This function calculate Eta Activation - :param T: Cell Operation Temperature [K] + Calculate Eta activation. + + :param T: cell operation temperature [K] :type T:float - :param PO2: Partial Pressure [atm] + :param PO2: partial pressure [atm] :type PO2:float :param i: cell load current [A] :type i:float - :return: Eta Activation [V] as float + :return: Eta activation [V] as float """ try: if i != 0: @@ -294,10 +308,11 @@ def Eta_Act_Calc(T, PO2, PH2, i, A): def Efficiency_Calc(Vcell): """ - This function calculate PEM Cell Efficiency - :param Vcell: Cell Voltage [V] + Calculate PEM cell efficiency. + + :param Vcell: cell voltage [V] :type Vcell:float - :return: Efficiency as float + :return: efficiency as float """ try: result = (uF * Vcell) / HHV @@ -310,10 +325,11 @@ def Efficiency_Calc(Vcell): def VStack_Calc(N, Vcell): """ - This function calculate VStack + Calculate VStack. + :param N: number of single cells :type N :int - :param Vcell: Cell Voltage [V} + :param Vcell: cell voltage [V} :type Vcell:float :return: VStack [V] as float """ @@ -328,14 +344,15 @@ def VStack_Calc(N, Vcell): def Loss_Calc(Eta_Act, Eta_Ohmic, Eta_Conc): """ - This function calculate loss - :param Eta_Act: Eta Activation [V] + Calculate loss. + + :param Eta_Act: Eta activation [V] :type Eta_Act : float - :param Eta_Ohmic: Eta Ohmic [V] + :param Eta_Ohmic: Eta ohmic [V] :type Eta_Ohmic : float - :param Eta_Conc: Eta Concentration [V] + :param Eta_Conc: Eta concentration [V] :type Eta_Conc : float - :return: Loss [V] as float + :return: loss [V] as float """ try: result = Eta_Act + Eta_Ohmic + Eta_Conc @@ -348,12 +365,13 @@ def Loss_Calc(Eta_Act, Eta_Ohmic, Eta_Conc): def Vcell_Calc(Enernst, Loss): """ - This function calculate cell voltage + Calculate cell voltage. + :param Enernst: Enernst [V} :type Enernst : float - :param Loss: Loss [V] + :param Loss: loss [V] :type Loss : float - :return: Cell voltage [V] as float + :return: cell voltage [V] as float """ try: result = Enernst - Loss @@ -366,12 +384,13 @@ def Vcell_Calc(Enernst, Loss): def Power_Calc(Vcell, i): """ - This function calculate power + Calculate power. + :param Vcell: Vcell Voltage [V] :type Vcell : float :param i: cell load current [A] :type i : float - :return: Cell power [W] as float + :return: cell power [W] as float """ try: result = Vcell * i @@ -383,14 +402,15 @@ def Power_Calc(Vcell, i): def PowerStack_Calc(Power, N): - ''' - This function calculate power_stack - :param Power: Single Cell power [W] + """ + Calculate power_stack. + + :param Power: single cell power [W] :type Power : float :param N: number of single cells :type N : int - :return: Power Stack [W] as float - ''' + :return: power stack [W] as float + """ try: result = N * Power return result @@ -406,16 +426,17 @@ def Static_Analysis( PrintMode=True, ReportMode=True): """ - This function run Amphlett static analysis with calling other functions - :param InputMethod : Input Function Or Input Test Vector - :param TestMode : Test Mode Flag + Run Amphlett static analysis with calling other functions. + + :param InputMethod : input function or input test vector + :param TestMode : test mode flag :type InputMethod : dict or Get_Input function object :type TestMode:bool - :param PrintMode : Print Mode Control Flag (True : Print Outputs) + :param PrintMode : print mode control flag (True : print outputs) :type PrintMode:bool - :param ReportMode : Report Mode Control Flag (True : Generate Report) + :param ReportMode : report mode control flag (True : generate report) :type ReportMode: bool - :return: Result as dict + :return: result as dict """ OutputFile = None CSVFile = None diff --git a/opem/Static/__init__.py b/opem/Static/__init__.py index 40a96afc..1e56bc6c 100644 --- a/opem/Static/__init__.py +++ b/opem/Static/__init__.py @@ -1 +1,2 @@ # -*- coding: utf-8 -*- +"""OPEM static modules.""" \ No newline at end of file From b5728ecf065295def05f341399a76168cf249940 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Thu, 25 Apr 2019 00:59:10 +0430 Subject: [PATCH 18/85] doc : Chamberline_Kim.py docstring modified #108 --- opem/Static/Chamberline_Kim.py | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/opem/Static/Chamberline_Kim.py b/opem/Static/Chamberline_Kim.py index 23517b0d..d879d64c 100644 --- a/opem/Static/Chamberline_Kim.py +++ b/opem/Static/Chamberline_Kim.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +"""Chamberline-Kim model functions.""" import math from opem.Params import Chamberline_InputParams as InputParams from opem.Params import Chamberline_OutputParams as OutputParams @@ -10,22 +11,23 @@ def Vcell_Calc(E0, b, R, m, n, i, A): """ - This function calculate cell voltage - :param E0: Open circuit voltage [V] + Calculate cell voltage. + + :param E0: open circuit voltage [V] :type E0 : float :param b: Tafel's parameter for the oxygen reduction [V] :type b : float - :param R: Resistance [ohm.cm2] + :param R: resistance [ohm.cm2] :type R : float - :param m: Diffusion's parameters [V] + :param m: diffusion's parameters [V] :type m : float - :param n: Diffusion's parameters [V] + :param n: diffusion's parameters [V] :type n : float - :param i: Cell operating current [A] + :param i: cell operating current [A] :type i : float - :param A: Active area [cm2] + :param A: active area [cm2] :type A : float - :return: Cell voltage [V] + :return: cell voltage [V] """ try: J = i / A @@ -43,16 +45,17 @@ def Static_Analysis( PrintMode=True, ReportMode=True): """ - This function run Chamberline-Kim static analysis with calling other functions - :param InputMethod : Input Function Or Input Test Vector - :param TestMode : Test Mode Flag + Run Chamberline-Kim static analysis with calling other functions. + + :param InputMethod : input function or input test vector + :param TestMode : test mode flag :type InputMethod : dict or Get_Input function object - :type TestMode:bool - :param PrintMode : Print Mode Control Flag (True : Print Outputs) + :type TestMode: bool + :param PrintMode : print mode control flag (True : print outputs) :type PrintMode:bool - :param ReportMode : Report Mode Control Flag (True : Generate Report) + :param ReportMode : report mode control flag (True : generate report) :type ReportMode: bool - :return: Result as dict + :return: result as dict """ OutputFile = None CSVFile = None From db759d1fe6acef02426138296386227f5787d7df Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Thu, 25 Apr 2019 01:01:52 +0430 Subject: [PATCH 19/85] doc : Larminie_Dicks.py docstring modified #108 --- opem/Static/Larminie_Dicks.py | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/opem/Static/Larminie_Dicks.py b/opem/Static/Larminie_Dicks.py index a28d5259..c6331043 100644 --- a/opem/Static/Larminie_Dicks.py +++ b/opem/Static/Larminie_Dicks.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +"""Larminie-Dicks model functions.""" import math from opem.Static.Amphlett import Power_Calc, Efficiency_Calc, VStack_Calc, PowerStack_Calc, Power_Thermal_Calc, Power_Total_Calc, Linear_Aprox_Params_Calc, Max_Params_Calc from opem.Params import Larminiee_InputParams as InputParams @@ -10,24 +11,25 @@ def Vcell_Calc(E0, i, i_0, i_n, i_L, R_M, A, B): """ - This function calculate cell voltage - :param E0: Fuel Cell reversible no loss voltage [V] + Calculate cell voltage. + + :param E0: fuel Cell reversible no loss voltage [V] :type E0 : float - :param i : Cell operating current [A] + :param i : cell operating current [A] :type i : float - :param i_0: Exchange current at which the overvoltage begins to move from zero [A] + :param i_0: exchange current at which the overvoltage begins to move from zero [A] :type i_0 : float - :param i_n : Internal current [A] + :param i_n : internal current [A] :type i_n : float - :param i_L : Limiting current [A] + :param i_L : limiting current [A] :type i_L : float - :param R_M : The membrane and contact resistances [ohm] + :param R_M : the membrane and contact resistances [ohm] :type R_M : float - :param A : The slope of the Tafel line [V] + :param A : the slope of the Tafel line [V] :type A : float - :param B : Constant in the mass transfer term [V} + :param B : constant in the mass transfer term [V} :type B : float - :return: Cell voltage [V] + :return: cell voltage [V] """ try: result = E0 - A * (math.log((i + i_n) / i_0)) - R_M * \ @@ -45,14 +47,15 @@ def Static_Analysis( PrintMode=True, ReportMode=True): """ - This function run Larminie-Dicks static analysis with calling other functions - :param InputMethod : Input Function Or Input Test Vector - :param TestMode : Test Mode Flag + Run Larminie-Dicks static analysis with calling other functions. + + :param InputMethod : input function or input test vector + :param TestMode : test mode flag :type InputMethod : dict or Get_Input function object :type TestMode:bool - :param PrintMode : Print Mode Control Flag (True : Print Outputs) + :param PrintMode : print mode control flag (True : print outputs) :type PrintMode:bool - :param ReportMode : Report Mode Control Flag (True : Generate Report) + :param ReportMode : report mode control flag (True : generate report) :type ReportMode: bool :return: Result as dict """ From a76c3322c6dda7f768ca5c6da4a021301d4b8633 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Thu, 25 Apr 2019 01:04:03 +0430 Subject: [PATCH 20/85] doc : Padulles_Amphlett.py docstring modified #108 --- opem/Dynamic/Padulles_Amphlett.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/opem/Dynamic/Padulles_Amphlett.py b/opem/Dynamic/Padulles_Amphlett.py index 296f5bb3..d48276b9 100644 --- a/opem/Dynamic/Padulles_Amphlett.py +++ b/opem/Dynamic/Padulles_Amphlett.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +"""Padulles-Amphlett model functions.""" from opem.Params import Padulles_Amphlett_InputParams as InputParams from opem.Params import Padulles_Amphlett_Outparams as OutputParams from opem.Params import Padulles_Amphlett_Params_Default as Defaults @@ -13,12 +14,13 @@ def Vcell_Calc(Enernst, Loss, N): """ - This function calculate cell voltage + Calculate cell voltage. + :param Enernst: Enernst [V} :type Enernst : float - :param Loss: Loss [V] + :param Loss: loss [V] :type Loss : float - :return: Cell voltage [V] as float + :return: cell voltage [V] as float """ try: result = Enernst - N * Loss @@ -35,16 +37,17 @@ def Dynamic_Analysis( PrintMode=True, ReportMode=True): """ - This function run Padulles-Amphlett analysis with calling other functions - :param InputMethod : Input Function Or Input Test Vector - :param TestMode : Test Mode Flag + Run Padulles-Amphlett analysis with calling other functions. + + :param InputMethod : input function or input test vector + :param TestMode : test mode flag :type InputMethod : dict or Get_Input function object :type TestMode:bool - :param PrintMode : Print Mode Control Flag (True : Print Outputs) + :param PrintMode : print mode control flag (True : print outputs) :type PrintMode:bool - :param ReportMode : Report Mode Control Flag (True : Generate Report) + :param ReportMode : report mode control flag (True : generate report) :type ReportMode: bool - :return: Result as dict + :return: result as dict """ OutputFile = None CSVFile = None From 53f90ff5e7ffc8aab030c5ba14ac4fae685b239d Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Thu, 25 Apr 2019 01:06:50 +0430 Subject: [PATCH 21/85] doc : Padulles_Hauer.py docstring modified #108 --- opem/Dynamic/Padulles_Hauer.py | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/opem/Dynamic/Padulles_Hauer.py b/opem/Dynamic/Padulles_Hauer.py index f1e57b9f..721aa253 100644 --- a/opem/Dynamic/Padulles_Hauer.py +++ b/opem/Dynamic/Padulles_Hauer.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +"""Padulles-Hauer model functions.""" from opem.Params import Padulles_Hauer_InputParams as InputParams from opem.Params import Padulles_Hauer_Outparams as OutputParams from opem.Static.Amphlett import Power_Calc, Power_Thermal_Calc, Power_Total_Calc, Linear_Aprox_Params_Calc, Max_Params_Calc @@ -10,18 +11,19 @@ def qH2_Calc(qMethanol, CV, t1, t2): - ''' - This function calculate qH2 - :param qMethanol: Molar flow of Methanol [kmol.s^(-1) + """ + Calculate qH2. + + :param qMethanol: molar flow of methanol [kmol.s^(-1) :type qMethanol : float - :param CV: Conversion factor + :param CV: conversion factor :type CV : float - :param t1: Reformer time constant + :param t1: reformer time constant :type t1 : float - :param t2 : Reformer time constant + :param t2 : reformer time constant :type t2 : float :return: qH2 as float - ''' + """ try: result = (qMethanol * CV) / (t1 + ((t2)**2) + (t1 + t2) + 1) return result @@ -37,16 +39,17 @@ def Dynamic_Analysis( PrintMode=True, ReportMode=True): """ - This function run Padulles I analysis with calling other functions - :param InputMethod : Input Function Or Input Test Vector - :param TestMode : Test Mode Flag + Run Padulles Hauer analysis with calling other functions. + + :param InputMethod : input function or input test vector + :param TestMode : test mode flag :type InputMethod : dict or Get_Input function object :type TestMode:bool - :param PrintMode : Print Mode Control Flag (True : Print Outputs) + :param PrintMode : print mode control flag (True : print outputs) :type PrintMode:bool - :param ReportMode : Report Mode Control Flag (True : Generate Report) + :param ReportMode : report mode control flag (True : generate report) :type ReportMode: bool - :return: Result as dict + :return: result as dict """ OutputFile = None CSVFile = None From a3b40a05f448893e486181024de5460a5fc2837a Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Thu, 25 Apr 2019 01:12:18 +0430 Subject: [PATCH 22/85] doc : Padulles1.py docstring modified #108 --- opem/Dynamic/Padulles1.py | 85 ++++++++++++++++++++++----------------- 1 file changed, 47 insertions(+), 38 deletions(-) diff --git a/opem/Dynamic/Padulles1.py b/opem/Dynamic/Padulles1.py index 08376158..39b2c629 100644 --- a/opem/Dynamic/Padulles1.py +++ b/opem/Dynamic/Padulles1.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +"""Padulles 1 model functions.""" import math from opem.Params import Padulles_InputParams as InputParams from opem.Params import Padulles_Outparams as OutputParams @@ -10,16 +11,17 @@ def Enernst_Calc(E0, N0, T, PH2, PO2): """ - This function calculate Enernst - :param E0: Opencell voltage [V] + Calculate Enernst. + + :param E0: open cell voltage [V] :type E0 : float - :param N0: Number of fuel cells in the stack + :param N0: number of fuel cells in the stack :type N0 : int - :param T: Cell Operation Temperature [K] + :param T: cell operation temperature [K] :type T : float - :param PH2: Partial Pressure [atm] + :param PH2: partial pressure [atm] :type PH2 : float - :param PO2: Partial Pressure [atm] + :param PO2: partial pressure [atm] :type PO2 : float :return: Enernest [V] as float """ @@ -34,16 +36,17 @@ def Enernst_Calc(E0, N0, T, PH2, PO2): def PH2_Calc(KH2, tH2, Kr, I, qH2): """ - This function calculate PH2 - :param KH2: Hydrogen Valve Constant [kmol.s^(-1).atm^(-1)] + Calculate PH2. + + :param KH2: hydrogen valve constant [kmol.s^(-1).atm^(-1)] :type KH2 : float - :param tH2: Hydrogen time constant [s] + :param tH2: hydrogen time constant [s] :type tH2 : float - :param Kr: Modeling constant [kmol.s^(-1).A^(-1)] + :param Kr: modeling constant [kmol.s^(-1).A^(-1)] :type Kr : float - :param I: Cell load current [A] + :param I: cell load current [A] :type I : float - :param qH2: Molar flow of hydrogen [kmol.s^(-1)] + :param qH2: molar flow of hydrogen [kmol.s^(-1)] :type qH2 : float :return: PH2 [atm] as float """ @@ -58,16 +61,17 @@ def PH2_Calc(KH2, tH2, Kr, I, qH2): def PO2_Calc(KO2, tO2, Kr, I, qO2): """ - This function calculate PO2 - :param KO2: Oxygen Valve Constant [kmol.s^(-1).atm^(-1)] + Calculate PO2. + + :param KO2: oxygen valve constant [kmol.s^(-1).atm^(-1)] :type KO2 : float - :param tO2: Oxygen time constant [s] + :param tO2: oxygen time constant [s] :type tO2 : float - :param Kr: Modeling constant [kmol.s^(-1).A^(-1)] + :param Kr: modeling constant [kmol.s^(-1).A^(-1)] :type Kr : float - :param I: Cell load current [A] + :param I: cell load current [A] :type I : float - :param qO2: Molar flow of oxygen [kmol.s^(-1) + :param qO2: molar flow of oxygen [kmol.s^(-1) :type qO2 : float :return: PO2 [atm] as float """ @@ -82,8 +86,9 @@ def PO2_Calc(KO2, tO2, Kr, I, qO2): def Kr_Calc(N0): """ - This function calculate Kr - :param N0: Number of fuel cells in the stack + Calculate Kr. + + :param N0: number of fuel cells in the stack :type N0 : int :return: Kr [kmol.s^(-1).A^(-1)] as float """ @@ -96,16 +101,17 @@ def Kr_Calc(N0): def Vcell_Calc(Enernst, B, C, I, Rint): """ - This function calculate Vcell + Calculate Vcell. + :param Enernst: Enernst [V] :type Enernst : float - :param B: Activation voltage constant [V] + :param B: activation voltage constant [V] :type B: float - :param C: Constant [A^(-1) + :param C: constant [A^(-1) :type C : float - :param I: Cell load current [A] + :param I: cell load current [A] :type I: float - :param Rint: Fuel cell internal resistance [ohm] + :param Rint: fuel cell internal resistance [ohm] :type Rint : float :return: Vcell [V] as float """ @@ -120,10 +126,11 @@ def Vcell_Calc(Enernst, B, C, I, Rint): def qO2_Calc(qH2, rho): """ - This function calculate qO2 - :param qH2: Molar flow of hydrogen [kmol.s^(-1)] + Calculate qO2. + + :param qH2: molar flow of hydrogen [kmol.s^(-1)] :type qH2 : float - :param rho: Hydrogen-Oxygen flow rate + :param rho: hydrogen-oxygen flow rate :type rho : float :return: qO2 [kmol.s^(-1)] as float """ @@ -138,12 +145,13 @@ def qO2_Calc(qH2, rho): def Efficiency_Calc(Vcell, N): """ - This function calculate PEM Cell Efficiency - :param Vcell: Cell Voltage [V] + Calculate PEM cell efficiency. + + :param Vcell: cell voltage [V] :type Vcell:float - :param N0: Number of fuel cells in the stack + :param N0: number of fuel cells in the stack :type N0 : int - :return: Efficiency as float + :return: efficiency as float """ try: result = (uF * Vcell) / (N * HHV) @@ -160,16 +168,17 @@ def Dynamic_Analysis( PrintMode=True, ReportMode=True): """ - This function run Padulles I analysis with calling other functions - :param InputMethod : Input Function Or Input Test Vector - :param TestMode : Test Mode Flag + Run Padulles I analysis with calling other functions. + + :param InputMethod : input function or input test vector + :param TestMode : test mode flag :type InputMethod : dict or Get_Input function object :type TestMode:bool - :param PrintMode : Print Mode Control Flag (True : Print Outputs) + :param PrintMode : print mode control flag (True : print outputs) :type PrintMode:bool - :param ReportMode : Report Mode Control Flag (True : Generate Report) + :param ReportMode : report mode control flag (True : generate report) :type ReportMode: bool - :return: Result as dict + :return: result as dict """ OutputFile = None CSVFile = None From 43964ca340efd24de2c8483f55b60e657fba3f75 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Thu, 25 Apr 2019 01:15:36 +0430 Subject: [PATCH 23/85] doc : Padulles2.py docstring modified #108 --- opem/Dynamic/Padulles2.py | 42 +++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/opem/Dynamic/Padulles2.py b/opem/Dynamic/Padulles2.py index 345c4f2b..35a3c17a 100644 --- a/opem/Dynamic/Padulles2.py +++ b/opem/Dynamic/Padulles2.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +"""Padulles 2 model functions.""" import math from opem.Params import Padulles2_InputParams as InputParams from opem.Params import Padulles2_Outparams as OutputParams @@ -11,18 +12,19 @@ def Enernst_Calc(E0, N0, T, PH2, PO2, PH2O): """ - This function calculate Enernst - :param E0: Opencell voltage [V] + Calculate Enernst. + + :param E0: open cell voltage [V] :type E0 : float - :param N0: Number of fuel cells in the stack + :param N0: number of fuel cells in the stack :type N0 : int - :param T: Cell Operation Temperature [K] + :param T: cell operation temperature [K] :type T : float - :param PH2: Partial Pressure [atm] + :param PH2: partial pressure [atm] :type PH2 : float - :param PO2: Partial Pressure [atm] + :param PO2: partial pressure [atm] :type PO2 : float - :param PH2O: Partial Pressure [atm] + :param PH2O: partial pressure [atm] :type PH2O : float :return: Enernest [V] as float """ @@ -38,16 +40,17 @@ def Enernst_Calc(E0, N0, T, PH2, PO2, PH2O): def PH2O_Calc(KH2O, tH2O, Kr, I, qH2O): """ - This function calculate PH2O - :param KH2O: Water Valve Constant [kmol.s^(-1).atm^(-1)] + Calculate PH2O. + + :param KH2O: water valve constant [kmol.s^(-1).atm^(-1)] :type KH2O : float - :param tH2O: Water time constant [s] + :param tH2O: water time constant [s] :type tH2O : float - :param Kr: Modeling constant [kmol.s^(-1).A^(-1)] + :param Kr: modeling constant [kmol.s^(-1).A^(-1)] :type Kr : float - :param I: Cell load current [A] + :param I: cell load current [A] :type I : float - :param qH2O: Molar flow of water [kmol.s^(-1)] + :param qH2O: molar flow of water [kmol.s^(-1)] :type qH2O : float :return: PH2O [atm] as float """ @@ -66,16 +69,17 @@ def Dynamic_Analysis( PrintMode=True, ReportMode=True): """ - This function run Padulles I analysis with calling other functions - :param InputMethod : Input Function Or Input Test Vector - :param TestMode : Test Mode Flag + Run Padulles II analysis with calling other functions. + + :param InputMethod : input function or input test vector + :param TestMode : test mode flag :type InputMethod : dict or Get_Input function object :type TestMode:bool - :param PrintMode : Print Mode Control Flag (True : Print Outputs) + :param PrintMode : print mode control flag (True : print outputs) :type PrintMode:bool - :param ReportMode : Report Mode Control Flag (True : Generate Report) + :param ReportMode : report mode control flag (True : generate report) :type ReportMode: bool - :return: Result as dict + :return: result as dict """ OutputFile = None CSVFile = None From 8ddff75149337dee4e4216a4dd34bf0307fe399e Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Thu, 25 Apr 2019 01:20:11 +0430 Subject: [PATCH 24/85] doc : minor edit in Functions.py docstring #108 --- opem/Functions.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/opem/Functions.py b/opem/Functions.py index c7554ecd..3f1d5b22 100644 --- a/opem/Functions.py +++ b/opem/Functions.py @@ -66,7 +66,7 @@ def linear_plot(x, y): def estimate_coef(clear_x, clear_y): """ - Simple linear regression for linear approximation. + Linear regression function. :param clear_x: cleared_x :type clear_x : list @@ -189,7 +189,7 @@ def rounder(input_number, digit=2): def input_test(a): """ - This function is for test Get_Input. + Injected function for Get_Input testing. :param a: input :return: "1" @@ -551,7 +551,6 @@ def HTML_End(file): :type file : file object :return: None """ - file.write( '

Generated By ' ' Date: Thu, 25 Apr 2019 01:21:41 +0430 Subject: [PATCH 25/85] doc : setup.py docstring modified #108 --- setup.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setup.py b/setup.py index 8eee4781..6fd30dc1 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +"""Setup module.""" try: from setuptools import setup except ImportError: @@ -6,11 +7,13 @@ def get_requirements(): + """Read requirements.txt.""" requirements = open("requirements.txt", "r").read() return list(filter(lambda x: x != "", requirements.split())) def read_description(): + """Read README.md and CHANGELOG.md.""" try: with open("README.md") as r: description = "\n" From 2858e31e6f01096539d07b26290b6475db2d78ce Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Thu, 25 Apr 2019 01:23:11 +0430 Subject: [PATCH 26/85] doc : version_check.py docstring modified #108 --- opem/Dynamic/__init__.py | 1 + version_check.py | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/opem/Dynamic/__init__.py b/opem/Dynamic/__init__.py index 40a96afc..ce687335 100644 --- a/opem/Dynamic/__init__.py +++ b/opem/Dynamic/__init__.py @@ -1 +1,2 @@ # -*- coding: utf-8 -*- +"""OPEM dynamic modules.""" \ No newline at end of file diff --git a/version_check.py b/version_check.py index 01560b14..21f7a9cb 100644 --- a/version_check.py +++ b/version_check.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +"""Version-check script.""" import os import sys import codecs @@ -44,6 +45,13 @@ def print_result(failed=False): + """ + Print final result. + + :param failed: failed flag + :type failed: bool + :return: None + """ message = "Version tag tests " if not failed: print("\n" + message + "passed!") From a2e48f6c85af8e55b97c9f6e188563ce67849e8b Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Thu, 25 Apr 2019 01:26:27 +0430 Subject: [PATCH 27/85] fix : minor edit in test.sh --- .travis/test.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.travis/test.sh b/.travis/test.sh index e982f9c8..b9e6746c 100644 --- a/.travis/test.sh +++ b/.travis/test.sh @@ -6,7 +6,10 @@ set -x python -m opem test pip install -r dev-requirements.txt python version_check.py -python -m bandit -r opem -s B322 -python -m vulture --min-confidence 80 --exclude=opem,build,.eggs --sort-by-size . +if [ "$TRAVIS_PYTHON_VERSION" = '3.6' ] +then + python -m bandit -r opem -s B322 + python -m vulture --min-confidence 80 --exclude=opem,build,.eggs --sort-by-size . +fi python -m pytest opem/Test --cov=opem --cov-report=term python -m cProfile -s cumtime opem/Profile.py \ No newline at end of file From 1d8450977b77749e393466e8e2ecd23ef1169eaf Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Thu, 25 Apr 2019 01:27:23 +0430 Subject: [PATCH 28/85] fix : pydoctest added #108 --- .travis/test.sh | 1 + dev-requirements.txt | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis/test.sh b/.travis/test.sh index b9e6746c..180e6a72 100644 --- a/.travis/test.sh +++ b/.travis/test.sh @@ -10,6 +10,7 @@ if [ "$TRAVIS_PYTHON_VERSION" = '3.6' ] then python -m bandit -r opem -s B322 python -m vulture --min-confidence 80 --exclude=opem,build,.eggs --sort-by-size . + python -m pydocstyle --match-dir=opem fi python -m pytest opem/Test --cov=opem --cov-report=term python -m cProfile -s cumtime opem/Profile.py \ No newline at end of file diff --git a/dev-requirements.txt b/dev-requirements.txt index e93cf585..be5f8b9d 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -5,4 +5,5 @@ pytest==4.4.1 pytest-cov==2.6.1 setuptools==41.0.0 bandit==1.5.1 -vulture==1.0 \ No newline at end of file +vulture==1.0 +pydocstyle==3.0.0 \ No newline at end of file From e5dc5b7228cfd49d679d0cdb93ffd22e36bedce1 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Thu, 25 Apr 2019 01:35:35 +0430 Subject: [PATCH 29/85] doc : minor edit in docstrings --- opem/Dynamic/Padulles1.py | 2 +- opem/Dynamic/Padulles2.py | 2 +- opem/Dynamic/Padulles_Amphlett.py | 2 +- opem/Dynamic/Padulles_Hauer.py | 2 +- opem/Static/Amphlett.py | 2 +- opem/Static/Chamberline_Kim.py | 2 +- opem/Static/Larminie_Dicks.py | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/opem/Dynamic/Padulles1.py b/opem/Dynamic/Padulles1.py index 39b2c629..ee0faa80 100644 --- a/opem/Dynamic/Padulles1.py +++ b/opem/Dynamic/Padulles1.py @@ -168,7 +168,7 @@ def Dynamic_Analysis( PrintMode=True, ReportMode=True): """ - Run Padulles I analysis with calling other functions. + Run Padulles I analysis :param InputMethod : input function or input test vector :param TestMode : test mode flag diff --git a/opem/Dynamic/Padulles2.py b/opem/Dynamic/Padulles2.py index 35a3c17a..d9cb4c12 100644 --- a/opem/Dynamic/Padulles2.py +++ b/opem/Dynamic/Padulles2.py @@ -69,7 +69,7 @@ def Dynamic_Analysis( PrintMode=True, ReportMode=True): """ - Run Padulles II analysis with calling other functions. + Run Padulles II analysis. :param InputMethod : input function or input test vector :param TestMode : test mode flag diff --git a/opem/Dynamic/Padulles_Amphlett.py b/opem/Dynamic/Padulles_Amphlett.py index d48276b9..e13d8c9b 100644 --- a/opem/Dynamic/Padulles_Amphlett.py +++ b/opem/Dynamic/Padulles_Amphlett.py @@ -37,7 +37,7 @@ def Dynamic_Analysis( PrintMode=True, ReportMode=True): """ - Run Padulles-Amphlett analysis with calling other functions. + Run Padulles-Amphlett analysis. :param InputMethod : input function or input test vector :param TestMode : test mode flag diff --git a/opem/Dynamic/Padulles_Hauer.py b/opem/Dynamic/Padulles_Hauer.py index 721aa253..a5063a3c 100644 --- a/opem/Dynamic/Padulles_Hauer.py +++ b/opem/Dynamic/Padulles_Hauer.py @@ -39,7 +39,7 @@ def Dynamic_Analysis( PrintMode=True, ReportMode=True): """ - Run Padulles Hauer analysis with calling other functions. + Run Padulles Hauer analysis. :param InputMethod : input function or input test vector :param TestMode : test mode flag diff --git a/opem/Static/Amphlett.py b/opem/Static/Amphlett.py index 235a53d0..d5f4baa6 100644 --- a/opem/Static/Amphlett.py +++ b/opem/Static/Amphlett.py @@ -426,7 +426,7 @@ def Static_Analysis( PrintMode=True, ReportMode=True): """ - Run Amphlett static analysis with calling other functions. + Run Amphlett static analysis. :param InputMethod : input function or input test vector :param TestMode : test mode flag diff --git a/opem/Static/Chamberline_Kim.py b/opem/Static/Chamberline_Kim.py index d879d64c..ff6b5915 100644 --- a/opem/Static/Chamberline_Kim.py +++ b/opem/Static/Chamberline_Kim.py @@ -45,7 +45,7 @@ def Static_Analysis( PrintMode=True, ReportMode=True): """ - Run Chamberline-Kim static analysis with calling other functions. + Run Chamberline-Kim static analysis. :param InputMethod : input function or input test vector :param TestMode : test mode flag diff --git a/opem/Static/Larminie_Dicks.py b/opem/Static/Larminie_Dicks.py index c6331043..3068867b 100644 --- a/opem/Static/Larminie_Dicks.py +++ b/opem/Static/Larminie_Dicks.py @@ -47,7 +47,7 @@ def Static_Analysis( PrintMode=True, ReportMode=True): """ - Run Larminie-Dicks static analysis with calling other functions. + Run Larminie-Dicks static analysis. :param InputMethod : input function or input test vector :param TestMode : test mode flag From 4be6d7f563097d83b7af0b2961bf0f18d9a78b9e Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Thu, 25 Apr 2019 01:38:50 +0430 Subject: [PATCH 30/85] fix : minor edit in test.sh --- .travis/test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis/test.sh b/.travis/test.sh index 180e6a72..64e413ed 100644 --- a/.travis/test.sh +++ b/.travis/test.sh @@ -10,7 +10,7 @@ if [ "$TRAVIS_PYTHON_VERSION" = '3.6' ] then python -m bandit -r opem -s B322 python -m vulture --min-confidence 80 --exclude=opem,build,.eggs --sort-by-size . - python -m pydocstyle --match-dir=opem + python -m pydocstyle fi python -m pytest opem/Test --cov=opem --cov-report=term python -m cProfile -s cumtime opem/Profile.py \ No newline at end of file From 73728ad5abc5d4aa7529190778c9f62fd16841c6 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Thu, 25 Apr 2019 01:42:31 +0430 Subject: [PATCH 31/85] doc : minor edit in Padulles1.py docstring --- opem/Dynamic/Padulles1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opem/Dynamic/Padulles1.py b/opem/Dynamic/Padulles1.py index ee0faa80..87c45960 100644 --- a/opem/Dynamic/Padulles1.py +++ b/opem/Dynamic/Padulles1.py @@ -168,7 +168,7 @@ def Dynamic_Analysis( PrintMode=True, ReportMode=True): """ - Run Padulles I analysis + Run Padulles I analysis. :param InputMethod : input function or input test vector :param TestMode : test mode flag From 91b8310794115fa7ad4a22641fe1fce86bf250b8 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Sat, 27 Apr 2019 00:33:31 +0430 Subject: [PATCH 32/85] fix : minor edit in build_unix.sh --- build_unix.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_unix.sh b/build_unix.sh index 647f8ed5..de0c3c2e 100755 --- a/build_unix.sh +++ b/build_unix.sh @@ -1,4 +1,4 @@ -#bin/bash +#!/bin/bash if [[ "$OSTYPE" == "linux-gnu" ]]; then pyinstaller -y --clean --windowed OPEM.spec From 8dc75a6f88e32826d6f074aa09662e5a63dd41f7 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Sat, 27 Apr 2019 00:46:12 +0430 Subject: [PATCH 33/85] fix : minor bug in version_check.py fixed --- version_check.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version_check.py b/version_check.py index 21f7a9cb..8f6c8fdb 100644 --- a/version_check.py +++ b/version_check.py @@ -82,7 +82,7 @@ def print_result(failed=False): break except Exception as e: Failed += 1 - print("Error in " + file_name + "\n" + "Message : " + str(e)) + print("Error in Version.rc" + "\n" + "Message : " + str(e)) if Failed == 0: print_result(False) sys.exit(0) From 9351a3cf4e09f87a25e28145642a9a4be337d3a7 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Sat, 27 Apr 2019 01:36:56 +0430 Subject: [PATCH 34/85] fix : minor edit in Functions.py --- opem/Functions.py | 1 + 1 file changed, 1 insertion(+) diff --git a/opem/Functions.py b/opem/Functions.py index 3f1d5b22..4db1d80d 100644 --- a/opem/Functions.py +++ b/opem/Functions.py @@ -711,6 +711,7 @@ def description_control( print("\n") line() input_temp = input("Press any key to continue") + del input_temp Analysis_List[Analysis_Name]( InputMethod=Test_Vector, TestMode=True) else: From 79462cd9470282c464f60db2a4caf10445d4cb79 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 29 Apr 2019 19:41:05 +0430 Subject: [PATCH 35/85] Update setuptools from 41.0.0 to 41.0.1 --- dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index be5f8b9d..facd379a 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -3,7 +3,7 @@ art==3.4 requests==2.21.0 pytest==4.4.1 pytest-cov==2.6.1 -setuptools==41.0.0 +setuptools==41.0.1 bandit==1.5.1 vulture==1.0 pydocstyle==3.0.0 \ No newline at end of file From e0558375674b563210237987469b546fc251aea8 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 6 May 2019 19:42:10 +0430 Subject: [PATCH 36/85] Update art from 3.4 to 3.5 --- dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index facd379a..90b19c46 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,5 +1,5 @@ codecov==2.0.15 -art==3.4 +art==3.5 requests==2.21.0 pytest==4.4.1 pytest-cov==2.6.1 From e7ae5c2b6c9a2a36e227b76d2906fdea9df134ad Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 6 May 2019 19:42:11 +0430 Subject: [PATCH 37/85] Update pytest-cov from 2.6.1 to 2.7.1 --- dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index 90b19c46..04daf504 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -2,7 +2,7 @@ codecov==2.0.15 art==3.5 requests==2.21.0 pytest==4.4.1 -pytest-cov==2.6.1 +pytest-cov==2.7.1 setuptools==41.0.1 bandit==1.5.1 vulture==1.0 From 494acb0eaa579944a54ab18bac3d8ccb84e0b9d1 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 24 Jun 2019 19:32:06 +0430 Subject: [PATCH 38/85] Update art from 3.5 to 3.7 --- dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index 04daf504..2ef8fe0a 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,5 +1,5 @@ codecov==2.0.15 -art==3.5 +art==3.7 requests==2.21.0 pytest==4.4.1 pytest-cov==2.7.1 From cde1aa522fa3a11b820bb2afe53d89b64b2ee821 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 24 Jun 2019 19:32:07 +0430 Subject: [PATCH 39/85] Update requests from 2.21.0 to 2.22.0 --- dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index 2ef8fe0a..74734dce 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,6 +1,6 @@ codecov==2.0.15 art==3.7 -requests==2.21.0 +requests==2.22.0 pytest==4.4.1 pytest-cov==2.7.1 setuptools==41.0.1 From 8629986341b5f881481cd0dbb7997cdcfbdb7f8e Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 24 Jun 2019 19:32:08 +0430 Subject: [PATCH 40/85] Update pytest from 4.4.1 to 4.6.3 --- dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index 74734dce..2898efe0 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,7 +1,7 @@ codecov==2.0.15 art==3.7 requests==2.22.0 -pytest==4.4.1 +pytest==4.6.3 pytest-cov==2.7.1 setuptools==41.0.1 bandit==1.5.1 From 71fd7ab4b3c3a07516ab854054a897120c6e5419 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 24 Jun 2019 19:32:10 +0430 Subject: [PATCH 41/85] Update bandit from 1.5.1 to 1.6.1 --- dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index 2898efe0..7c28cf70 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -4,6 +4,6 @@ requests==2.22.0 pytest==4.6.3 pytest-cov==2.7.1 setuptools==41.0.1 -bandit==1.5.1 +bandit==1.6.1 vulture==1.0 pydocstyle==3.0.0 \ No newline at end of file From 2f0e8fa3d07ce92191bea2de8e5609e6c117ea08 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Thu, 27 Jun 2019 13:12:44 +0430 Subject: [PATCH 42/85] fix : drop python 3.4 --- .travis.yml | 5 ++++- INSTALL.md | 2 +- appveyor.yml | 8 -------- setup.py | 4 ++-- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 36b0fa35..442e3805 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,10 @@ matrix: - os: linux python: 3.4 env: TOXENV=py34-linux - + allow_failures: + - os: linux + python: 3.4 + env: TOXENV=py34-linux install: - bash .travis/install.sh diff --git a/INSTALL.md b/INSTALL.md index fa8c0803..58255314 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,7 +1,7 @@ ## Installation ### Source Code -- Download [Python3.x](https://www.python.org/downloads/) (>=3.4) +- Download [Python3.x](https://www.python.org/downloads/) (>=3.5) - Download [Version 1.0](https://github.com/ecsim/opem/archive/v1.0.zip) or [Latest Source ](https://github.com/ecsim/opem/archive/master.zip) - Run `pip install -r requirements.txt` or `pip3 install -r requirements.txt` (Need root access) - Run `python3 setup.py install` or `python setup.py install` (Need root access) diff --git a/appveyor.yml b/appveyor.yml index 8a567c1c..4c90c86a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -2,14 +2,6 @@ build: false environment: matrix: - - PYTHON: "C:\\Python34" - PYTHON_VERSION: "3.4.0" - PYTHON_ARCH: "64" - - - PYTHON: "C:\\Python34" - PYTHON_VERSION: "3.4.0" - PYTHON_ARCH: "32" - - PYTHON: "C:\\Python35" PYTHON_VERSION: "3.5.2" PYTHON_ARCH: "32" diff --git a/setup.py b/setup.py index 6fd30dc1..b3d5c239 100644 --- a/setup.py +++ b/setup.py @@ -55,14 +55,14 @@ def read_description(): }, platforms=["any"], install_requires=get_requirements(), - python_requires='>=3.4', + python_requires='>=3.5', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: End Users/Desktop', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', - 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', From b60b03bc1ed88cd0b372af25b60be1cfdb1351c2 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Thu, 27 Jun 2019 13:24:09 +0430 Subject: [PATCH 43/85] doc : README dependencies section updated --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5194157a..533947c3 100644 --- a/README.md +++ b/README.md @@ -1358,7 +1358,18 @@ Gitter is another option : 3. [OPEM](https://github.com/ECSIM/opem/blob/master/otherfile/test.opem) ## Dependencies -Requirements Status + +

+ + + + + + + + +
masterdevelop
Requirements StatusRequirements Status
+ ## Thanks From 52a80fed96a8e24588c41fbd081a8abaaf395ea9 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Thu, 27 Jun 2019 13:25:42 +0430 Subject: [PATCH 44/85] doc : README cite section updated --- README.md | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 533947c3..ce6780a6 100644 --- a/README.md +++ b/README.md @@ -1440,13 +1440,27 @@ If you use OPEM in your research , please cite this paper : -Download [OPEM.bib](http://www.ecsim.ir/opem/OPEM.bib)(BibTeX Format) +Download [OPEM.bib](http://www.ecsim.ir/opem/OPEM.bib)(BibTeX Format) + + + + + + + + + + + + + + + +
JOSSDOI badge
ZenodoDOI
Researchgate
+ + - - DOI badge - -DOI ## License From 94c409faa818614445bd042bacfd7ac146e31afb Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Thu, 27 Jun 2019 15:48:00 +0430 Subject: [PATCH 45/85] fix : minor edit in description --- opem/Params.py | 10 +++++++++- opem/__main__.py | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/opem/Params.py b/opem/Params.py index df5c66ae..cdcbc308 100644 --- a/opem/Params.py +++ b/opem/Params.py @@ -16,6 +16,13 @@ and some others take into account a part or all auxiliaries such as reformers. OPEM is a platform for collaborative development of PEMFC models.''' +Links = ''' +Website : http://www.ecsim.ir/opem +Document : http://www.ecsim.ir/opem/doc/ +Paper : https://doi.org/10.21105/joss.00676 + +* If you use OPEM in your research, please cite our paper. +''' Warning_Message_1 = "Warning : The value of I(>{}) leads to minus amount of V, please check your inputs" Warning_Message_2 = "Warning : There are errors in the simulations in some of I amounts; please refer to the .opem file" \ " for review. If you are confident about this parameters, ignore this error." @@ -425,7 +432,8 @@ "Padulles_Hauer Analysis (Dynamic)": Padulles_Hauer_Description, "Padulles_Amphlett Analysis (Dynamic)": Padulles_Amphlett_Description, "General Padulles": General_Padulles_Description, - "Overview": Overview} + "Overview": Overview, + "Links": Links} Description_Links = { "Amphlett_Analysis (Static)": "http://www.ecsim.ir/opem/doc/Static/Amphlett.html", diff --git a/opem/__main__.py b/opem/__main__.py index 454f54d8..8aa26d7e 100644 --- a/opem/__main__.py +++ b/opem/__main__.py @@ -45,11 +45,12 @@ while not EXITFLAG: tprint("OPEM") tprint("v" + str(Version)) + print(Description_Menu["Links"]) description_print("Overview", Description_Menu) for i, item in enumerate(MENUKEYS): print(str(i + 1) + "-" + item) try: - ANALYSISINDEX = int(input(("Please Choose Analysis : "))) + ANALYSISINDEX = int(input(("\nPlease Choose Analysis : "))) except Exception: ANALYSISINDEX = -1 if ANALYSISINDEX - 1 in range(len(MENUKEYS)): From 3d583061e809a17684bbfc9547d4ed05b7b5c843 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Thu, 27 Jun 2019 16:03:46 +0430 Subject: [PATCH 46/85] fix : minor edit in description --- opem/Params.py | 3 ++- opem/__main__.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/opem/Params.py b/opem/Params.py index cdcbc308..51ad884c 100644 --- a/opem/Params.py +++ b/opem/Params.py @@ -18,10 +18,11 @@ Links = ''' Website : http://www.ecsim.ir/opem +Repository : https://github.com/ECSIM/opem Document : http://www.ecsim.ir/opem/doc/ Paper : https://doi.org/10.21105/joss.00676 - * If you use OPEM in your research, please cite our paper. +* OPEM GUI is available here : https://github.com/ECSIM/gopem ''' Warning_Message_1 = "Warning : The value of I(>{}) leads to minus amount of V, please check your inputs" Warning_Message_2 = "Warning : There are errors in the simulations in some of I amounts; please refer to the .opem file" \ diff --git a/opem/__main__.py b/opem/__main__.py index 8aa26d7e..29228a00 100644 --- a/opem/__main__.py +++ b/opem/__main__.py @@ -47,10 +47,11 @@ tprint("v" + str(Version)) print(Description_Menu["Links"]) description_print("Overview", Description_Menu) + tprint("Models",font="bulbhead") for i, item in enumerate(MENUKEYS): print(str(i + 1) + "-" + item) try: - ANALYSISINDEX = int(input(("\nPlease Choose Analysis : "))) + ANALYSISINDEX = int(input(("\nPlease Choose Model : "))) except Exception: ANALYSISINDEX = -1 if ANALYSISINDEX - 1 in range(len(MENUKEYS)): From 34328a94017bac755963e72a390468e016442758 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Thu, 27 Jun 2019 16:08:54 +0430 Subject: [PATCH 47/85] doc : CHANGELOG updated --- CHANGELOG.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8edf85d..16bb2fd3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] +## [1.1] - 2019-06-28 +### Changed +- Menu updated +- Test system modified +- Drop Python 3.4 support +- `description_control` function modified +- `version_check.py` modified ## [1.0] - 2019-03-01 ### Added - Interactive notebooks section @@ -136,7 +143,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - CSV output files - Documents and `README.md` -[Unreleased]: https://github.com/ECSIM/opem/compare/v1.0...develop +[Unreleased]: https://github.com/ECSIM/opem/compare/v1.1...develop +[1.1]: https://github.com/ECSIM/opem/compare/v1.0...v1.1 [1.0]: https://github.com/ECSIM/opem/compare/v0.9...v1.0 [0.9]: https://github.com/ECSIM/opem/compare/v0.8...v0.9 [0.8]: https://github.com/ECSIM/opem/compare/v0.7...v0.8 From e867f07669f4d17b2cde9f305e21cf9dd3b0e7c7 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Thu, 27 Jun 2019 16:11:16 +0430 Subject: [PATCH 48/85] rel : migrate to version 1.1 --- INSTALL.md | 6 +++--- opem/Params.py | 2 +- setup.py | 4 ++-- version_check.py | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 58255314..46d57aca 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -2,7 +2,7 @@ ### Source Code - Download [Python3.x](https://www.python.org/downloads/) (>=3.5) -- Download [Version 1.0](https://github.com/ecsim/opem/archive/v1.0.zip) or [Latest Source ](https://github.com/ecsim/opem/archive/master.zip) +- Download [Version 1.1](https://github.com/ecsim/opem/archive/v1.1.zip) or [Latest Source ](https://github.com/ecsim/opem/archive/master.zip) - Run `pip install -r requirements.txt` or `pip3 install -r requirements.txt` (Need root access) - Run `python3 setup.py install` or `python setup.py install` (Need root access) @@ -22,12 +22,12 @@ - `conda install -c ecsim opem` (Need root access) ### Exe Version (Only Windows) -- Download [Exe-Version 1.0](https://github.com/ECSIM/opem/releases/download/v1.0/OPEM-1.0.exe) +- Download [Exe-Version 1.1](https://github.com/ECSIM/opem/releases/download/v1.1/OPEM-1.1.exe) - Run `OPEM.exe` ### DMG Version (MacOS) -- Download [DMG-Version 1.0](https://github.com/ECSIM/opem/releases/download/v1.0/OPEM-1.0.dmg) +- Download [DMG-Version 1.1](https://github.com/ECSIM/opem/releases/download/v1.1/OPEM-1.1.dmg) - Open DMG file - Copy `OPEM` into your system - Run `OPEM` diff --git a/opem/Params.py b/opem/Params.py index 51ad884c..f66d0bb0 100644 --- a/opem/Params.py +++ b/opem/Params.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- """OPEM parameters.""" -Version = 1.0 +Version = 1.1 Website = "http://www.ecsim.ir/opem" UpdateUrl = "http://www.ecsim.ir/opem/update" Overview = ''' diff --git a/setup.py b/setup.py index b3d5c239..2cca641f 100644 --- a/setup.py +++ b/setup.py @@ -39,14 +39,14 @@ def read_description(): setup( name='opem', packages=['opem', 'opem.Static', 'opem.Dynamic','opem.Test'], - version='1.0', + version='1.1', description='Open Source PEM Cell Simulation Tool', long_description=read_description(), long_description_content_type='text/markdown', author='Sepand Haghighi,Kasra Askari,Sarmin Hamidi,Mohammad Mahdi Rahimi', author_email='opem@ecsim.ir', url='https://github.com/ecsim/opem', - download_url='https://github.com/ecsim/opem/tarball/v1.0', + download_url='https://github.com/ecsim/opem/tarball/v1.1', keywords="OPEM PEM FC CELL Fuel-Cell Chemistry", project_urls={ 'Webpage': 'http://opem.ecsim.ir', diff --git a/version_check.py b/version_check.py index 8f6c8fdb..ee09523b 100644 --- a/version_check.py +++ b/version_check.py @@ -4,7 +4,7 @@ import sys import codecs Failed = 0 -VERSION = "1.0" +VERSION = "1.1" VERSION_1 = VERSION.split(".")[0] VERSION_2 = str(int(float(VERSION)*10 - int(VERSION_1)*10)) From 8809bf33d221c1f85106d3886672b175436ac4da Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Thu, 27 Jun 2019 16:15:32 +0430 Subject: [PATCH 49/85] doc : notebooks updated for version 1.1 --- Documents/Amphlett.ipynb | 88 +++++++------- Documents/Amphlett/Amphlett_Test.html | 2 +- Documents/Amphlett/Amphlett_Test.opem | 2 +- .../Chamberline-Kim/Chamberline_Test.html | 2 +- .../Chamberline-Kim/Chamberline_Test.opem | 2 +- Documents/Chamberline_Kim.ipynb | 28 ++--- Documents/Larminie-Dicks/Larminiee_Test.html | 2 +- Documents/Larminie-Dicks/Larminiee_Test.opem | 2 +- Documents/Larminie_Dicks.ipynb | 68 ++++++----- .../Padulles_Amphlett_Test.html | 2 +- .../Padulles_Amphlett_Test.opem | 2 +- .../Padulles-Hauer/Padulles_Hauer_Test.html | 2 +- .../Padulles-Hauer/Padulles_Hauer_Test.opem | 2 +- Documents/Padulles-I/PadullesI_Test.html | 2 +- Documents/Padulles-I/PadullesI_Test.opem | 2 +- Documents/Padulles-II/Padulles2_Test.html | 2 +- Documents/Padulles-II/Padulles2_Test.opem | 2 +- Documents/Padulles1.ipynb | 64 +++++------ Documents/Padulles2.ipynb | 82 +++++++------ Documents/Padulles_Amphlett.ipynb | 108 ++++++++++-------- Documents/Padulles_Hauer.ipynb | 98 ++++++++-------- 21 files changed, 294 insertions(+), 270 deletions(-) diff --git a/Documents/Amphlett.ipynb b/Documents/Amphlett.ipynb index a2bfa525..6a27c394 100644 --- a/Documents/Amphlett.ipynb +++ b/Documents/Amphlett.ipynb @@ -11,7 +11,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Version 1.0" + "### Version 1.1" ] }, { @@ -2924,13 +2924,7 @@ "Power-Thermal : 8.493335953702141 W\n", "VStack : 0.7024636053601154 V\n", "Vcell : 0.7024636053601154 V\n", - "###########\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ + "###########\n", "I : 16.2\n", "Enernst : 1.19075 V\n", "Eta Activation : 0.45501182313078914 V\n", @@ -3167,7 +3161,13 @@ "###########\n", "I : 18.0\n", "Enernst : 1.19075 V\n", - "Eta Activation : 0.4619896340937498 V\n", + "Eta Activation : 0.4619896340937498 V\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ "Eta Concentration : 0.004331188797162155 V\n", "Eta Ohmic : 0.033657389798262084 V\n", "Loss : 0.4999782126891741 V\n", @@ -4665,15 +4665,15 @@ "Eta Activation : 0.49470746697174134 V\n", "Eta Concentration : 0.007873875602709995 V\n", "Eta Ohmic : 0.05818741474966191 V\n", - "Loss : 0.5607687573241132 V\n" + "Loss : 0.5607687573241132 V\n", + "PEM Efficiency : 0.4038341299204402 \n", + "Power : 18.58444665893866 W\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "PEM Efficiency : 0.4038341299204402 \n", - "Power : 18.58444665893866 W\n", "Power-Stack : 18.58444665893866 W\n", "Power-Thermal : 17.70055334106134 W\n", "VStack : 0.6299812426758867 V\n", @@ -6172,13 +6172,7 @@ "Power-Stack : 23.595548949831908 W\n", "Power-Thermal : 26.83445105016809 W\n", "VStack : 0.5755011938983392 V\n", - "Vcell : 0.5755011938983392 V\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ + "Vcell : 0.5755011938983392 V\n", "###########\n", "I : 41.1\n", "Enernst : 1.19075 V\n", @@ -6678,7 +6672,13 @@ "Enernst : 1.19075 V\n", "Eta Activation : 0.5225263538790852 V\n", "Eta Concentration : 0.014326871678663006 V\n", - "Eta Ohmic : 0.09690480653515815 V\n", + "Eta Ohmic : 0.09690480653515815 V\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ "Loss : 0.6337580320929063 V\n", "PEM Efficiency : 0.357046133273778 \n", "Power : 25.008939359028506 W\n", @@ -8178,13 +8178,7 @@ "PEM Efficiency : 0.3200219430388025 \n", "Power : 28.156810636325996 W\n", "Power-Stack : 28.156810636325996 W\n", - "Power-Thermal : 41.215189363674 W\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ + "Power-Thermal : 41.215189363674 W\n", "VStack : 0.4992342311405319 V\n", "Vcell : 0.4992342311405319 V\n", "###########\n", @@ -8578,7 +8572,13 @@ "VStack : 0.48278539672234544 V\n", "Vcell : 0.48278539672234544 V\n", "###########\n", - "I : 59.5\n", + "I : 59.5\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ "Enernst : 1.19075 V\n", "Eta Activation : 0.5411720727592413 V\n", "Eta Concentration : 0.024514165593142897 V\n", @@ -10134,13 +10134,7 @@ "PEM Efficiency : 0.25801990173588574 \n", "Power : 28.739288734949902 W\n", "Power-Stack : 28.739288734949902 W\n", - "Power-Thermal : 59.08271126505011 W\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ + "Power-Thermal : 59.08271126505011 W\n", "VStack : 0.40251104670798177 V\n", "Vcell : 0.40251104670798177 V\n", "###########\n", @@ -10189,7 +10183,13 @@ "Eta Concentration : 0.0466948753710611 V\n", "Eta Ohmic : 0.19154751209298052 V\n", "Loss : 0.7918592326803244 V\n", - "PEM Efficiency : 0.2556992098203048 \n", + "PEM Efficiency : 0.2556992098203048 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ "Power : 28.6403570935527 W\n", "Power-Stack : 28.6403570935527 W\n", "Power-Thermal : 59.67364290644729 W\n", @@ -10599,13 +10599,7 @@ "VStack : 0.3594162255435345 V\n", "Vcell : 0.3594162255435345 V\n", "###########\n", - "Report is generating ...\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ + "Report is generating ...\n", "Done!\n" ] } @@ -10704,13 +10698,13 @@ "output_type": "stream", "text": [ "Requirement already satisfied: matplotlib in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (2.2.2)\n", - "Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (2.2.0)\n", "Requirement already satisfied: pytz in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (2018.3)\n", - "Requirement already satisfied: cycler>=0.10 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (0.10.0)\n", "Requirement already satisfied: numpy>=1.7.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (1.15.2)\n", + "Requirement already satisfied: cycler>=0.10 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (0.10.0)\n", + "Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (2.2.0)\n", + "Requirement already satisfied: six>=1.10 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (1.11.0)\n", "Requirement already satisfied: python-dateutil>=2.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (2.6.1)\n", "Requirement already satisfied: kiwisolver>=1.0.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (1.0.1)\n", - "Requirement already satisfied: six>=1.10 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (1.11.0)\n", "Requirement already satisfied: setuptools in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from kiwisolver>=1.0.1->matplotlib) (39.2.0)\n" ] }, @@ -10718,7 +10712,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "You are using pip version 19.0.2, however version 19.0.3 is available.\n", + "You are using pip version 19.0.2, however version 19.1.1 is available.\n", "You should consider upgrading via the 'python -m pip install --upgrade pip' command.\n" ] } diff --git a/Documents/Amphlett/Amphlett_Test.html b/Documents/Amphlett/Amphlett_Test.html index ef01c84e..38156d3d 100644 --- a/Documents/Amphlett/Amphlett_Test.html +++ b/Documents/Amphlett/Amphlett_Test.html @@ -576,6 +576,6 @@

Graphs

} }); -

Generated By OPEM Version 1.0

+

Generated By OPEM Version 1.1

\ No newline at end of file diff --git a/Documents/Amphlett/Amphlett_Test.opem b/Documents/Amphlett/Amphlett_Test.opem index 45ba0f8d..3476d5c7 100644 --- a/Documents/Amphlett/Amphlett_Test.opem +++ b/Documents/Amphlett/Amphlett_Test.opem @@ -4,7 +4,7 @@ | |_| || |_) || __/| | | | | | \___/ | .__/ \___||_| |_| |_| |_| -Simulation Date : 2019-02-22 18:14:50.082164 +Simulation Date : 2019-06-27 16:12:08.124984 ********** Amphlett Model diff --git a/Documents/Chamberline-Kim/Chamberline_Test.html b/Documents/Chamberline-Kim/Chamberline_Test.html index 787b0800..97a1b71a 100644 --- a/Documents/Chamberline-Kim/Chamberline_Test.html +++ b/Documents/Chamberline-Kim/Chamberline_Test.html @@ -489,6 +489,6 @@

Graphs

} }); -

Generated By OPEM Version 1.0

+

Generated By OPEM Version 1.1

\ No newline at end of file diff --git a/Documents/Chamberline-Kim/Chamberline_Test.opem b/Documents/Chamberline-Kim/Chamberline_Test.opem index a5c7f2a6..82a84e3c 100644 --- a/Documents/Chamberline-Kim/Chamberline_Test.opem +++ b/Documents/Chamberline-Kim/Chamberline_Test.opem @@ -4,7 +4,7 @@ | |_| || |_) || __/| | | | | | \___/ | .__/ \___||_| |_| |_| |_| -Simulation Date : 2019-02-22 18:15:06.881226 +Simulation Date : 2019-06-27 16:12:35.047311 ********** Chamberline-Kim Model diff --git a/Documents/Chamberline_Kim.ipynb b/Documents/Chamberline_Kim.ipynb index 6bf47d47..b5d2852e 100644 --- a/Documents/Chamberline_Kim.ipynb +++ b/Documents/Chamberline_Kim.ipynb @@ -11,7 +11,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Version 1.0" + "### Version 1.1" ] }, { @@ -2398,7 +2398,13 @@ "I : 25.3\n", "PEM Efficiency : 0.5436247354183059 \n", "Power : 21.455781057489702 W\n", - "Power-Stack : 21.455781057489702 W\n", + "Power-Stack : 21.455781057489702 W\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ "Power-Thermal : 9.6632189425103 W\n", "VStack : 0.8480545872525573 V\n", "Vcell : 0.8480545872525573 V\n", @@ -2884,13 +2890,7 @@ "Vcell : 0.7625933754626701 V\n", "###########\n", "I : 31.4\n", - "PEM Efficiency : 0.4877136025324792 \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ + "PEM Efficiency : 0.4877136025324792 \n", "Power : 23.89016310645096 W\n", "Power-Stack : 23.89016310645096 W\n", "Power-Thermal : 14.731836893549037 W\n", @@ -3882,13 +3882,13 @@ "output_type": "stream", "text": [ "Requirement already satisfied: matplotlib in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (2.2.2)\n", + "Requirement already satisfied: pytz in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (2018.3)\n", "Requirement already satisfied: six>=1.10 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (1.11.0)\n", + "Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (2.2.0)\n", + "Requirement already satisfied: cycler>=0.10 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (0.10.0)\n", "Requirement already satisfied: python-dateutil>=2.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (2.6.1)\n", - "Requirement already satisfied: kiwisolver>=1.0.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (1.0.1)\n", "Requirement already satisfied: numpy>=1.7.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (1.15.2)\n", - "Requirement already satisfied: cycler>=0.10 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (0.10.0)\n", - "Requirement already satisfied: pytz in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (2018.3)\n", - "Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (2.2.0)\n", + "Requirement already satisfied: kiwisolver>=1.0.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (1.0.1)\n", "Requirement already satisfied: setuptools in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from kiwisolver>=1.0.1->matplotlib) (39.2.0)\n" ] }, @@ -3896,7 +3896,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "You are using pip version 19.0.2, however version 19.0.3 is available.\n", + "You are using pip version 19.0.2, however version 19.1.1 is available.\n", "You should consider upgrading via the 'python -m pip install --upgrade pip' command.\n" ] } diff --git a/Documents/Larminie-Dicks/Larminiee_Test.html b/Documents/Larminie-Dicks/Larminiee_Test.html index 61b83c3c..416ef5cd 100644 --- a/Documents/Larminie-Dicks/Larminiee_Test.html +++ b/Documents/Larminie-Dicks/Larminiee_Test.html @@ -494,6 +494,6 @@

Graphs

} }); -

Generated By OPEM Version 1.0

+

Generated By OPEM Version 1.1

\ No newline at end of file diff --git a/Documents/Larminie-Dicks/Larminiee_Test.opem b/Documents/Larminie-Dicks/Larminiee_Test.opem index c6f47a7b..2bacfbf9 100644 --- a/Documents/Larminie-Dicks/Larminiee_Test.opem +++ b/Documents/Larminie-Dicks/Larminiee_Test.opem @@ -4,7 +4,7 @@ | |_| || |_) || __/| | | | | | \___/ | .__/ \___||_| |_| |_| |_| -Simulation Date : 2019-02-22 18:15:23.916245 +Simulation Date : 2019-06-27 16:12:56.703714 ********** Larminie-Dicks Model diff --git a/Documents/Larminie_Dicks.ipynb b/Documents/Larminie_Dicks.ipynb index 5629b50e..406c2c46 100644 --- a/Documents/Larminie_Dicks.ipynb +++ b/Documents/Larminie_Dicks.ipynb @@ -11,7 +11,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Version 1.0" + "### Version 1.1" ] }, { @@ -2486,7 +2486,13 @@ "VStack : 14.499644650137675 V\n", "Vcell : 0.6304193326146815 V\n", "###########\n", - "I : 25.6\n", + "I : 25.6\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ "PEM Efficiency : 0.4038089606770329 \n", "Power : 16.12651465359799 W\n", "Power-Stack : 370.9098370327538 W\n", @@ -2876,13 +2882,7 @@ "Power-Stack : 425.000297634711 W\n", "Power-Thermal : 435.0157023652889 W\n", "VStack : 13.980272948510232 V\n", - "Vcell : 0.6078379542830535 V\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ + "Vcell : 0.6078379542830535 V\n", "###########\n", "I : 30.5\n", "PEM Efficiency : 0.3893538734575812 \n", @@ -4381,7 +4381,13 @@ "Vcell : 0.5299642941538014 V\n", "###########\n", "I : 49.2\n", - "PEM Efficiency : 0.33946364519091926 \n", + "PEM Efficiency : 0.33946364519091926 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ "Power : 26.054513695693434 W\n", "Power-Stack : 599.253815000949 W\n", "Power-Thermal : 792.6141849990511 W\n", @@ -4881,13 +4887,7 @@ "Power : 27.960651261556503 W\n", "Power-Stack : 643.0949790157996 W\n", "Power-Thermal : 924.1710209842004 W\n", - "VStack : 11.608212617613711 V\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ + "VStack : 11.608212617613711 V\n", "Vcell : 0.5047048964179874 V\n", "###########\n", "I : 55.5\n", @@ -6174,7 +6174,13 @@ "PEM Efficiency : 0.28044854889823995 \n", "Power : 31.28123114410969 W\n", "Power-Stack : 719.4683163145229 W\n", - "Power-Thermal : 1303.2666836854771 W\n", + "Power-Thermal : 1303.2666836854771 W\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ "VStack : 10.06249393446885 V\n", "Vcell : 0.4374997362812544 V\n", "###########\n", @@ -6887,13 +6893,7 @@ "Power : 31.763432628582766 W\n", "Power-Stack : 730.5589504574036 W\n", "Power-Thermal : 1543.9570495425967 W\n", - "VStack : 9.08655411016671 V\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ + "VStack : 9.08655411016671 V\n", "Vcell : 0.3950675700072483 V\n", "###########\n", "I : 80.5\n", @@ -7752,7 +7752,13 @@ "VStack : 7.519474145037007 V\n", "Vcell : 0.3269336584798699 V\n", "###########\n", - "I : 91.2\n", + "I : 91.2\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ "PEM Efficiency : 0.20903182468869913 \n", "Power : 29.739375762110605 W\n", "Power-Stack : 684.005642528544 W\n", @@ -8401,13 +8407,13 @@ "output_type": "stream", "text": [ "Requirement already satisfied: matplotlib in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (2.2.2)\n", - "Requirement already satisfied: numpy>=1.7.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (1.15.2)\n", - "Requirement already satisfied: python-dateutil>=2.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (2.6.1)\n", "Requirement already satisfied: cycler>=0.10 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (0.10.0)\n", "Requirement already satisfied: pytz in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (2018.3)\n", - "Requirement already satisfied: six>=1.10 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (1.11.0)\n", - "Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (2.2.0)\n", "Requirement already satisfied: kiwisolver>=1.0.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (1.0.1)\n", + "Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (2.2.0)\n", + "Requirement already satisfied: numpy>=1.7.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (1.15.2)\n", + "Requirement already satisfied: six>=1.10 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (1.11.0)\n", + "Requirement already satisfied: python-dateutil>=2.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (2.6.1)\n", "Requirement already satisfied: setuptools in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from kiwisolver>=1.0.1->matplotlib) (39.2.0)\n" ] }, @@ -8415,7 +8421,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "You are using pip version 19.0.2, however version 19.0.3 is available.\n", + "You are using pip version 19.0.2, however version 19.1.1 is available.\n", "You should consider upgrading via the 'python -m pip install --upgrade pip' command.\n" ] } diff --git a/Documents/Padulles-Amphlett/Padulles_Amphlett_Test.html b/Documents/Padulles-Amphlett/Padulles_Amphlett_Test.html index 0be14eaf..18efc1a2 100644 --- a/Documents/Padulles-Amphlett/Padulles_Amphlett_Test.html +++ b/Documents/Padulles-Amphlett/Padulles_Amphlett_Test.html @@ -806,6 +806,6 @@

Graphs

} }); -

Generated By OPEM Version 1.0

+

Generated By OPEM Version 1.1

\ No newline at end of file diff --git a/Documents/Padulles-Amphlett/Padulles_Amphlett_Test.opem b/Documents/Padulles-Amphlett/Padulles_Amphlett_Test.opem index 8b7b92f3..b7e7c670 100644 --- a/Documents/Padulles-Amphlett/Padulles_Amphlett_Test.opem +++ b/Documents/Padulles-Amphlett/Padulles_Amphlett_Test.opem @@ -4,7 +4,7 @@ | |_| || |_) || __/| | | | | | \___/ | .__/ \___||_| |_| |_| |_| -Simulation Date : 2019-02-22 18:16:13.540647 +Simulation Date : 2019-06-27 16:14:08.824297 ********** Padulles-Amphlett Model diff --git a/Documents/Padulles-Hauer/Padulles_Hauer_Test.html b/Documents/Padulles-Hauer/Padulles_Hauer_Test.html index 845cea12..930a825e 100644 --- a/Documents/Padulles-Hauer/Padulles_Hauer_Test.html +++ b/Documents/Padulles-Hauer/Padulles_Hauer_Test.html @@ -713,6 +713,6 @@

Graphs

} }); -

Generated By OPEM Version 1.0

+

Generated By OPEM Version 1.1

\ No newline at end of file diff --git a/Documents/Padulles-Hauer/Padulles_Hauer_Test.opem b/Documents/Padulles-Hauer/Padulles_Hauer_Test.opem index d9559d00..aa37f6aa 100644 --- a/Documents/Padulles-Hauer/Padulles_Hauer_Test.opem +++ b/Documents/Padulles-Hauer/Padulles_Hauer_Test.opem @@ -4,7 +4,7 @@ | |_| || |_) || __/| | | | | | \___/ | .__/ \___||_| |_| |_| |_| -Simulation Date : 2019-02-22 18:16:25.053849 +Simulation Date : 2019-06-27 16:14:35.884126 ********** Padulles-Hauer Model diff --git a/Documents/Padulles-I/PadullesI_Test.html b/Documents/Padulles-I/PadullesI_Test.html index 06aed492..823f40a7 100644 --- a/Documents/Padulles-I/PadullesI_Test.html +++ b/Documents/Padulles-I/PadullesI_Test.html @@ -619,6 +619,6 @@

Graphs

});

Warning : There are errors in the simulations in some of I amounts; please refer to the .opem file for review. If you are confident about this parameters, ignore this error.

-

Generated By OPEM Version 1.0

+

Generated By OPEM Version 1.1

\ No newline at end of file diff --git a/Documents/Padulles-I/PadullesI_Test.opem b/Documents/Padulles-I/PadullesI_Test.opem index a631debe..6914c80f 100644 --- a/Documents/Padulles-I/PadullesI_Test.opem +++ b/Documents/Padulles-I/PadullesI_Test.opem @@ -4,7 +4,7 @@ | |_| || |_) || __/| | | | | | \___/ | .__/ \___||_| |_| |_| |_| -Simulation Date : 2019-02-22 18:15:40.354252 +Simulation Date : 2019-06-27 16:13:19.512464 ********** Padulles-I Model diff --git a/Documents/Padulles-II/Padulles2_Test.html b/Documents/Padulles-II/Padulles2_Test.html index 9d268663..99a2c9d2 100644 --- a/Documents/Padulles-II/Padulles2_Test.html +++ b/Documents/Padulles-II/Padulles2_Test.html @@ -682,6 +682,6 @@

Graphs

} }); -

Generated By OPEM Version 1.0

+

Generated By OPEM Version 1.1

\ No newline at end of file diff --git a/Documents/Padulles-II/Padulles2_Test.opem b/Documents/Padulles-II/Padulles2_Test.opem index a7d41431..26b04c85 100644 --- a/Documents/Padulles-II/Padulles2_Test.opem +++ b/Documents/Padulles-II/Padulles2_Test.opem @@ -4,7 +4,7 @@ | |_| || |_) || __/| | | | | | \___/ | .__/ \___||_| |_| |_| |_| -Simulation Date : 2019-02-22 18:16:00.433020 +Simulation Date : 2019-06-27 16:13:43.731742 ********** Padulles-II Model diff --git a/Documents/Padulles1.ipynb b/Documents/Padulles1.ipynb index b7ffec89..57b27111 100644 --- a/Documents/Padulles1.ipynb +++ b/Documents/Padulles1.ipynb @@ -11,7 +11,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Version 1.0" + "### Version 1.1" ] }, { @@ -2881,7 +2881,13 @@ "I : 25.7\n", "E : 54.23860717266447 V\n", "FC Efficiency : 0.394893296428169 \n", - "FC Power : 1393.2214595550374 W\n", + "FC Power : 1393.2214595550374 W\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ "FC Voltage : 54.210951733659044 V\n", "PH2 : 2.105480033740378 atm\n", "PO2 : 2.0610955025028876 atm\n", @@ -2962,13 +2968,7 @@ "I : 26.6\n", "E : 54.23683515919194 V\n", "FC Efficiency : 0.39484854651873147 \n", - "FC Power : 1441.8479051980328 W\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ + "FC Power : 1441.8479051980328 W\n", "FC Voltage : 54.20480846609146 V\n", "PH2 : 2.1032544532926587 atm\n", "PO2 : 2.059838940932276 atm\n", @@ -4468,7 +4468,13 @@ "PO2 : 2.0366623608521093 atm\n", "Power-Thermal : 2338.9191290384083 W\n", "###########\n", - "I : 43.3\n", + "I : 43.3\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ "E : 54.20364271839122 V\n", "FC Efficiency : 0.39406861525855597 \n", "FC Power : 2342.4321204666744 W\n", @@ -4926,13 +4932,7 @@ "PH2 : 2.0495932358309865 atm\n", "PO2 : 2.029541845285311 atm\n", "Power-Thermal : 2616.5407165960182 W\n", - "###########\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ + "###########\n", "I : 48.4\n", "E : 54.19338616915926 V\n", "FC Efficiency : 0.3938425910455669 \n", @@ -8312,7 +8312,13 @@ "FC Voltage : 53.849031191595756 V\n", "PH2 : 1.956860717176024 atm\n", "PO2 : 1.9771851131765017 atm\n", - "Power-Thermal : 4666.745123761084 W\n", + "Power-Thermal : 4666.745123761084 W\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ "###########\n", "I : 85.9\n", "E : 54.116167425462734 V\n", @@ -8479,13 +8485,7 @@ "I : 87.7\n", "E : 54.11237830194323 V\n", "FC Efficiency : 0.39217823782406486 \n", - "FC Power : 4721.612638440365 W\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ + "FC Power : 4721.612638440365 W\n", "FC Voltage : 53.83822848848762 V\n", "PH2 : 1.9521622695641725 atm\n", "PO2 : 1.9745323720829884 atm\n", @@ -9588,15 +9588,15 @@ "PH2 : 1.9219932901617578 atm\n", "PO2 : 1.957498981903589 atm\n", "Power-Thermal : 5441.637814080286 W\n", - "###########\n", - "Report is generating ...\n", - "Warning : There are errors in the simulations in some of I amounts; please refer to the .opem file for review. If you are confident about this parameters, ignore this error.\n" + "###########\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ + "Report is generating ...\n", + "Warning : There are errors in the simulations in some of I amounts; please refer to the .opem file for review. If you are confident about this parameters, ignore this error.\n", "Done!\n" ] } @@ -9699,12 +9699,12 @@ "text": [ "Requirement already satisfied: matplotlib in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (2.2.2)\n", "Requirement already satisfied: python-dateutil>=2.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (2.6.1)\n", + "Requirement already satisfied: cycler>=0.10 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (0.10.0)\n", + "Requirement already satisfied: six>=1.10 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (1.11.0)\n", + "Requirement already satisfied: kiwisolver>=1.0.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (1.0.1)\n", "Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (2.2.0)\n", "Requirement already satisfied: pytz in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (2018.3)\n", - "Requirement already satisfied: cycler>=0.10 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (0.10.0)\n", "Requirement already satisfied: numpy>=1.7.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (1.15.2)\n", - "Requirement already satisfied: kiwisolver>=1.0.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (1.0.1)\n", - "Requirement already satisfied: six>=1.10 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (1.11.0)\n", "Requirement already satisfied: setuptools in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from kiwisolver>=1.0.1->matplotlib) (39.2.0)\n" ] }, @@ -9712,7 +9712,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "You are using pip version 19.0.2, however version 19.0.3 is available.\n", + "You are using pip version 19.0.2, however version 19.1.1 is available.\n", "You should consider upgrading via the 'python -m pip install --upgrade pip' command.\n" ] } diff --git a/Documents/Padulles2.ipynb b/Documents/Padulles2.ipynb index 1b2f4f53..df8d4ea5 100644 --- a/Documents/Padulles2.ipynb +++ b/Documents/Padulles2.ipynb @@ -11,7 +11,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Version 1.0" + "### Version 1.1" ] }, { @@ -2893,7 +2893,13 @@ "FC Voltage : 2.9978080997614085 V\n", "PH2 : 2.1658011320872697 atm\n", "PH2O : 2.6657274776126667 atm\n", - "PO2 : 2.0951527634558484 atm\n", + "PO2 : 2.0951527634558484 atm\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ "Power-Thermal : 72.50041370548762 W\n", "###########\n", "I : 23.1\n", @@ -2988,13 +2994,7 @@ "###########\n", "I : 24.0\n", "E : 3.01197882382983 V\n", - "FC Efficiency : 0.3836850805168974 \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ + "FC Efficiency : 0.3836850805168974 \n", "FC Power : 71.8258470727632 W\n", "FC Voltage : 2.9927436280318 V\n", "PH2 : 2.1656606282711257 atm\n", @@ -4494,7 +4494,13 @@ "###########\n", "I : 39.0\n", "E : 3.0119578332387036 V\n", - "FC Efficiency : 0.3748820421898438 \n", + "FC Efficiency : 0.3748820421898438 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ "FC Power : 114.03911723415048 W\n", "FC Voltage : 2.9240799290807815 V\n", "PH2 : 2.163553071028968 atm\n", @@ -4994,13 +5000,7 @@ "###########\n", "I : 44.0\n", "E : 3.0119508337240952 V\n", - "FC Efficiency : 0.3722000680242963 \n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ + "FC Efficiency : 0.3722000680242963 \n", "FC Power : 127.73906334593849 W\n", "FC Voltage : 2.903160530589511 V\n", "PH2 : 2.162850551948248 atm\n", @@ -6495,7 +6495,13 @@ "FC Voltage : 2.8440604740804294 V\n", "PH2 : 2.160757045087704 atm\n", "PH2O : 2.6595190768897194 atm\n", - "PO2 : 2.0923048745426573 atm\n", + "PO2 : 2.0923048745426573 atm\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ "Power-Thermal : 194.7198380766627 W\n", "###########\n", "I : 59.0\n", @@ -6999,13 +7005,7 @@ "Power-Thermal : 212.46678097856423 W\n", "###########\n", "I : 64.0\n", - "E : 3.011922822397767 V\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ + "E : 3.011922822397767 V\n", "FC Efficiency : 0.3621324888696624 \n", "FC Power : 180.77653844373546 W\n", "FC Voltage : 2.8246334131833666 V\n", @@ -8005,7 +8005,13 @@ "Power-Thermal : 248.4701425109151 W\n", "###########\n", "I : 74.0\n", - "E : 3.0119088087668198 V\n", + "E : 3.0119088087668198 V\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ "FC Efficiency : 0.3573569301207881 \n", "FC Power : 206.26642006571893 W\n", "FC Voltage : 2.7873840549421476 V\n", @@ -9005,13 +9011,7 @@ "Power-Thermal : 285.1446249018666 W\n", "###########\n", "I : 84.0\n", - "E : 3.0118947898186437 V\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ + "E : 3.0118947898186437 V\n", "FC Efficiency : 0.35269424448917813 \n", "FC Power : 231.08526898930955 W\n", "FC Voltage : 2.75101510701559 V\n", @@ -9816,7 +9816,13 @@ "FC Power : 250.462471288656 W\n", "FC Voltage : 2.7224181661810434 V\n", "PH2 : 2.156106368773342 atm\n", - "PH2O : 2.6537948968359713 atm\n", + "PH2O : 2.6537948968359713 atm\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ "PO2 : 2.089679105099018 atm\n", "Power-Thermal : 315.337528711344 W\n", "###########\n", @@ -10716,11 +10722,11 @@ "text": [ "Requirement already satisfied: matplotlib in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (2.2.2)\n", "Requirement already satisfied: pytz in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (2018.3)\n", + "Requirement already satisfied: python-dateutil>=2.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (2.6.1)\n", + "Requirement already satisfied: numpy>=1.7.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (1.15.2)\n", "Requirement already satisfied: cycler>=0.10 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (0.10.0)\n", - "Requirement already satisfied: six>=1.10 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (1.11.0)\n", "Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (2.2.0)\n", - "Requirement already satisfied: numpy>=1.7.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (1.15.2)\n", - "Requirement already satisfied: python-dateutil>=2.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (2.6.1)\n", + "Requirement already satisfied: six>=1.10 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (1.11.0)\n", "Requirement already satisfied: kiwisolver>=1.0.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (1.0.1)\n", "Requirement already satisfied: setuptools in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from kiwisolver>=1.0.1->matplotlib) (39.2.0)\n" ] @@ -10729,7 +10735,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "You are using pip version 19.0.2, however version 19.0.3 is available.\n", + "You are using pip version 19.0.2, however version 19.1.1 is available.\n", "You should consider upgrading via the 'python -m pip install --upgrade pip' command.\n" ] } diff --git a/Documents/Padulles_Amphlett.ipynb b/Documents/Padulles_Amphlett.ipynb index 48d19449..38280a11 100644 --- a/Documents/Padulles_Amphlett.ipynb +++ b/Documents/Padulles_Amphlett.ipynb @@ -11,7 +11,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Version 1.0" + "### Version 1.1" ] }, { @@ -3173,7 +3173,13 @@ "Power-Thermal : 47.77162173680291 W\n", "###########\n", "I : 16.7\n", - "E : 6.068159382037317 V\n", + "E : 6.068159382037317 V\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ "Eta Activation : 0.524734596331091 V\n", "Eta Concentration : 0.003975922280185988 V\n", "Eta Ohmic : 0.03110904711647388 V\n", @@ -3200,13 +3206,7 @@ "PO2 : 0.18930158465918107 atm\n", "Power-Thermal : 48.45216793450386 W\n", "###########\n", - "I : 16.9\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ + "I : 16.9\n", "E : 6.068156285437771 V\n", "Eta Activation : 0.5255270011168852 V\n", "Eta Concentration : 0.004030067847933837 V\n", @@ -3688,7 +3688,13 @@ "Eta Concentration : 0.0049797357303207595 V\n", "Eta Ohmic : 0.03839463303545636 V\n", "FC Efficiency : 0.4054559049417491 \n", - "FC Power : 64.19988798847656 W\n", + "FC Power : 64.19988798847656 W\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ "FC Voltage : 3.1625560585456434 V\n", "Loss : 0.5811095089905454 V\n", "PH2 : 0.19433256524669543 atm\n", @@ -4804,7 +4810,13 @@ "###########\n", "I : 28.3\n", "E : 6.067979348875486 V\n", - "Eta Activation : 0.5599023812059849 V\n", + "Eta Activation : 0.5599023812059849 V\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ "Eta Concentration : 0.007465342770627357 V\n", "Eta Ohmic : 0.05557007883683938 V\n", "FC Efficiency : 0.37862696600105483 \n", @@ -5206,13 +5218,7 @@ "PH2 : 0.1928151240323415 atm\n", "PH2O : 0.237322146810844 atm\n", "PO2 : 0.18816718879682354 atm\n", - "Power-Thermal : 101.54334046912129 W\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ + "Power-Thermal : 101.54334046912129 W\n", "###########\n", "I : 31.2\n", "E : 6.067934203179685 V\n", @@ -6711,7 +6717,13 @@ "PH2O : 0.23547173211068984 atm\n", "PO2 : 0.18731837510960495 atm\n", "Power-Thermal : 147.10210130951378 W\n", - "###########\n", + "###########\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ "I : 41.9\n", "E : 6.067767152241567 V\n", "Eta Activation : 0.5861767693401617 V\n", @@ -7211,13 +7223,7 @@ "FC Power : 115.52690341555994 W\n", "FC Voltage : 2.544645449681937 V\n", "Loss : 0.704613379076614 V\n", - "PH2 : 0.19080591946148398 atm\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ + "PH2 : 0.19080591946148398 atm\n", "PH2O : 0.23484916267886227 atm\n", "PO2 : 0.18703279293446598 atm\n", "Power-Thermal : 163.68309658444008 W\n", @@ -8612,7 +8618,13 @@ "E : 6.06755530365583 V\n", "Eta Activation : 0.6049621796572042 V\n", "Eta Concentration : 0.020943868772115543 V\n", - "Eta Ohmic : 0.1290089278846637 V\n", + "Eta Ohmic : 0.1290089278846637 V\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ "FC Efficiency : 0.29397184898537343 \n", "FC Power : 127.03111538355957 W\n", "FC Voltage : 2.292980422085913 V\n", @@ -9217,13 +9229,7 @@ "Eta Ohmic : 0.14376979663031486 V\n", "FC Efficiency : 0.2788535914530824 \n", "FC Power : 129.85096339604235 W\n", - "FC Voltage : 2.1750580133340427 V\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ + "FC Voltage : 2.1750580133340427 V\n", "Loss : 0.7784859113504807 V\n", "PH2 : 0.18879671489062644 atm\n", "PH2O : 0.23237617854688053 atm\n", @@ -10222,7 +10228,13 @@ "PH2 : 0.18779913779600485 atm\n", "PH2O : 0.23114833327855394 atm\n", "PO2 : 0.1853351655600288 atm\n", - "Power-Thermal : 280.1459183596478 W\n", + "Power-Thermal : 280.1459183596478 W\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ "###########\n", "I : 66.9\n", "E : 6.067373876967314 V\n", @@ -11222,13 +11234,7 @@ "E : 6.067261419271577 V\n", "Eta Activation : 0.6245381051230374 V\n", "Eta Concentration : 0.059001004771667004 V\n", - "Eta Ohmic : 0.2017656593840103 V\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ + "Eta Ohmic : 0.2017656593840103 V\n", "FC Efficiency : 0.21035097088179527 \n", "FC Power : 121.41458039297225 W\n", "FC Voltage : 1.6407375728780034 V\n", @@ -11364,7 +11370,13 @@ "PO2 : 0.18469260566596615 atm\n", "Power-Thermal : 343.4645657067565 W\n", "###########\n", - "Report is generating ...\n", + "Report is generating ...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ "Done!\n" ] } @@ -11463,13 +11475,13 @@ "output_type": "stream", "text": [ "Requirement already satisfied: matplotlib in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (2.2.2)\n", - "Requirement already satisfied: kiwisolver>=1.0.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (1.0.1)\n", "Requirement already satisfied: cycler>=0.10 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (0.10.0)\n", - "Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (2.2.0)\n", - "Requirement already satisfied: pytz in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (2018.3)\n", - "Requirement already satisfied: python-dateutil>=2.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (2.6.1)\n", "Requirement already satisfied: numpy>=1.7.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (1.15.2)\n", "Requirement already satisfied: six>=1.10 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (1.11.0)\n", + "Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (2.2.0)\n", + "Requirement already satisfied: kiwisolver>=1.0.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (1.0.1)\n", + "Requirement already satisfied: python-dateutil>=2.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (2.6.1)\n", + "Requirement already satisfied: pytz in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (2018.3)\n", "Requirement already satisfied: setuptools in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from kiwisolver>=1.0.1->matplotlib) (39.2.0)\n" ] }, @@ -11477,7 +11489,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "You are using pip version 19.0.2, however version 19.0.3 is available.\n", + "You are using pip version 19.0.2, however version 19.1.1 is available.\n", "You should consider upgrading via the 'python -m pip install --upgrade pip' command.\n" ] } diff --git a/Documents/Padulles_Hauer.ipynb b/Documents/Padulles_Hauer.ipynb index 6501bdb1..df98ec92 100644 --- a/Documents/Padulles_Hauer.ipynb +++ b/Documents/Padulles_Hauer.ipynb @@ -11,7 +11,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Version 1.0" + "### Version 1.1" ] }, { @@ -2706,7 +2706,13 @@ "PH2O : 0.239103387129684 atm\n", "PO2 : 0.18898427113124888 atm\n", "Power-Thermal : 67.17583430859602 W\n", - "###########\n", + "###########\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ "I : 20.9\n", "E : 2.923094298882823 V\n", "FC Efficiency : 0.37434088682518973 \n", @@ -3226,13 +3232,7 @@ "PH2O : 0.23820412017259973 atm\n", "PO2 : 0.18857176354493702 atm\n", "Power-Thermal : 84.6586967471519 W\n", - "###########\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ + "###########\n", "I : 26.1\n", "E : 2.9230135605745087 V\n", "FC Efficiency : 0.37094978798547695 \n", @@ -4510,20 +4510,20 @@ "FC Voltage : 2.8357893284355624 V\n", "PH2 : 0.19173324464803362 atm\n", "PH2O : 0.23599053997054617 atm\n", - "PO2 : 0.18755636025555408 atm\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ + "PO2 : 0.18755636025555408 atm\n", "Power-Thermal : 128.59137405670018 W\n", "###########\n", "I : 38.9\n", "E : 2.9228140651994963 V\n", "FC Efficiency : 0.3635079237852384 \n", "FC Power : 110.29557423491705 W\n", - "FC Voltage : 2.83536180552486 V\n", + "FC Voltage : 2.83536180552486 V\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ "PH2 : 0.19171919426641923 atm\n", "PH2O : 0.23597324637521763 atm\n", "PO2 : 0.18754842741735575 atm\n", @@ -6022,7 +6022,13 @@ "I : 53.9\n", "E : 2.9225789024621953 V\n", "FC Efficiency : 0.3556534763089601 \n", - "FC Power : 149.523834509813 W\n", + "FC Power : 149.523834509813 W\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ "FC Voltage : 2.774097115209889 V\n", "PH2 : 0.18961163702426098 atm\n", "PH2O : 0.23337920707593607 atm\n", @@ -6072,13 +6078,7 @@ "I : 54.4\n", "E : 2.9225710378680643 V\n", "FC Efficiency : 0.35540168691227847 \n", - "FC Power : 150.804043790618 W\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ + "FC Power : 150.804043790618 W\n", "FC Voltage : 2.772133157915772 V\n", "PH2 : 0.18954138511618904 atm\n", "PH2O : 0.23329273909929338 atm\n", @@ -7894,7 +7894,13 @@ "PH2O : 0.23016259834482697 atm\n", "PO2 : 0.18488299378272544 atm\n", "Power-Thermal : 249.8869308732763 W\n", - "###########\n", + "###########\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ "I : 72.6\n", "E : 2.9222836211379284 V\n", "FC Efficiency : 0.3465273439102262 \n", @@ -8320,13 +8326,7 @@ "FC Efficiency : 0.34454282890928 \n", "FC Power : 206.3949362298151 W\n", "FC Voltage : 2.687434065492384 V\n", - "PH2 : 0.18639409963456605 atm\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ + "PH2 : 0.18639409963456605 atm\n", "PH2O : 0.2294189737456996 atm\n", "PO2 : 0.18454188174019837 atm\n", "Power-Thermal : 265.9250637701849 W\n", @@ -9533,7 +9533,13 @@ "###########\n", "I : 88.9\n", "E : 2.9220242976890476 V\n", - "FC Efficiency : 0.33892170234853397 \n", + "FC Efficiency : 0.33892170234853397 \n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ "FC Power : 235.01508684252045 W\n", "FC Voltage : 2.643589278318565 V\n", "PH2 : 0.18469400345922507 atm\n", @@ -10371,13 +10377,7 @@ "PO2 : 0.18292358274774423 atm\n", "Power-Thermal : 343.69495764297625 W\n", "###########\n", - "I : 97.3\n" - ] - }, - { - "name": "stdout", - "output_type": "stream", - "text": [ + "I : 97.3\n", "E : 2.9218899445383224 V\n", "FC Efficiency : 0.3350884516028607 \n", "FC Power : 254.3120294594751 W\n", @@ -10647,7 +10647,13 @@ "PO2 : 0.18270939611639 atm\n", "Power-Thermal : 354.19440008841076 W\n", "###########\n", - "Report is generating ...\n", + "Report is generating ...\n" + ] + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ "Done!\n" ] } @@ -10746,13 +10752,13 @@ "output_type": "stream", "text": [ "Requirement already satisfied: matplotlib in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (2.2.2)\n", - "Requirement already satisfied: numpy>=1.7.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (1.15.2)\n", - "Requirement already satisfied: python-dateutil>=2.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (2.6.1)\n", "Requirement already satisfied: six>=1.10 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (1.11.0)\n", "Requirement already satisfied: cycler>=0.10 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (0.10.0)\n", + "Requirement already satisfied: numpy>=1.7.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (1.15.2)\n", + "Requirement already satisfied: python-dateutil>=2.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (2.6.1)\n", "Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (2.2.0)\n", - "Requirement already satisfied: pytz in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (2018.3)\n", "Requirement already satisfied: kiwisolver>=1.0.1 in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (1.0.1)\n", + "Requirement already satisfied: pytz in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from matplotlib) (2018.3)\n", "Requirement already satisfied: setuptools in c:\\users\\sepkjaer\\appdata\\local\\programs\\python\\python35-32\\lib\\site-packages (from kiwisolver>=1.0.1->matplotlib) (39.2.0)\n" ] }, @@ -10760,7 +10766,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "You are using pip version 19.0.2, however version 19.0.3 is available.\n", + "You are using pip version 19.0.2, however version 19.1.1 is available.\n", "You should consider upgrading via the 'python -m pip install --upgrade pip' command.\n" ] } From b7aae4f8b59e1ad4c1c5385d93a4ea853fbf570e Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Thu, 27 Jun 2019 16:17:47 +0430 Subject: [PATCH 50/85] fix : Version.rc updated for version 1.1 --- otherfile/Version.rc | 8 ++++---- otherfile/test.html | 2 +- otherfile/test.opem | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/otherfile/Version.rc b/otherfile/Version.rc index feae8825..e58ac0e7 100644 --- a/otherfile/Version.rc +++ b/otherfile/Version.rc @@ -1,7 +1,7 @@ VSVersionInfo( ffi=FixedFileInfo( - filevers=(1, 0, 0, 0), - prodvers=(1, 0, 0, 0), + filevers=(1, 1, 0, 0), + prodvers=(1, 1, 0, 0), mask=0x3f, flags=0x0, OS=0x40004, @@ -16,12 +16,12 @@ VSVersionInfo( u'040904B0', [StringStruct(u'CompanyName', u'ECSIM'), StringStruct(u'FileDescription', u'OPEM.exe'), - StringStruct(u'FileVersion', u'1.0.0.0'), + StringStruct(u'FileVersion', u'1.1.0.0'), StringStruct(u'InternalName', u'OPEM.exe'), StringStruct(u'LegalCopyright', u'Copyright (c) 2019 ECSIM'), StringStruct(u'OriginalFilename', u'OPEM.exe'), StringStruct(u'ProductName', u'OPEM'), - StringStruct(u'ProductVersion', u'1, 0, 0, 0')]) + StringStruct(u'ProductVersion', u'1, 1, 0, 0')]) ]), VarFileInfo([VarStruct(u'Translation', [1033, 1200])]) ] diff --git a/otherfile/test.html b/otherfile/test.html index ef01c84e..38156d3d 100644 --- a/otherfile/test.html +++ b/otherfile/test.html @@ -576,6 +576,6 @@

Graphs

} }); -

Generated By OPEM Version 1.0

+

Generated By OPEM Version 1.1

\ No newline at end of file diff --git a/otherfile/test.opem b/otherfile/test.opem index 4ee53aa2..3476d5c7 100644 --- a/otherfile/test.opem +++ b/otherfile/test.opem @@ -4,7 +4,7 @@ | |_| || |_) || __/| | | | | | \___/ | .__/ \___||_| |_| |_| |_| -Simulation Date : 2019-02-22 15:47:51.869014 +Simulation Date : 2019-06-27 16:12:08.124984 ********** Amphlett Model From a74eccca4e72ca22ae634d7e7af1d9a60bb0f4c1 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Thu, 27 Jun 2019 16:27:22 +0430 Subject: [PATCH 51/85] fix : minor edit in test_Functions --- opem/Test/test_Functions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opem/Test/test_Functions.py b/opem/Test/test_Functions.py index 2e021514..e2441d92 100644 --- a/opem/Test/test_Functions.py +++ b/opem/Test/test_Functions.py @@ -57,10 +57,10 @@ ########### ->>> check_update(1) +>>> check_update(1.1) >>> check_update(0.1) ########### -New Version (1.0) Is Available! +New Version (1.1) Is Available! Website : http://www.ecsim.ir/opem ########### From a24c0126953299f59381fac8d7e9344314e549ef Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Thu, 27 Jun 2019 16:30:59 +0430 Subject: [PATCH 52/85] doc : CHANGELOG updated --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 16bb2fd3..2c609edf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Drop Python 3.4 support - `description_control` function modified - `version_check.py` modified +- `README.md` modified ## [1.0] - 2019-03-01 ### Added - Interactive notebooks section From 15da78fd82b4af114ac41a5225645787de908b60 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Thu, 27 Jun 2019 16:33:31 +0430 Subject: [PATCH 53/85] doc : GUI link added to INSTALL.md --- INSTALL.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/INSTALL.md b/INSTALL.md index 46d57aca..258b24cc 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -21,6 +21,10 @@ - Check [Conda Managing Package](https://conda.io/docs/user-guide/tasks/manage-pkgs.html#installing-packages-from-anaconda-org) - `conda install -c ecsim opem` (Need root access) +### GUI + +- OPEM GUI is available [here](https://github.com/ECSIM/gopem) + ### Exe Version (Only Windows) - Download [Exe-Version 1.1](https://github.com/ECSIM/opem/releases/download/v1.1/OPEM-1.1.exe) - Run `OPEM.exe` From 4f8ea6462843e2b9bb40917803a99a74452d6e4c Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Thu, 27 Jun 2019 16:36:02 +0430 Subject: [PATCH 54/85] doc : CHANGELOG updated --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c609edf..fb03f3ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ### Changed - Menu updated - Test system modified +- Docstrings modified - Drop Python 3.4 support - `description_control` function modified - `version_check.py` modified From 8cb5e7a88e02a7f3836f8626259602c75664a472 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Thu, 27 Jun 2019 16:45:49 +0430 Subject: [PATCH 55/85] fix : minor edit in setup.py --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index 2cca641f..7f331f97 100644 --- a/setup.py +++ b/setup.py @@ -63,7 +63,6 @@ def read_description(): 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Topic :: Scientific/Engineering :: Chemistry', From 0b5ffb9a694f85879f8de66d8ebae1b4bb6a0474 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Sun, 30 Jun 2019 03:00:18 +0430 Subject: [PATCH 56/85] fix : minor edit in Links param --- opem/Params.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opem/Params.py b/opem/Params.py index f66d0bb0..1f1e33f1 100644 --- a/opem/Params.py +++ b/opem/Params.py @@ -21,7 +21,7 @@ Repository : https://github.com/ECSIM/opem Document : http://www.ecsim.ir/opem/doc/ Paper : https://doi.org/10.21105/joss.00676 -* If you use OPEM in your research, please cite our paper. +* If you use OPEM in your research, please cite our paper * OPEM GUI is available here : https://github.com/ECSIM/gopem ''' Warning_Message_1 = "Warning : The value of I(>{}) leads to minus amount of V, please check your inputs" From 73f8c9fd6565969bed12f2127021f4c6575e2b8c Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Sun, 30 Jun 2019 03:02:25 +0430 Subject: [PATCH 57/85] fix : minor edit in warning messages --- opem/Params.py | 2 +- opem/Test/test_Padulles1.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/opem/Params.py b/opem/Params.py index 1f1e33f1..cb692c97 100644 --- a/opem/Params.py +++ b/opem/Params.py @@ -26,7 +26,7 @@ ''' Warning_Message_1 = "Warning : The value of I(>{}) leads to minus amount of V, please check your inputs" Warning_Message_2 = "Warning : There are errors in the simulations in some of I amounts; please refer to the .opem file" \ - " for review. If you are confident about this parameters, ignore this error." + " for review. If you are confident about this parameters, ignore this warning." Report_Message = "Report is generating ..." HHV = 1.482 uF = 0.95 diff --git a/opem/Test/test_Padulles1.py b/opem/Test/test_Padulles1.py index 1014ca81..93dbdd13 100644 --- a/opem/Test/test_Padulles1.py +++ b/opem/Test/test_Padulles1.py @@ -372,7 +372,7 @@ Power-Thermal : 209.9389930587172 W ########### Report is generating ... -Warning : There are errors in the simulations in some of I amounts; please refer to the .opem file for review. If you are confident about this parameters, ignore this error. +Warning : There are errors in the simulations in some of I amounts; please refer to the .opem file for review. If you are confident about this parameters, ignore this warning. Done! >>> Padulles_I_Data["Status"] True @@ -438,7 +438,7 @@ ########### Report is generating ... Warning : The value of I(>2) leads to minus amount of V, please check your inputs -Warning : There are errors in the simulations in some of I amounts; please refer to the .opem file for review. If you are confident about this parameters, ignore this error. +Warning : There are errors in the simulations in some of I amounts; please refer to the .opem file for review. If you are confident about this parameters, ignore this warning. Done! >>> shutil.rmtree("Padulles-I") From 74c9fe57d6a1aa6518ca095307094284890b79ac Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Sun, 30 Jun 2019 03:03:22 +0430 Subject: [PATCH 58/85] fix : menu font changed --- opem/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opem/__main__.py b/opem/__main__.py index 29228a00..bfea028a 100644 --- a/opem/__main__.py +++ b/opem/__main__.py @@ -47,7 +47,7 @@ tprint("v" + str(Version)) print(Description_Menu["Links"]) description_print("Overview", Description_Menu) - tprint("Models",font="bulbhead") + tprint("Models",font="varsity") for i, item in enumerate(MENUKEYS): print(str(i + 1) + "-" + item) try: From b7298ffcc9933aa7f5697141640311e00bb2bc34 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 1 Jul 2019 22:42:28 +0430 Subject: [PATCH 59/85] Update pytest from 4.6.3 to 5.0.0 --- dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index 7c28cf70..7549ac2e 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,7 +1,7 @@ codecov==2.0.15 art==3.7 requests==2.22.0 -pytest==4.6.3 +pytest==5.0.0 pytest-cov==2.7.1 setuptools==41.0.1 bandit==1.6.1 From 5f41e6156455340d7f1a7523f88dd355ca568474 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Mon, 1 Jul 2019 23:34:52 +0430 Subject: [PATCH 60/85] fix : Padulles_Amphlett import bug fixed --- opem/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/opem/__init__.py b/opem/__init__.py index c1d3d436..34daea39 100644 --- a/opem/__init__.py +++ b/opem/__init__.py @@ -10,3 +10,4 @@ import opem.Dynamic.Padulles1 import opem.Dynamic.Padulles2 import opem.Dynamic.Padulles_Hauer +import opem.Dynamic.Padulles_Amphlett From 06780114977a2e34a6b31140be408ee7acb47e10 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Mon, 1 Jul 2019 23:35:59 +0430 Subject: [PATCH 61/85] doc : CHANGELOG updated --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fb03f3ac..c131b871 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - `description_control` function modified - `version_check.py` modified - `README.md` modified +- Padulles-Amphlett model import bug fixed ## [1.0] - 2019-03-01 ### Added - Interactive notebooks section From ed4f6e26b94e90fcb45169c9d342069aa25dfc44 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Tue, 2 Jul 2019 01:18:44 +0430 Subject: [PATCH 62/85] feat : Amphlett matlab file added #119 --- Documents/MATLAB/Amphlett.m | 89 ++++++++++++++++++++++++++++++++ Documents/MATLAB/vector_filter.m | 12 +++++ 2 files changed, 101 insertions(+) create mode 100644 Documents/MATLAB/Amphlett.m create mode 100644 Documents/MATLAB/vector_filter.m diff --git a/Documents/MATLAB/Amphlett.m b/Documents/MATLAB/Amphlett.m new file mode 100644 index 00000000..599d3ed2 --- /dev/null +++ b/Documents/MATLAB/Amphlett.m @@ -0,0 +1,89 @@ +close all + +try + python_version = pyversion; + fprintf(2,'** Python Version : %s\n',python_version); +catch e + fprintf(2,'** Error : %s\n',e.message); +end + +% Import model +opem = py.importlib.import_module('opem'); +model = opem.Static.Amphlett; +test_vector = opem.Params.Amphlett_Standard_Vector; + +% Model inputs +test_vector{'T'} = 343.15; % Cell operation temperature [K] +test_vector{'PH2'} = 1; % Partial pressure [atm] +test_vector{'PO2'} = 1; % Partial pressure [atm] +test_vector{'i-start'} = 0; % Cell operating current start point [A] +test_vector{'i-stop'} = 75; % Cell operating current end point [A] +test_vector{'i-step'} = 0.1; % Cell operating current step +test_vector{'A'} = 50.6; % Active area [cm^2] +test_vector{'l'} = 0.0178; % Membrane thickness [cm] +test_vector{'lambda'} = 23; % An adjustable parameter with a min value of 14 and max value of 23 +test_vector{'N'} = 1; % Number of single cells +test_vector{'R'} = 0; % R-Electronic [ohm] (*Optional) +test_vector{'JMax'} = 1.5; % maximum current density [A/(cm^2)] +test_vector{'B'} = 0.016; % An empirical constant depending on the cell and its operation state (Tafel slope) [V] +test_vector{'Name'} = 'Amphlett_Test'; + +% Run simulation +test_mode = true; +print_mode = true; +report_mode = false; +result = model.Static_Analysis(test_vector,test_mode,print_mode,report_mode); + +% Model outputs +P = cellfun(@vector_filter, cell(result{'P'})); +I = cellfun(@vector_filter, cell(result{'I'})); +V = cellfun(@vector_filter, cell(result{'V'})); +EFF = cellfun(@vector_filter, cell(result{'EFF'})); +Ph = cellfun(@vector_filter, cell(result{'Ph'})); +Eta_Active = cellfun(@vector_filter, cell(result{'Eta_Active'})); +Eta_Conc = cellfun(@vector_filter, cell(result{'Eta_Conc'})); +Eta_Ohmic = cellfun(@vector_filter, cell(result{'Eta_Ohmic'})); +VE = cellfun(@vector_filter, cell(result{'VE'})); + + +% Power-Stack +figure(1) +plot(I,P) +xlabel('I(A)') +ylabel('P(W)') +legend('Power-Stack') + +% Voltage-Stack & Linear Approximation +figure(2) +plot(I,V) +xlabel('I(A)') +ylabel('V(V)') +hold on +plot(I,VE) +legend('Voltage-Stack','Linear-Apx') + +% Eta-Active , Eta-Conc and Eta-Ohmic +figure(3) +plot(I,Eta_Active) +xlabel('I(A)') +ylabel('V(V)') +hold on +plot(I,Eta_Conc) +hold on +plot(I,Eta_Ohmic) +legend('Eta Active','Eta Conc','Eta Ohmic') + +% Efficiency +figure(4) +plot(I,EFF) +xlabel('I(A)') +ylabel('EFF') +legend('Efficiency') + +% Power-Thermal +figure(5) +plot(I,Ph) +xlabel('I(A)') +ylabel('P(W)') +legend('Power(Thermal)') + diff --git a/Documents/MATLAB/vector_filter.m b/Documents/MATLAB/vector_filter.m new file mode 100644 index 00000000..4b47f1c8 --- /dev/null +++ b/Documents/MATLAB/vector_filter.m @@ -0,0 +1,12 @@ +function [ result ] = vector_filter( inp ) +%vector_filter Summary of this function goes here +% Detailed explanation goes here +if isa(inp,'py.NoneType') == 1 + result = NaN; +else + result = double(inp); + +end + +end + From 973e2b07cdc855aee4562d09f509baae35ae2669 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Tue, 2 Jul 2019 01:28:18 +0430 Subject: [PATCH 63/85] feat : Chamberline-Kim matlab file added #119 --- Documents/MATLAB/Chamberline_Kim.m | 72 ++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 Documents/MATLAB/Chamberline_Kim.m diff --git a/Documents/MATLAB/Chamberline_Kim.m b/Documents/MATLAB/Chamberline_Kim.m new file mode 100644 index 00000000..e5e7e1d8 --- /dev/null +++ b/Documents/MATLAB/Chamberline_Kim.m @@ -0,0 +1,72 @@ +close all + +try + python_version = pyversion; + fprintf(2,'** Python Version : %s\n',python_version); +catch e + fprintf(2,'** Error : %s\n',e.message); +end + +% Import model +opem = py.importlib.import_module('opem'); +model = opem.Static.Chamberline_Kim; +test_vector = opem.Params.Chamberline_Standard_Vector; + +% Model inputs +test_vector{'A'} = 50.0; % Active area [cm^2] +test_vector{'E0'} = 0.982; % Open circuit voltage [V] +test_vector{'b'} = 0.0689; % Tafel's parameter for the oxygen reduction [V] +test_vector{'R'} = 0.328; % Resistance [ohm.cm^2] +test_vector{'m'} = 0.000125; % Diffusion's parameters [V] +test_vector{'n'} = 9.45; % Diffusion's parameters [(A^-1)(cm^2)] +test_vector{'N'} = 1; % Number of single cells +test_vector{'i-start'} = 1; % Cell operating current start point [A] +test_vector{'i-stop'} = 42.5; % Cell operating current end point [A] +test_vector{'i-step'} = 0.1; % Cell operating current step +test_vector{'Name'} = 'Chamberline_Test'; + +% Run simulation +test_mode = true; +print_mode = true; +report_mode = false; +result = model.Static_Analysis(test_vector,test_mode,print_mode,report_mode); + +% Model outputs +P = cellfun(@vector_filter, cell(result{'P'})); +I = cellfun(@vector_filter, cell(result{'I'})); +V = cellfun(@vector_filter, cell(result{'V'})); +EFF = cellfun(@vector_filter, cell(result{'EFF'})); +Ph = cellfun(@vector_filter, cell(result{'Ph'})); +VE = cellfun(@vector_filter, cell(result{'VE'})); + + +% Power-Stack +figure(1) +plot(I,P) +xlabel('I(A)') +ylabel('P(W)') +legend('Power-Stack') + +% Voltage-Stack & Linear Approximation +figure(2) +plot(I,V) +xlabel('I(A)') +ylabel('V(V)') +hold on +plot(I,VE) +legend('Voltage-Stack','Linear-Apx') + +% Efficiency +figure(3) +plot(I,EFF) +xlabel('I(A)') +ylabel('EFF') +legend('Efficiency') + +% Power-Thermal +figure(4) +plot(I,Ph) +xlabel('I(A)') +ylabel('P(W)') +legend('Power(Thermal)') + From 6fc38fe05fcd71d983447eb833e661deef2ca205 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Tue, 2 Jul 2019 01:33:30 +0430 Subject: [PATCH 64/85] feat : Larminie-Dicks matlab file added #119 --- Documents/MATLAB/Larminie_Dicks.m | 73 +++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 Documents/MATLAB/Larminie_Dicks.m diff --git a/Documents/MATLAB/Larminie_Dicks.m b/Documents/MATLAB/Larminie_Dicks.m new file mode 100644 index 00000000..c4d25291 --- /dev/null +++ b/Documents/MATLAB/Larminie_Dicks.m @@ -0,0 +1,73 @@ +close all + +try + python_version = pyversion; + fprintf(2,'** Python Version : %s\n',python_version); +catch e + fprintf(2,'** Error : %s\n',e.message); +end + +% Import model +opem = py.importlib.import_module('opem'); +model = opem.Static.Larminie_Dicks; +test_vector = opem.Params.Larminiee_Standard_Vector; + +% Model inputs +test_vector{'A'} = 0.0587; % The slope of the Tafel line [V] +test_vector{'E0'} = 1.178; % Fuel cell reversible no loss voltage [V] +test_vector{'B'} = 0.0517; % Constant in the mass transfer term [V] +test_vector{'RM'} = 0.0018; % The membrane and contact resistances [ohm] +test_vector{'i_0'} = 0.00654; % Exchange current at which the overvoltage begins to move from zero [A] +test_vector{'i_L'} = 100.0; % Limiting current [A] +test_vector{'i_n'} = 0.23; % Internal current [A] +test_vector{'N'} = 23; % Number of single cells +test_vector{'i-start'} = 0.1; % Cell operating current start point [A] +test_vector{'i-stop'} = 98; % Cell operating current end point [A] +test_vector{'i-step'} = 0.1; % Cell operating current step +test_vector{'Name'} = 'Larminiee_Test'; + +% Run simulation +test_mode = true; +print_mode = true; +report_mode = false; +result = model.Static_Analysis(test_vector,test_mode,print_mode,report_mode); + +% Model outputs +P = cellfun(@vector_filter, cell(result{'P'})); +I = cellfun(@vector_filter, cell(result{'I'})); +V = cellfun(@vector_filter, cell(result{'V'})); +EFF = cellfun(@vector_filter, cell(result{'EFF'})); +Ph = cellfun(@vector_filter, cell(result{'Ph'})); +VE = cellfun(@vector_filter, cell(result{'VE'})); + + +% Power-Stack +figure(1) +plot(I,P) +xlabel('I(A)') +ylabel('P(W)') +legend('Power-Stack') + +% Voltage-Stack & Linear Approximation +figure(2) +plot(I,V) +xlabel('I(A)') +ylabel('V(V)') +hold on +plot(I,VE) +legend('Voltage-Stack','Linear-Apx') + +% Efficiency +figure(3) +plot(I,EFF) +xlabel('I(A)') +ylabel('EFF') +legend('Efficiency') + +% Power-Thermal +figure(4) +plot(I,Ph) +xlabel('I(A)') +ylabel('P(W)') +legend('Power(Thermal)') + From 539edef0cae8e60555e519ecdb1c5d396ff2c484 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Tue, 2 Jul 2019 01:40:59 +0430 Subject: [PATCH 65/85] feat : Padulles1 matlab file added #119 --- Documents/MATLAB/Padulles1.m | 92 ++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 Documents/MATLAB/Padulles1.m diff --git a/Documents/MATLAB/Padulles1.m b/Documents/MATLAB/Padulles1.m new file mode 100644 index 00000000..69253d5d --- /dev/null +++ b/Documents/MATLAB/Padulles1.m @@ -0,0 +1,92 @@ +close all + +try + python_version = pyversion; + fprintf(2,'** Python Version : %s\n',python_version); +catch e + fprintf(2,'** Error : %s\n',e.message); +end + +% Import model +opem = py.importlib.import_module('opem'); +model = opem.Dynamic.Padulles1; +test_vector = opem.Params.Padulles_Standard_Vector; + +% Model inputs +test_vector{'T'} = 343; % Fuel cell temperature [K] +test_vector{'E0'} = 0.6; % No load voltage [V] +test_vector{'N0'} = 88; % Number of cells +test_vector{'KO2'} = 0.0000211; % Oxygen valve constant [kmol.s^(-1).atm^(-1)] +test_vector{'KH2'} = 0.0000422; % Hydrogen valve constant [kmol.s^(-1).atm^(-1)] +test_vector{'tH2'} = 3.37; % Hydrogen time constant [s] +test_vector{'tO2'} = 6.74; % Oxygen time constant [s] +test_vector{'B'} = 0.04777; % Activation voltage constant [V] +test_vector{'C'} = 0.0136; % Activation constant parameter [A^(-1)] +test_vector{'Rint'} = 0.00303; % Fuel cell internal resistance [ohm] +test_vector{'rho'} = 1.168; % Hydrogen-Oxygen flow rate +test_vector{'qH2'} = 0.0004; % Molar flow of hydrogen [kmol.s^(-1)] +test_vector{'i-start'} = 0; % Cell operating current start point [A] +test_vector{'i-stop'} = 100; % Cell operating current end point [A] +test_vector{'i-step'} = 0.1; % Cell operating current step +test_vector{'Name'} = 'PadullesI_Test'; + +% Run simulation +test_mode = true; +print_mode = true; +report_mode = false; +result = model.Dynamic_Analysis(test_vector,test_mode,print_mode,report_mode); + +% Model outputs +P = cellfun(@vector_filter, cell(result{'P'})); +I = cellfun(@vector_filter, cell(result{'I'})); +V = cellfun(@vector_filter, cell(result{'V'})); +EFF = cellfun(@vector_filter, cell(result{'EFF'})); +Ph = cellfun(@vector_filter, cell(result{'Ph'})); +VE = cellfun(@vector_filter, cell(result{'VE'})); +PO2 = cellfun(@vector_filter, cell(result{'PO2'})); +PH2 = cellfun(@vector_filter, cell(result{'PH2'})); + +% Power-Stack +figure(1) +plot(I,P) +xlabel('I(A)') +ylabel('P(W)') +legend('Power-Stack') + +% Voltage-Stack & Linear Approximation +figure(2) +plot(I,V) +xlabel('I(A)') +ylabel('V(V)') +hold on +plot(I,VE) +legend('Voltage-Stack','Linear-Apx') + +% Efficiency +figure(3) +plot(I,EFF) +xlabel('I(A)') +ylabel('EFF') +legend('Efficiency') + +% Power-Thermal +figure(4) +plot(I,Ph) +xlabel('I(A)') +ylabel('P(W)') +legend('Power(Thermal)') + +% PO2 +figure(5) +plot(I,PO2) +xlabel('I(A)') +ylabel('PO2(atm)') +legend('PO2') + +% PH2 +figure(6) +plot(I,PH2) +xlabel('I(A)') +ylabel('PH2(atm)') +legend('PH2') + From 3962212ab2c1ccc67477948c837eede43baf58cc Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Tue, 2 Jul 2019 01:49:17 +0430 Subject: [PATCH 66/85] feat : Padulles2 matlab file added #119 --- Documents/MATLAB/Padulles2.m | 102 +++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 Documents/MATLAB/Padulles2.m diff --git a/Documents/MATLAB/Padulles2.m b/Documents/MATLAB/Padulles2.m new file mode 100644 index 00000000..4c9699ea --- /dev/null +++ b/Documents/MATLAB/Padulles2.m @@ -0,0 +1,102 @@ +close all + +try + python_version = pyversion; + fprintf(2,'** Python Version : %s\n',python_version); +catch e + fprintf(2,'** Error : %s\n',e.message); +end + +% Import model +opem = py.importlib.import_module('opem'); +model = opem.Dynamic.Padulles2; +test_vector = opem.Params.Padulles2_Standard_Vector; + +% Model inputs +test_vector{'T'} = 343; % Fuel cell temperature [K] +test_vector{'E0'} = 0.6; % No load voltage [V] +test_vector{'N0'} = 5; % Number of cells +test_vector{'KO2'} = 0.0000211; % Oxygen valve constant [kmol.s^(-1).atm^(-1)] +test_vector{'KH2'} = 0.0000422; % Hydrogen valve constant [kmol.s^(-1).atm^(-1)] +test_vector{'KH2O'} = 0.000007716; % Water Valve Constant [kmol.s^(-1).atm^(-1)] +test_vector{'tH2'} = 3.37; % Hydrogen time constant [s] +test_vector{'tO2'} = 6.74; % Oxygen time constant [s] +test_vector{'tH2O'} = 18.418; % Water time constant [s] +test_vector{'B'} = 0.04777; % Activation voltage constant [V] +test_vector{'C'} = 0.0136; % Activation constant parameter [A^(-1)] +test_vector{'Rint'} = 0.00303; % Fuel cell internal resistance [ohm] +test_vector{'rho'} = 1.168; % Hydrogen-Oxygen flow rate +test_vector{'qH2'} = 0.0004; % Molar flow of hydrogen [kmol.s^(-1)] +test_vector{'i-start'} = 0.1; % Cell operating current start point [A] +test_vector{'i-stop'} = 100; % Cell operating current end point [A] +test_vector{'i-step'} = 0.1; % Cell operating current step +test_vector{'Name'} = 'Padulles2_Test'; + +% Run simulation +test_mode = true; +print_mode = true; +report_mode = false; +result = model.Dynamic_Analysis(test_vector,test_mode,print_mode,report_mode); + +% Model outputs +P = cellfun(@vector_filter, cell(result{'P'})); +I = cellfun(@vector_filter, cell(result{'I'})); +V = cellfun(@vector_filter, cell(result{'V'})); +EFF = cellfun(@vector_filter, cell(result{'EFF'})); +Ph = cellfun(@vector_filter, cell(result{'Ph'})); +VE = cellfun(@vector_filter, cell(result{'VE'})); +PO2 = cellfun(@vector_filter, cell(result{'PO2'})); +PH2 = cellfun(@vector_filter, cell(result{'PH2'})); +PH2O = cellfun(@vector_filter, cell(result{'PH2O'})); + +% Power-Stack +figure(1) +plot(I,P) +xlabel('I(A)') +ylabel('P(W)') +legend('Power-Stack') + +% Voltage-Stack & Linear Approximation +figure(2) +plot(I,V) +xlabel('I(A)') +ylabel('V(V)') +hold on +plot(I,VE) +legend('Voltage-Stack','Linear-Apx') + +% Efficiency +figure(3) +plot(I,EFF) +xlabel('I(A)') +ylabel('EFF') +legend('Efficiency') + +% Power-Thermal +figure(4) +plot(I,Ph) +xlabel('I(A)') +ylabel('P(W)') +legend('Power(Thermal)') + +% PO2 +figure(5) +plot(I,PO2) +xlabel('I(A)') +ylabel('PO2(atm)') +legend('PO2') + +% PH2 +figure(6) +plot(I,PH2) +xlabel('I(A)') +ylabel('PH2(atm)') +legend('PH2') + +% PH2O +figure(7) +plot(I,PH2O) +xlabel('I(A)') +ylabel('PH2O(atm)') +legend('PH2O') + From 0c64af185bba8c4d934dcba28994b1aa5c1ce114 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Tue, 2 Jul 2019 01:59:10 +0430 Subject: [PATCH 67/85] feat : Padulles-Hauer matlab file added #119 --- Documents/MATLAB/Padulles_Hauer.m | 105 ++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 Documents/MATLAB/Padulles_Hauer.m diff --git a/Documents/MATLAB/Padulles_Hauer.m b/Documents/MATLAB/Padulles_Hauer.m new file mode 100644 index 00000000..54761ab2 --- /dev/null +++ b/Documents/MATLAB/Padulles_Hauer.m @@ -0,0 +1,105 @@ +close all + +try + python_version = pyversion; + fprintf(2,'** Python Version : %s\n',python_version); +catch e + fprintf(2,'** Error : %s\n',e.message); +end + +% Import model +opem = py.importlib.import_module('opem'); +model = opem.Dynamic.Padulles_Hauer; +test_vector = opem.Params.Padulles_Hauer_Standard_Vector; + +% Model inputs +test_vector{'T'} = 343; % Fuel cell temperature [K] +test_vector{'E0'} = 0.6; % No load voltage [V] +test_vector{'N0'} = 5; % Number of cells +test_vector{'KO2'} = 0.0000211; % Oxygen valve constant [kmol.s^(-1).atm^(-1)] +test_vector{'KH2'} = 0.0000422; % Hydrogen valve constant [kmol.s^(-1).atm^(-1)] +test_vector{'KH2O'} = 0.000007716; % Water valve constant [kmol.s^(-1).atm^(-1)] +test_vector{'tH2'} = 3.37; % Hydrogen time constant [s] +test_vector{'tO2'} = 6.74; % Oxygen time constant [s] +test_vector{'t1'} = 2; % Reformer time constant [s] +test_vector{'t2'} = 2; % Reformer time constant [s] +test_vector{'tH2O'} = 18.418; % Water time constant [s] +test_vector{'B'} = 0.04777; % Activation voltage constant [V] +test_vector{'C'} = 0.0136; % Activation constant parameter [A^(-1)] +test_vector{'Rint'} = 0.00303; % Fuel cell internal resistance [ohm] +test_vector{'rho'} = 1.168; % Hydrogen-Oxygen flow rate +test_vector{'qMethanol'} = 0.0002; % Molar flow of methanol [kmol.s^(-1)] +test_vector{'CV'} = 2; % Conversion factor +test_vector{'i-start'} = 0.1; % Cell operating current start point [A] +test_vector{'i-stop'} = 100; % Cell operating current end point [A] +test_vector{'i-step'} = 0.1; % Cell operating current step +test_vector{'Name'} = 'Padulles_Hauer_Test'; + +% Run simulation +test_mode = true; +print_mode = true; +report_mode = false; +result = model.Dynamic_Analysis(test_vector,test_mode,print_mode,report_mode); + +% Model outputs +P = cellfun(@vector_filter, cell(result{'P'})); +I = cellfun(@vector_filter, cell(result{'I'})); +V = cellfun(@vector_filter, cell(result{'V'})); +EFF = cellfun(@vector_filter, cell(result{'EFF'})); +Ph = cellfun(@vector_filter, cell(result{'Ph'})); +VE = cellfun(@vector_filter, cell(result{'VE'})); +PO2 = cellfun(@vector_filter, cell(result{'PO2'})); +PH2 = cellfun(@vector_filter, cell(result{'PH2'})); +PH2O = cellfun(@vector_filter, cell(result{'PH2O'})); + +% Power-Stack +figure(1) +plot(I,P) +xlabel('I(A)') +ylabel('P(W)') +legend('Power-Stack') + +% Voltage-Stack & Linear Approximation +figure(2) +plot(I,V) +xlabel('I(A)') +ylabel('V(V)') +hold on +plot(I,VE) +legend('Voltage-Stack','Linear-Apx') + +% Efficiency +figure(3) +plot(I,EFF) +xlabel('I(A)') +ylabel('EFF') +legend('Efficiency') + +% Power-Thermal +figure(4) +plot(I,Ph) +xlabel('I(A)') +ylabel('P(W)') +legend('Power(Thermal)') + +% PO2 +figure(5) +plot(I,PO2) +xlabel('I(A)') +ylabel('PO2(atm)') +legend('PO2') + +% PH2 +figure(6) +plot(I,PH2) +xlabel('I(A)') +ylabel('PH2(atm)') +legend('PH2') + +% PH2O +figure(7) +plot(I,PH2O) +xlabel('I(A)') +ylabel('PH2O(atm)') +legend('PH2O') + From 0d099239cc2f324e4166048f91d65af157c24b8e Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Tue, 2 Jul 2019 02:44:57 +0430 Subject: [PATCH 68/85] feat : Padulles-Amphlett matlab file added #119 --- Documents/MATLAB/Padulles_Amphlett.m | 120 +++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 Documents/MATLAB/Padulles_Amphlett.m diff --git a/Documents/MATLAB/Padulles_Amphlett.m b/Documents/MATLAB/Padulles_Amphlett.m new file mode 100644 index 00000000..a517a528 --- /dev/null +++ b/Documents/MATLAB/Padulles_Amphlett.m @@ -0,0 +1,120 @@ +close all + +try + python_version = pyversion; + fprintf(2,'** Python Version : %s\n',python_version); +catch e + fprintf(2,'** Error : %s\n',e.message); +end + +% Import model +opem = py.importlib.import_module('opem'); +model = opem.Dynamic.Padulles_Amphlett; +test_vector = opem.Params.Padulles_Amphlett_Standard_Vector; + +% Model inputs +test_vector{'A'} = 50.6; % Active area [cm^2] +test_vector{'l'} = 0.0178; % Membrane thickness [cm] +test_vector{'lambda'} = 23; % An adjustable parameter with a min value of 14 and max value of 23 +test_vector{'JMax'} = 1.5; % Maximum current density [A/(cm^2)] +test_vector{'T'} = 343; % Fuel cell temperature [K] +test_vector{'N0'} = 5; % No load voltage [V] +test_vector{'KO2'} = 0.0000211; % Oxygen valve constant [kmol.s^(-1).atm^(-1)] +test_vector{'KH2'} = 0.0000422; % Hydrogen valve constant [kmol.s^(-1).atm^(-1)] +test_vector{'KH2O'} = 0.000007716; % Water valve constant [kmol.s^(-1).atm^(-1)] +test_vector{'tH2'} = 3.37; % Hydrogen time constant [s] +test_vector{'tO2'} = 6.74; % Oxygen time constant [s] +test_vector{'t1'} = 2; % Reformer time constant [s] +test_vector{'t2'} = 2; % Reformer time constant [s] +test_vector{'tH2O'} = 18.418; % Water time constant [s] +test_vector{'B'} = 0.016; % An empirical constant depending on the cell and its operation state (Tafel slope) [V] +test_vector{'rho'} = 1.168; % Hydrogen-Oxygen flow rate +test_vector{'qMethanol'} = 0.0002; % Molar flow of methanol [kmol.s^(-1)] +test_vector{'CV'} = 2; % Conversion factor +test_vector{'i-start'} = 0.1; % Cell operating current start point [A] +test_vector{'i-stop'} = 75; % Cell operating current end point [A] +test_vector{'i-step'} = 0.1; % Cell operating current step +test_vector{'Name'} = 'Padulles_Amphlett_Test'; + +% Run simulation +test_mode = true; +print_mode = true; +report_mode = false; +result = model.Dynamic_Analysis(test_vector,test_mode,print_mode,report_mode); + +% Model outputs +P = cellfun(@vector_filter, cell(result{'P'})); +I = cellfun(@vector_filter, cell(result{'I'})); +V = cellfun(@vector_filter, cell(result{'V'})); +EFF = cellfun(@vector_filter, cell(result{'EFF'})); +Ph = cellfun(@vector_filter, cell(result{'Ph'})); +VE = cellfun(@vector_filter, cell(result{'VE'})); +PO2 = cellfun(@vector_filter, cell(result{'PO2'})); +PH2 = cellfun(@vector_filter, cell(result{'PH2'})); +PH2O = cellfun(@vector_filter, cell(result{'PH2O'})); +Eta_Active = cellfun(@vector_filter, cell(result{'Eta_Active'})); +Eta_Conc = cellfun(@vector_filter, cell(result{'Eta_Conc'})); +Eta_Ohmic = cellfun(@vector_filter, cell(result{'Eta_Ohmic'})); + +% Power-Stack +figure(1) +plot(I,P) +xlabel('I(A)') +ylabel('P(W)') +legend('Power-Stack') + +% Voltage-Stack & Linear Approximation +figure(2) +plot(I,V) +xlabel('I(A)') +ylabel('V(V)') +hold on +plot(I,VE) +legend('Voltage-Stack','Linear-Apx') + +% Efficiency +figure(3) +plot(I,EFF) +xlabel('I(A)') +ylabel('EFF') +legend('Efficiency') + +% Power-Thermal +figure(4) +plot(I,Ph) +xlabel('I(A)') +ylabel('P(W)') +legend('Power(Thermal)') + +% PO2 +figure(5) +plot(I,PO2) +xlabel('I(A)') +ylabel('PO2(atm)') +legend('PO2') + +% PH2 +figure(6) +plot(I,PH2) +xlabel('I(A)') +ylabel('PH2(atm)') +legend('PH2') + +% PH2O +figure(7) +plot(I,PH2O) +xlabel('I(A)') +ylabel('PH2O(atm)') +legend('PH2O') + +% Eta-Active , Eta-Conc and Eta-Ohmic +figure(8) +plot(I,Eta_Active) +xlabel('I(A)') +ylabel('V(V)') +hold on +plot(I,Eta_Conc) +hold on +plot(I,Eta_Ohmic) +legend('Eta Active','Eta Conc','Eta Ohmic') + From a3ed0c9c910bce6f656e537cc8da63b3cf80003e Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Tue, 2 Jul 2019 12:32:58 +0430 Subject: [PATCH 69/85] fix : dev-requirements.txt updated --- dev-requirements.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index 7549ac2e..c0cde8cb 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,9 +1,9 @@ -codecov==2.0.15 art==3.7 requests==2.22.0 -pytest==5.0.0 -pytest-cov==2.7.1 -setuptools==41.0.1 -bandit==1.6.1 -vulture==1.0 -pydocstyle==3.0.0 \ No newline at end of file +codecov>=2.0.15 +pytest>=4.3.0 +pytest-cov>=2.6.1 +setuptools>=40.8.3 +bandit>=1.5.1 +vulture>=1.0 +pydocstyle>=3.0.0 \ No newline at end of file From 0931eb263898a19886f99a6972fdee27d8ef02b3 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Tue, 2 Jul 2019 12:40:52 +0430 Subject: [PATCH 70/85] fix : MATLAB folder location changed --- {Documents/MATLAB => MATLAB}/Amphlett.m | 0 {Documents/MATLAB => MATLAB}/Chamberline_Kim.m | 0 {Documents/MATLAB => MATLAB}/Larminie_Dicks.m | 0 {Documents/MATLAB => MATLAB}/Padulles1.m | 0 {Documents/MATLAB => MATLAB}/Padulles2.m | 0 {Documents/MATLAB => MATLAB}/Padulles_Amphlett.m | 0 {Documents/MATLAB => MATLAB}/Padulles_Hauer.m | 0 {Documents/MATLAB => MATLAB}/vector_filter.m | 0 8 files changed, 0 insertions(+), 0 deletions(-) rename {Documents/MATLAB => MATLAB}/Amphlett.m (100%) rename {Documents/MATLAB => MATLAB}/Chamberline_Kim.m (100%) rename {Documents/MATLAB => MATLAB}/Larminie_Dicks.m (100%) rename {Documents/MATLAB => MATLAB}/Padulles1.m (100%) rename {Documents/MATLAB => MATLAB}/Padulles2.m (100%) rename {Documents/MATLAB => MATLAB}/Padulles_Amphlett.m (100%) rename {Documents/MATLAB => MATLAB}/Padulles_Hauer.m (100%) rename {Documents/MATLAB => MATLAB}/vector_filter.m (100%) diff --git a/Documents/MATLAB/Amphlett.m b/MATLAB/Amphlett.m similarity index 100% rename from Documents/MATLAB/Amphlett.m rename to MATLAB/Amphlett.m diff --git a/Documents/MATLAB/Chamberline_Kim.m b/MATLAB/Chamberline_Kim.m similarity index 100% rename from Documents/MATLAB/Chamberline_Kim.m rename to MATLAB/Chamberline_Kim.m diff --git a/Documents/MATLAB/Larminie_Dicks.m b/MATLAB/Larminie_Dicks.m similarity index 100% rename from Documents/MATLAB/Larminie_Dicks.m rename to MATLAB/Larminie_Dicks.m diff --git a/Documents/MATLAB/Padulles1.m b/MATLAB/Padulles1.m similarity index 100% rename from Documents/MATLAB/Padulles1.m rename to MATLAB/Padulles1.m diff --git a/Documents/MATLAB/Padulles2.m b/MATLAB/Padulles2.m similarity index 100% rename from Documents/MATLAB/Padulles2.m rename to MATLAB/Padulles2.m diff --git a/Documents/MATLAB/Padulles_Amphlett.m b/MATLAB/Padulles_Amphlett.m similarity index 100% rename from Documents/MATLAB/Padulles_Amphlett.m rename to MATLAB/Padulles_Amphlett.m diff --git a/Documents/MATLAB/Padulles_Hauer.m b/MATLAB/Padulles_Hauer.m similarity index 100% rename from Documents/MATLAB/Padulles_Hauer.m rename to MATLAB/Padulles_Hauer.m diff --git a/Documents/MATLAB/vector_filter.m b/MATLAB/vector_filter.m similarity index 100% rename from Documents/MATLAB/vector_filter.m rename to MATLAB/vector_filter.m From 038f6eaa5b35bbcbf714509ac60c8c012c7afb29 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Tue, 2 Jul 2019 13:15:26 +0430 Subject: [PATCH 71/85] doc : MATLAB guide added to README --- INSTALL.md | 11 ++++++++++- README.md | 6 +++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 258b24cc..502fdae9 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,7 +1,7 @@ ## Installation ### Source Code -- Download [Python3.x](https://www.python.org/downloads/) (>=3.5) +- Download and install [Python3.x](https://www.python.org/downloads/) (>=3.5) - Download [Version 1.1](https://github.com/ecsim/opem/archive/v1.1.zip) or [Latest Source ](https://github.com/ecsim/opem/archive/master.zip) - Run `pip install -r requirements.txt` or `pip3 install -r requirements.txt` (Need root access) - Run `python3 setup.py install` or `python setup.py install` (Need root access) @@ -36,6 +36,15 @@ - Copy `OPEM` into your system - Run `OPEM` +### MATLAB +- Download and install [MATLAB](https://www.mathworks.com/products/matlab.html) (>=8.5) +- Download and install [Python3.x](https://www.python.org/downloads/) (>=3.5) +- Run `pip install opem` or `pip3 install opem` (Need root access) +- Configure Python interpreter +```MATLAB +>> pyversion PYTHON_EXECUTABLE_FULL_PATH +``` +- Visit [MATLAB Examples](https://github.com/ECSIM/opem/tree/master/MATLAB) ### Exe Version Note For OPEM <= 0.5 targeting Windows < 10, the user needs to take special care to include the Visual C++ run-time .dlls: Python 3.5 uses Visual Studio 2015 run-time, which has been renamed into “Universal CRT“ and has become part of Windows 10. For Windows Vista through Windows 8.1 there are Windows update packages, which may or may not be installed in the target-system. So you have the following options: diff --git a/README.md b/README.md index ce6780a6..3c8bfa31 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ * [Library](https://github.com/ECSIM/opem#library) * [Telegram Bot](https://github.com/ECSIM/opem#telegram-bot) * [Try OPEM in Your Browser!](https://github.com/ECSIM/opem#try-opem-in-your-browser) + * [MATLAB](https://github.com/ECSIM/opem#matlab) * [Issues & Bug Reports](https://github.com/ECSIM/opem#issues--bug-reports) * [Contribution](https://github.com/ECSIM/opem/blob/master/.github/CONTRIBUTING.md) * [Todo](https://github.com/ECSIM/opem#todo) @@ -1294,7 +1295,9 @@ OPEM can be used online in interactive Jupyter Notebooks via the Binder service! - Edit and execute each part of the notes, step by step from the top panel by run button - For executing a complete simulation, you can edit `Test_Vector` in `Full Run` section - +### MATLAB + +Visit [MATLAB Examples](https://github.com/ECSIM/opem/tree/master/MATLAB) ## Issues & Bug Reports @@ -1350,6 +1353,7 @@ Gitter is another option : - [x] Voltage of PEMFC - [x] Power of PEMFC - [x] Efficiency of PEMFC +- [x] MATLAB ## Outputs From 62461aaad70db6c52cc33a885508334efcfcc3ff Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Tue, 2 Jul 2019 13:20:11 +0430 Subject: [PATCH 72/85] doc : CHANGELOG updated --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c131b871..a6505964 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] ## [1.1] - 2019-06-28 +### Added +- MATLAB examples ### Changed - Menu updated - Test system modified @@ -15,6 +17,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - `version_check.py` modified - `README.md` modified - Padulles-Amphlett model import bug fixed +- `dev-requirements.txt` modified ## [1.0] - 2019-03-01 ### Added - Interactive notebooks section From f5595af6bcf4108055c79c8303084eb4edfdf390 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Tue, 2 Jul 2019 13:48:49 +0430 Subject: [PATCH 73/85] doc : MATLAB folder README added #119 --- INSTALL.md | 4 ++-- MATLAB/README.md | 15 +++++++++++++++ README.md | 7 ++----- 3 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 MATLAB/README.md diff --git a/INSTALL.md b/INSTALL.md index 502fdae9..8529efc1 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -37,8 +37,8 @@ - Run `OPEM` ### MATLAB -- Download and install [MATLAB](https://www.mathworks.com/products/matlab.html) (>=8.5) -- Download and install [Python3.x](https://www.python.org/downloads/) (>=3.5) +- Download and install [MATLAB](https://www.mathworks.com/products/matlab.html) (>=8.5, 64/32 bit) +- Download and install [Python3.x](https://www.python.org/downloads/) (>=3.5, 64/32 bit) - Run `pip install opem` or `pip3 install opem` (Need root access) - Configure Python interpreter ```MATLAB diff --git a/MATLAB/README.md b/MATLAB/README.md new file mode 100644 index 00000000..387c8ef1 --- /dev/null +++ b/MATLAB/README.md @@ -0,0 +1,15 @@ +# OPEM in MATLAB + +---------- + +---------- + +- OPEM is available in MATLAB by [Python Libraries](https://www.mathworks.com/help/matlab/call-python-libraries.html) + +- Visit [here](https://github.com/ECSIM/opem/blob/master/INSTALL.md#matlab) for installation guide + +- For more information about models visit [Documents](https://github.com/ECSIM/opem/tree/master/Documents) + +- Note : If you want to generate report (`report_mode = true`) : + 1. Run MATLAB as administrator + 2. Change the MATLAB current folder \ No newline at end of file diff --git a/README.md b/README.md index 3c8bfa31..315c8fcc 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ * [Library](https://github.com/ECSIM/opem#library) * [Telegram Bot](https://github.com/ECSIM/opem#telegram-bot) * [Try OPEM in Your Browser!](https://github.com/ECSIM/opem#try-opem-in-your-browser) - * [MATLAB](https://github.com/ECSIM/opem#matlab) + * [MATLAB](https://github.com/ECSIM/opem/tree/master/MATLAB) * [Issues & Bug Reports](https://github.com/ECSIM/opem#issues--bug-reports) * [Contribution](https://github.com/ECSIM/opem/blob/master/.github/CONTRIBUTING.md) * [Todo](https://github.com/ECSIM/opem#todo) @@ -1294,10 +1294,7 @@ OPEM can be used online in interactive Jupyter Notebooks via the Binder service! - Check `.ipynb` files in `Documents` folder - Edit and execute each part of the notes, step by step from the top panel by run button - For executing a complete simulation, you can edit `Test_Vector` in `Full Run` section - -### MATLAB - -Visit [MATLAB Examples](https://github.com/ECSIM/opem/tree/master/MATLAB) + ## Issues & Bug Reports From be86f45f1b873878dd300fc6bb54dc3d00fc35b3 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Tue, 2 Jul 2019 13:57:16 +0430 Subject: [PATCH 74/85] fix : minor edit in vector_filter.m #119 --- MATLAB/README.md | 2 +- MATLAB/vector_filter.m | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/MATLAB/README.md b/MATLAB/README.md index 387c8ef1..bf11f39e 100644 --- a/MATLAB/README.md +++ b/MATLAB/README.md @@ -10,6 +10,6 @@ - For more information about models visit [Documents](https://github.com/ECSIM/opem/tree/master/Documents) -- Note : If you want to generate report (`report_mode = true`) : +- If you want to generate report (`report_mode = true`) : 1. Run MATLAB as administrator 2. Change the MATLAB current folder \ No newline at end of file diff --git a/MATLAB/vector_filter.m b/MATLAB/vector_filter.m index 4b47f1c8..ce881fef 100644 --- a/MATLAB/vector_filter.m +++ b/MATLAB/vector_filter.m @@ -1,6 +1,5 @@ function [ result ] = vector_filter( inp ) -%vector_filter Summary of this function goes here -% Detailed explanation goes here +% Replace py.NoneType items with NaN if isa(inp,'py.NoneType') == 1 result = NaN; else From d1d2e3c063be12ef75d55ce7fef371f125a4a314 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Tue, 2 Jul 2019 14:09:21 +0430 Subject: [PATCH 75/85] fix : minor edit in menu font --- opem/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opem/__main__.py b/opem/__main__.py index bfea028a..650a08ef 100644 --- a/opem/__main__.py +++ b/opem/__main__.py @@ -47,7 +47,7 @@ tprint("v" + str(Version)) print(Description_Menu["Links"]) description_print("Overview", Description_Menu) - tprint("Models",font="varsity") + tprint("Models",font="larry3d") for i, item in enumerate(MENUKEYS): print(str(i + 1) + "-" + item) try: From f83394c2aa652a7a3cf45b678d460b253fff7caf Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Wed, 3 Jul 2019 01:44:19 +0430 Subject: [PATCH 76/85] doc : conda link fixed --- INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index 8529efc1..713f98d2 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -18,7 +18,7 @@ ### Conda -- Check [Conda Managing Package](https://conda.io/docs/user-guide/tasks/manage-pkgs.html#installing-packages-from-anaconda-org) +- Check [Conda Managing Package](https://conda.io) - `conda install -c ecsim opem` (Need root access) ### GUI From 24fee72a1331c14032241c36c99953e5988be331 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Wed, 3 Jul 2019 01:49:55 +0430 Subject: [PATCH 77/85] doc : CHANGELOG updated --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6505964..f4a9ea1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - `README.md` modified - Padulles-Amphlett model import bug fixed - `dev-requirements.txt` modified +- Website switched to HTTPS ## [1.0] - 2019-03-01 ### Added - Interactive notebooks section From 62d99273f5d5af0f54d98ef06c09b7b47b26e3ee Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Wed, 3 Jul 2019 02:01:44 +0430 Subject: [PATCH 78/85] fix : capitalization --- opem/Params.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opem/Params.py b/opem/Params.py index cb692c97..7ae8ac92 100644 --- a/opem/Params.py +++ b/opem/Params.py @@ -53,7 +53,7 @@ "N": "Number of single cells", "R": "R-Electronic [ohm] (*Optional)", "B": "An empirical constant depending on the cell and its operation state (Tafel slope) [V]", - "JMax": "maximum current density [A/(cm^2)]"} + "JMax": "Maximum current density [A/(cm^2)]"} Amphlett_OutputParams = { "Enernst": "V", "Eta Activation": "V", From 11608f24909e8e87f5e2c8ab8c49cd01bbece6ea Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Wed, 3 Jul 2019 02:02:06 +0430 Subject: [PATCH 79/85] fix : capitalization --- MATLAB/Amphlett.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MATLAB/Amphlett.m b/MATLAB/Amphlett.m index 599d3ed2..3d4e79f1 100644 --- a/MATLAB/Amphlett.m +++ b/MATLAB/Amphlett.m @@ -24,7 +24,7 @@ test_vector{'lambda'} = 23; % An adjustable parameter with a min value of 14 and max value of 23 test_vector{'N'} = 1; % Number of single cells test_vector{'R'} = 0; % R-Electronic [ohm] (*Optional) -test_vector{'JMax'} = 1.5; % maximum current density [A/(cm^2)] +test_vector{'JMax'} = 1.5; % Maximum current density [A/(cm^2)] test_vector{'B'} = 0.016; % An empirical constant depending on the cell and its operation state (Tafel slope) [V] test_vector{'Name'} = 'Amphlett_Test'; From c819729d98a10a4fd001b50287f2d3101fb48724 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Thu, 4 Jul 2019 00:27:51 +0430 Subject: [PATCH 80/85] doc : INSTALL.md updated --- INSTALL.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/INSTALL.md b/INSTALL.md index 713f98d2..6df54002 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -2,6 +2,8 @@ ### Source Code - Download and install [Python3.x](https://www.python.org/downloads/) (>=3.5) + - [x] Select `Add to PATH` option + - [x] Select `Install pip` option - Download [Version 1.1](https://github.com/ecsim/opem/archive/v1.1.zip) or [Latest Source ](https://github.com/ecsim/opem/archive/master.zip) - Run `pip install -r requirements.txt` or `pip3 install -r requirements.txt` (Need root access) - Run `python3 setup.py install` or `python setup.py install` (Need root access) @@ -39,6 +41,8 @@ ### MATLAB - Download and install [MATLAB](https://www.mathworks.com/products/matlab.html) (>=8.5, 64/32 bit) - Download and install [Python3.x](https://www.python.org/downloads/) (>=3.5, 64/32 bit) + - [x] Select `Add to PATH` option + - [x] Select `Install pip` option - Run `pip install opem` or `pip3 install opem` (Need root access) - Configure Python interpreter ```MATLAB From 77b8add696b257adf1d3093c76177fff87dc173e Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Thu, 4 Jul 2019 00:37:03 +0430 Subject: [PATCH 81/85] doc : minor edit in INSTALL.md --- INSTALL.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 6df54002..f4ed680d 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,4 +1,4 @@ -## Installation +mat## Installation ### Source Code - Download and install [Python3.x](https://www.python.org/downloads/) (>=3.5) @@ -45,7 +45,7 @@ - [x] Select `Install pip` option - Run `pip install opem` or `pip3 install opem` (Need root access) - Configure Python interpreter -```MATLAB +```matlab >> pyversion PYTHON_EXECUTABLE_FULL_PATH ``` - Visit [MATLAB Examples](https://github.com/ECSIM/opem/tree/master/MATLAB) From c20bb0a905d66a47ee7f9a142388fa565a864354 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Thu, 4 Jul 2019 00:38:37 +0430 Subject: [PATCH 82/85] doc : minor edit in INSTALL.md --- INSTALL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INSTALL.md b/INSTALL.md index f4ed680d..2e9e8e6b 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,4 +1,4 @@ -mat## Installation +## Installation ### Source Code - Download and install [Python3.x](https://www.python.org/downloads/) (>=3.5) From 2ac38c209da9d44ea390f871954e03ca9288ebc9 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Thu, 4 Jul 2019 13:06:03 +0430 Subject: [PATCH 83/85] doc : CHANGELOG updated --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f4a9ea1b..08106361 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] -## [1.1] - 2019-06-28 +## [1.1] - 2019-07-04 ### Added - MATLAB examples ### Changed From 5bbd30c9acd12206b44b1a3dae5092d006ccbd1a Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Fri, 5 Jul 2019 18:29:06 +0430 Subject: [PATCH 84/85] doc : CHANGELOG date updated --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 08106361..94fa8071 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] -## [1.1] - 2019-07-04 +## [1.1] - 2019-07-05 ### Added - MATLAB examples ### Changed From 77f6ed41dd5f864a18d539723a2cc43641084cc9 Mon Sep 17 00:00:00 2001 From: sepandhaghighi Date: Fri, 5 Jul 2019 18:59:52 +0430 Subject: [PATCH 85/85] fix : minor edit in __init__ files --- opem/Dynamic/__init__.py | 2 +- opem/Static/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/opem/Dynamic/__init__.py b/opem/Dynamic/__init__.py index ce687335..9a8219fa 100644 --- a/opem/Dynamic/__init__.py +++ b/opem/Dynamic/__init__.py @@ -1,2 +1,2 @@ # -*- coding: utf-8 -*- -"""OPEM dynamic modules.""" \ No newline at end of file +"""OPEM dynamic modules.""" diff --git a/opem/Static/__init__.py b/opem/Static/__init__.py index 1e56bc6c..1198fbed 100644 --- a/opem/Static/__init__.py +++ b/opem/Static/__init__.py @@ -1,2 +1,2 @@ # -*- coding: utf-8 -*- -"""OPEM static modules.""" \ No newline at end of file +"""OPEM static modules."""