diff --git a/.gitignore b/.gitignore index 7e99e36..e1e44dd 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ -*.pyc \ No newline at end of file +*.pyc +dist/ +build/ +jos3.egg-info/ \ No newline at end of file diff --git a/build/lib/jos3/__init__.py b/build/lib/jos3/__init__.py deleted file mode 100644 index abd4497..0000000 --- a/build/lib/jos3/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# -*- coding: utf-8 -*- -from jos3.jos3 import * -__version__ = '0.0.3' \ No newline at end of file diff --git a/build/lib/jos3/comfmod.py b/build/lib/jos3/comfmod.py deleted file mode 100644 index fb1bcc8..0000000 --- a/build/lib/jos3/comfmod.py +++ /dev/null @@ -1,108 +0,0 @@ -# -*- coding: utf-8 -*- -import math - -def pmv(ta, tr, va, rh, met, clo, wmet=0): - """ - Get PMV value based on the 2017 ASHRAE Handbook—Fundamentals, Chapter 9: - Thermal Comfort, Equations 63 - 68. - - Parameters - ---------- - ta : float, optional - Air temperature [oC] - tr : float, optional - Mean radiant temperature [oC] - va : float, optional - Air velocity [m/s] - rh : float, optional - Relative humidity [%] - met : float, optional - Metabolic rate [met] - clo : float, optional - Clothing insulation [clo] - wmet : float, optional - External work [met], optional. The default is 0. - - Returns - ------- - PMV value - """ - - met *= 58.15 # chage unit [met] to [W/m2] - wmet *= 58.15 # chage unit [met] to [W/m2] - mw = met - wmet # heat production [W/m2] - - if clo < 0.5: fcl = 1 + 0.2*clo # clothing area factor [-] - else: fcl = 1.05 + 0.1*clo - - antoine = lambda x: math.e**(16.6536-(4030.183/(x+235))) # antoine's formula - pa = antoine(ta) * rh/100 # vapor pressure [kPa] - rcl = 0.155 * clo # clothing thermal resistance [K.m2/W] - hcf = 12.1 * va**0.5 # forced convective heat transfer coefficience - - hc = hcf # initial convective heat transfer coefficience - tcl = (34 + ta) / 2 # initial clothing temp. - - # Cal. clothing temp. by iterative calculation method - for i in range(100): - # clothing temp. [oC] - tcliter = 35.7 - 0.028 * mw \ - - rcl * (39.6 * 10**(-9) * fcl * ((tcl+273)**4 - (tr+273)**4) \ - + fcl * hc * (tcl - ta)) # Eq.68 - # new clothin temp. [oC] - tcl = (tcliter + tcl) / 2 - - hcn = 2.38 * abs(tcl - ta)**0.25 # natural convective heat transfer coefficience - - # select forced or natural convection - if hcn > hcf: hc = hcf - else: hc = hcf - - # terminate iterative calculation - if abs(tcliter - tcl) < 0.0001: - break - - # tcl = 35.7 - 0.0275 * mw \ - # - rcl * (mw - 3.05 * (5.73 - 0.007 * mw - pa) \ - # - 0.42 * (mw - 58.15) - 0.0173 * met * (5.87 - pa) \ - # + 0.0014 * met * (34 - ta)) # Eq.64 - - # Heat loss of human body - rad = 3.96 * (10**(-8)) * fcl * ((tcl+273)**4 - (tr+273)**4) # by radiation - conv = fcl * hc * (tcl - ta) # by convction - diff = 3.05 * (5.73 - 0.007 * mw - pa) # by insensive perspiration - sweat = max(0, 0.42 * (mw - 58.15)) # by sweating - res = 0.0173 * met * (5.87 - pa) + 0.0014 * met * (34 - ta) # by repiration - load = mw - rad - conv - diff - sweat - res - - pmv_value = (0.303 * math.exp(-0.036 * met) + 0.028) * load # Eq.63 - - return pmv_value - -def preferred_temp(va=0.1, rh=50, met=1, clo=0): - """ - Calculate operative temperature [oC] at PMV=0. - - Parameters - ---------- - va : float, optional - Air velocity [m/s]. The default is 0.1. - rh : float, optional - Relative humidity [%]. The default is 50. - met : float, optional - Metabolic rate [met]. The default is 1. - clo : float, optional - Clothing insulation [clo]. The default is 0. - - Returns - ------- - to : float - Operative temperature [oC]. - """ - - to = 28 # initial temp - for i in range(100): - vpmv = pmv(to, to, va, rh, met, clo) - if abs(vpmv) < 0.001: break - else: to = to - vpmv/3 - return to \ No newline at end of file diff --git a/build/lib/jos3/construction.py b/build/lib/jos3/construction.py deleted file mode 100644 index 5ce0df2..0000000 --- a/build/lib/jos3/construction.py +++ /dev/null @@ -1,430 +0,0 @@ -# -*- coding: utf-8 -*- -import numpy as np - -# Import from relative path -try: - from .matrix import NUM_NODES, IDICT, BODY_NAMES -# Import from absolute path -# These codes are for debugging -except ImportError: - from jos3.matrix import NUM_NODES, IDICT, BODY_NAMES - - -_BSAst = np.array([ - 0.110, 0.029, 0.175, 0.161, 0.221, - 0.096, 0.063, 0.050, 0.096, 0.063, 0.050, - 0.209, 0.112, 0.056, 0.209, 0.112, 0.056,]) - -dubois = lambda height, weight: 0.2025 * (height ** 0.725) * (weight ** 0.425) -takahira = lambda height, weight: 0.2042 * (height ** 0.725) * (weight ** 0.425) -fujimoto = lambda height, weight: 0.1882 * (height ** 0.663) * (weight ** 0.444) -kurazumi = lambda height, weight: 0.2440 * (height ** 0.693) * (weight ** 0.383) - -def body_surface_area(height=1.72, weight=74.43, equation="dubois",): - """ - Calculate body surface area (BSA) [m2]. - - Parameters - ---------- - height : float, optional - Body height [m]. The default is 1.72. - weight : float, optional - Body weight [kg]. The default is 74.43. - equation : str, optional - The equation name (str) of bsa calculation. Choose a name from "dubois", - "takahira", "fujimoto", or "kurazumi". The default is "dubois". - - Returns - ------- - bsa : float - Body surface area (BSA) [m2]. - """ - - if equation == "dubois": - bsa = dubois(height, weight) - elif equation == "takahira": - bsa = takahira(height, weight) - elif equation == "fujimoto": - bsa = fujimoto(height, weight) - elif equation == "kurazumi": - bsa = kurazumi(height, weight) - - return bsa - - -def bsa_rate(height=1.72, weight=74.43, equation="dubois",): - """ - Calculate the rate of BSA to standard body. - - Parameters - ---------- - height : float, optional - Body height [m]. The default is 1.72. - weight : float, optional - Body weight [kg]. The default is 74.43. - equation : str, optional - The equation name (str) of bsa calculation. Choose a name from "dubois", - "takahira", "fujimoto", or "kurazumi". The default is "dubois". - - Returns - ------- - bsa_rate : float - The ratio of BSA to the standard body [-]. - """ - bsa_all = body_surface_area(height, weight, equation,) - bsa_rate = bsa_all/_BSAst.sum() # The BSA ratio to the standard body (1.87m2) - return bsa_rate - - -def localbsa(height=1.72, weight=74.43, equation="dubois",): - """ - Calculate local body surface area (BSA) [m2]. - - The local body surface area has been derived from 65MN. - The head have been devided to head and neck based on Smith's model. - Head = 0.1396*0.1117/0.1414 (65MN_Head * Smith_Head / Smith_Head+Neck) - Neck = 0.1396*0.0297/0.1414 (65MN_Head * Smith_Neck / Smith_Head+Neck) - - Parameters - ---------- - height : float, optional - Body height [m]. The default is 1.72. - weight : float, optional - Body weight [kg]. The default is 74.43. - equation : str, optional - The equation name (str) of bsa calculation. Choose a name from "dubois", - "takahira", "fujimoto", or "kurazumi". The default is "dubois". - - Returns - ------- - localbsa : ndarray(17,) - Local body surface area (BSA) [m2]. - bsa_rate : float - The ratio of BSA to the standard body [-]. - - """ - _bsa_rate = bsa_rate(height, weight, equation,) # The BSA ratio to the standard body (1.87m2) - bsa = _BSAst * _bsa_rate - return bsa - - -def weight_rate(weight=74.43,): - """ - Calculate the ratio of the body weitht to the standard body (74.43 kg). - - The standard values of local body weights are as below. - weight_local = np.array([ - 3.18, 0.84, 12.4, 11.03, 17.57, - 2.16, 1.37, 0.34, 2.16, 1.37, 0.34, - 7.01, 3.34, 0.48, 7.01, 3.34, 0.48]) - The data have been derived from 65MN. - The weight of neck is extracted from the weight of 65MN's head based on - the local body surface area of Smith's model. - - Parameters - ---------- - weight : float, optional - The body weight [kg]. The default is 74.43. - - Returns - ------- - weight_rate : float - The ratio of the body weight to the standard body (74.43 kg). - weight_rate = weight / 74.43 - """ - rate = weight / 74.43 - return rate - - -def bfb_rate(height=1.72, weight=74.43, equation="dubois", age=20, ci=2.59,): - """ - Calculate the ratio of basal blood flow (BFB) of the standard body (290 L/h). - - Parameters - ---------- - height : float, optional - Body height [m]. The default is 1.72. - weight : float, optional - Body weight [kg]. The default is 74.43. - equation : str, optional - The equation name (str) of bsa calculation. Choose a name from "dubois", - "takahira", "fujimoto", or "kurazumi". The default is "dubois". - age : float, optional - Age [years]. The default is 20. - ci : float, optional - Cardiac index [L/min/㎡]. The default is 2.59. - - Returns - ------- - bfb_rate : float - Basal blood flow rate. - """ - - ci *= 60 # Change unit [L/min/㎡] to [L/h/㎡] - - # Decrease of BFB by aging - if age < 50: - ci *= 1 - elif age < 60: - ci *= 0.85 - elif age < 70: - ci *= 0.75 - else: # age >= 70 - ci *= 0.7 - - bfb_all = ci * bsa_rate(height, weight, equation) * _BSAst.sum() # [L/h] - _bfb_rate = bfb_all / 290 - return _bfb_rate - - -def conductance(height=1.72, weight=74.43, equation="dubois", fat=15,): - """ - Calculate thermal conductance between layers [W/K]. - - Parameters - ---------- - height : float, optional - Body height [m]. The default is 1.72. - weight : float, optional - Body weight [kg]. The default is 74.43. - equation : str, optional - The equation name (str) of bsa calculation. Choose a name from "dubois", - "takahira", "fujimoto", or "kurazumi". The default is "dubois". - fat : float, optional - Body fat rate [%]. The default is 15. - - Returns - ------- - conductance : numpy.ndarray - Thermal conductance between layers [W/K]. - The shape is (NUM_NODES, NUM_NODES). - """ - - if fat < 12.5: - cdt_cr_sk = np.array([ - 1.341, 0.930, 1.879, 1.729, 2.370, - 1.557, 1.018, 2.210, 1.557, 1.018, 2.210, - 2.565, 1.378, 3.404, 2.565, 1.378, 3.404 - ]) - elif fat < 17.5: - cdt_cr_sk = np.array([ - 1.311, 0.909, 1.785, 1.643, 2.251, - 1.501, 0.982, 2.183, 1.501, 0.982, 2.183, - 2.468, 1.326, 3.370, 2.468, 1.326, 3.370 - ]) - elif fat < 22.5: - cdt_cr_sk = np.array([ - 1.282, 0.889, 1.698, 1.563, 2.142, - 1.448, 0.947, 2.156, 1.448, 0.947, 2.156, - 2.375, 1.276, 3.337, 2.375, 1.276, 3.337 - ]) - elif fat < 27.5: - cdt_cr_sk = np.array([ - 1.255, 0.870, 1.618, 1.488, 2.040, - 1.396, 0.913, 2.130, 1.396, 0.913, 2.130, - 2.285, 1.227, 3.304, 2.285, 1.227, 3.304 - ]) - else: #fat >= 27.5 - cdt_cr_sk = np.array([ - 1.227, 0.852, 1.542, 1.419, 1.945, - 1.346, 0.880, 1.945, 1.346, 0.880, 1.945, - 2.198, 1.181, 3.271, 2.198, 1.181, 3.271 - ]) - - cdt_cr_ms = np.zeros(17) # core to muscle [W/K] - cdt_ms_fat = np.zeros(17) # muscle to fat [W/K] - cdt_fat_sk = np.zeros(17) # fat to skin [W/K] - - # Head and Pelvis consists of 65MN's conductances - cdt_cr_ms[0] = 1.601 # Head - cdt_ms_fat[0] = 13.222 - cdt_fat_sk[0] = 16.008 - cdt_cr_ms[4] = 3.0813 # Pelvis - cdt_ms_fat[4] = 0.3738 - cdt_fat_sk[4] = 41.4954 - - # vessel to core - # The shape is a cylinder. - # It is assumed that the inner is vascular radius, 2.5mm and the outer is - # stolwijk's core radius. - # The heat transer coefficient of the core is assumed as the Michel's - # counter-flow model 0.66816 [W/(m・K)]. - cdt_ves_cr = np.array([ - 0, 0, 0, 0, 0, - 0.586, 0.383, 1.534, 0.586, 0.383, 1.534, - 0.810, 0.435, 1.816, 0.810, 0.435, 1.816,]) - #superficial vein to skin - cdt_sfv_sk = np.array([ - 0, 0, 0, 0, 0, - 57.735, 37.768, 16.634, 57.735, 37.768, 16.634, - 102.012, 54.784, 24.277, 102.012, 54.784, 24.277,]) - - # art to vein (counter-flow) [W/K] - # The data has been derived Mitchell's model. - # THe values = 15.869 [W/(m・K)] * the segment lenght [m] - cdt_art_vein = np.array([ - 0, 0, 0, 0, 0, - 0.537, 0.351, 0.762, 0.537, 0.351, 0.762, - 0.826, 0.444, 0.992, 0.826, 0.444, 0.992 - ]) - - # Changes values by body size based on the standard body. - wr = weight_rate(weight) - bsar = bsa_rate(height, weight, equation) - # Head, Neck (Sphere shape) - cdt_cr_sk[:2] *= wr/bsar - cdt_cr_ms[:2] *= wr/bsar - cdt_ms_fat[:2] *= wr/bsar - cdt_fat_sk[:2] *= wr/bsar - cdt_ves_cr[:2] *= wr/bsar - cdt_sfv_sk[:2] *= wr/bsar - cdt_art_vein[:2] *= wr/bsar - # Others (Cylinder shape) - cdt_cr_sk[2:] *= bsar**2/wr - cdt_cr_ms[2:] *= bsar**2/wr - cdt_ms_fat[2:] *= bsar**2/wr - cdt_fat_sk[2:] *= bsar**2/wr - cdt_ves_cr[2:] *= bsar**2/wr - cdt_sfv_sk[2:] *= bsar**2/wr - cdt_art_vein[2:] *= bsar**2/wr - - cdt_whole = np.zeros((NUM_NODES, NUM_NODES)) - for i, bn in enumerate(BODY_NAMES): - # Dictionary of indecies in each body segment - # key = layer name, value = index of matrix - indexof = IDICT[bn] - - # Common - cdt_whole[indexof["artery"], indexof["vein"]] = cdt_art_vein[i] # art to vein - cdt_whole[indexof["artery"], indexof["core"]] = cdt_ves_cr[i] # art to cr - cdt_whole[indexof["vein"], indexof["core"]] = cdt_ves_cr[i] # vein to cr - - # Only limbs - if i >= 5: - cdt_whole[indexof["sfvein"], indexof["skin"]] = cdt_sfv_sk[i] # sfv to sk - - # If the segment has a muscle or fat layer - if not indexof["muscle"] is None: # or not indexof["fat"] is None - cdt_whole[indexof["core"], indexof["muscle"]] = cdt_cr_ms[i] # cr to ms - cdt_whole[indexof["muscle"], indexof["fat"]] = cdt_ms_fat[i] # ms to fat - cdt_whole[indexof["fat"], indexof["skin"]] = cdt_fat_sk[i] # fat to sk - - else: - cdt_whole[indexof["core"], indexof["skin"]] = cdt_cr_sk[i] # cr to sk - - # Creates a symmetrical matrix - cdt_whole = cdt_whole + cdt_whole.T - - return cdt_whole.copy() - - -def capacity(height=1.72, weight=74.43, equation="dubois", age=20, ci=2.59): - """ - Calculate the thermal capacity [J/K]. - - The values of vascular and central blood capacity have been derived from - Yokoyama's model. - The specific heat of blood is assumed as 1.0 [kcal/L.K]. - - Parameters - ---------- - height : float, optional - Body height [m]. The default is 1.72. - weight : float, optional - Body weight [kg]. The default is 74.43. - equation : str, optional - The equation name (str) of bsa calculation. Choose a name from "dubois", - "takahira", "fujimoto", or "kurazumi". The default is "dubois". - age : float, optional - Age [years]. The default is 20. - ci : float, optional - Cardiac index [L/min/㎡]. The default is 2.59. - - Returns - ------- - capacity : numpy.ndarray. - Thermal capacity [W/K]. - The shape is (NUM_NODES). - """ - # artery [Wh/K] - cap_art = np.array([ - 0.096, 0.025, 0.12, 0.111, 0.265, - 0.0186, 0.0091, 0.0044, 0.0186, 0.0091, 0.0044, - 0.0813, 0.04, 0.0103, 0.0813, 0.04, 0.0103,]) - - # vein [Wh/K] - cap_vein = np.array([ - 0.321, 0.085, 0.424, 0.39, 0.832, - 0.046, 0.024, 0.01, 0.046, 0.024, 0.01, - 0.207, 0.1, 0.024, 0.207, 0.1, 0.024,]) - - # superficial vein [Wh/K] - cap_sfv = np.array([ - 0, 0, 0, 0, 0, - 0.025, 0.015, 0.011, 0.025, 0.015, 0.011, - 0.074, 0.05, 0.021, 0.074, 0.05, 0.021,]) - - # central blood [Wh/K] - cap_cb = 1.999 - - # core [Wh/K] - cap_cr = np.array([ - 1.7229, 0.564, 10.2975, 9.3935, 13.834, - 1.6994, 1.1209, 0.1536, 1.6994, 1.1209, 0.1536, - 5.3117, 2.867, 0.2097, 5.3117, 2.867, 0.2097,]) - - # muscle [Wh/K] - cap_ms = np.array([ - 0.305, 0.0, 0.0, 0.0, 7.409, - 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, - 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,]) - - # fat [Wh/K] - cap_fat = np.array([ - 0.203, 0.0, 0.0, 0.0, 1.947, - 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, - 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,]) - - # skin [Wh/K] - cap_sk = np.array([ - 0.1885, 0.058, 0.441, 0.406, 0.556, - 0.126, 0.084, 0.088, 0.126, 0.084, 0.088, - 0.334, 0.169, 0.107, 0.334, 0.169, 0.107,]) - - # Changes the values based on the standard body - bfbr = bfb_rate(height, weight, equation, age, ci) - wr = weight_rate(weight) - cap_art *= bfbr - cap_vein *= bfbr - cap_sfv *= bfbr - cap_cb *= bfbr - cap_cr *= wr - cap_ms *= wr - cap_fat *= wr - cap_sk *= wr - - cap_whole = np.zeros(NUM_NODES) - cap_whole[0] = cap_cb - - for i, bn in enumerate(BODY_NAMES): - # Dictionary of indecies in each body segment - # key = layer name, value = index of matrix - indexof = IDICT[bn] - - # Common - cap_whole[indexof["artery"]] = cap_art[i] - cap_whole[indexof["vein"]] = cap_vein[i] - cap_whole[indexof["core"]] = cap_cr[i] - cap_whole[indexof["skin"]] = cap_sk[i] - - # Only limbs - if i >= 5: - cap_whole[indexof["sfvein"]] = cap_sfv[i] - - # If the segment has a muscle or fat layer - if not indexof["muscle"] is None: # or not indexof["fat"] is None - cap_whole[indexof["muscle"]] = cap_ms[i] - cap_whole[indexof["fat"]] = cap_fat[i] - - cap_whole *= 3600 # Changes unit [Wh/K] to [J/K] - return cap_whole \ No newline at end of file diff --git a/build/lib/jos3/jos3.py b/build/lib/jos3/jos3.py deleted file mode 100644 index 347a156..0000000 --- a/build/lib/jos3/jos3.py +++ /dev/null @@ -1,821 +0,0 @@ -# -*- coding: utf-8 -*- -import csv -import datetime as dt -import os - -import numpy as np -# Import from relative path -try: - from . import thermoregulation as threg - from . import matrix - from .matrix import NUM_NODES, INDEX, VINDEX, BODY_NAMES - from .comfmod import preferred_temp - from . import construction as cons - from .construction import _BSAst -# Import from absolute path -# These codes are for debugging -except ImportError: - from jos3 import thermoregulation as threg - from jos3 import matrix - from jos3.matrix import NUM_NODES, INDEX, VINDEX, BODY_NAMES - from jos3.comfmod import preferred_temp - from jos3 import construction as cons - from jos3.construction import _BSAst - - -class JOS3(): - def __init__( - self, - height=1.72, - weight=74.43, - fat=15, - age=20, - sex="male", - ci=2.59, - bmr_equation="harris-benedict", - bsa_equation="dubois", - ex_output=None, - ): - """ - Parameters - ---------- - height : float, optional - Body height [m]. The default is 1.72. - weight : float, optional - Body weight [kg]. The default is 74.43. - fat : float, optional - Fat rte [%]. The default is 15. - age : int, optional - Age [years]. The default is 20. - sex : str, optional - Sex ("male" or "female"). The default is "male". - ci : float, optional - Cardiac index [L/min/m2]. The default is 2.6432. - bmr_equation : str, optional - Choose a BMR equation. The default is "harris-benedict". - bsa_equation : str, optional - Choose a BSA equation. The default is "dubois". - ex_output : None, list or "all", optional - Extra output parameters. If "all", all parameters are output. - The default is None. - - Returns - ------- - None. - """ - - - self._height = height - self._weight = weight - self._fat = fat - self._sex = sex - self._age = age - self._ci = ci - self._bmr_equation = bmr_equation - self._bsa_equation = bsa_equation - self._ex_output = ex_output - - # Body surface area [m2] - self._bsa_rate = cons.bsa_rate(height, weight, bsa_equation,) - # Body surface area rate [-] - self._bsa = cons.localbsa(height, weight, bsa_equation,) - # Basal blood flow rate [-] - self._bfb_rate = cons.bfb_rate(height, weight, bsa_equation, age, ci) - # Thermal conductance [W/K] - self._cdt = cons.conductance(height, weight, bsa_equation, fat,) - # Thermal capacity [J/K] - self._cap = cons.capacity(height, weight, bsa_equation, age, ci) - - # Set point temp [oC] - self.setpt_cr = np.ones(17)*37 # core - self.setpt_sk = np.ones(17)*34 # skin - - # Initial body temp [oC] - self._bodytemp = np.ones(NUM_NODES) * 36 - - # Default values of input condition - self._ta = np.ones(17)*28.8 - self._tr = np.ones(17)*28.8 - self._rh = np.ones(17)*50 - self._va = np.ones(17)*0.1 - self._clo = np.zeros(17) - self._iclo = np.ones(17) * 0.45 - self._par = 1.25 # Physical activity ratio - self._posture = "standing" - self._hc = None - self._hr = None - self.ex_q = np.zeros(NUM_NODES) - self._t = dt.timedelta(0) # Elapsed time - self._cycle = 0 # Cycle time - self.model_name = "JOS3" - self.options = { - "nonshivering_thermogenesis": True, - "cold_acclimated": False, - "shivering_threshold": False, - "limit_dshiv/dt": False, - "bat_positive": False, - "ava_zero": False, - "shivering": False,} - threg.PRE_SHIV = 0 # reset - self._history = [] - self._t = dt.timedelta(0) # Elapsed time - self._cycle = 0 # Cycle time - - # Reset setpoint temperature - dictout = self.reset_setpt() - self._history.append(dictout) # Save the last model parameters - - - def reset_setpt(self): - """ - Reset setpoint temperature by steady state calculation. - Be careful, input parameters (Ta, Tr, RH, Va, Icl, PAR) and body - tempertures are also resetted. - - Returns - ------- - Parameters of JOS-3 : dict - """ - # Set operative temperature under PMV=0 environment - # Metabolic rate at PAR = 1.25 - # 1 met = 58.15 W/m2 - met = self.BMR * 1.25 / 58.15 / self.BSA.sum() # [met] - self.To = preferred_temp(met=met) - self.RH = 50 - self.Va = 0.1 - self.Icl = 0 - self.PAR = 1.25 - - # Steady-calculation - self.options["ava_zero"] = True - for t in range(10): - dictout = self._run(dtime=60000, passive=True) - - # Set new setpoint temperatures - self.setpt_cr = self.Tcr - self.setpt_sk = self.Tsk - self.options["ava_zero"] = False - - return dictout - - - def simulate(self, times, dtime=60, output=True): - """ - Execute JOS3 model. - - Parameters - ---------- - times : int - Number of loops of a simulation - dtime : int or float, optional - Time delta [sec]. The default is 60. - output : bool, optional - If you don't record paramters, set False. The default is True. - - Returns - ------- - None. - - """ - for t in range(times): - self._t += dt.timedelta(0, dtime) - self._cycle += 1 - dictdata = self._run(dtime=dtime, output=output) - if output: - # self.history.append(dictdata) - self._history.append(dictdata) - - - def _run(self, dtime=60, passive=False, output=True): - """ - Run a model for a once and get model parameters. - - Parameters - ---------- - dtime : int or float, optional - Time delta [sec]. The default is 60. - passive : bool, optional - If you run a passive model, set True. The default is False. - output : bool, optional - If you don't need paramters, set False. The default is True. - - Returns - ------- - dictout : dictionary - Output parameters. - - """ - tcr = self.Tcr - tsk = self.Tsk - - # Convective and radiative heat transfer coefficient [W/K.m2] - hc = threg.fixed_hc(threg.conv_coef(self._posture, self._va, self._ta, tsk,), self._va) - hr = threg.fixed_hr(threg.rad_coef(self._posture,)) - # Manual setting - if self._hc is not None: - hc = self._hc - if self._hr is not None: - hr = self._hr - - # Operarive temp. [oC], heat and evaporative heat resistance [K/W], [kPa/W] - to = threg.operative_temp(self._ta, self._tr, hc, hr,) - r_t = threg.dry_r(hc, hr, self._clo) - r_et = threg.wet_r(hc, self._clo, self._iclo) - - #------------------------------------------------------------------ - # Thermoregulation - #------------------------------------------------------------------ - # Setpoint temperature of thermoregulation - if passive: - setpt_cr = tcr.copy() - setpt_sk = tsk.copy() - else: - setpt_cr = self.setpt_cr.copy() - setpt_sk = self.setpt_sk.copy() - # Difference between setpoint and body temperatures - err_cr = tcr - setpt_cr - err_sk = tsk - setpt_sk - - # Skinwettedness [-], Esk, Emax, Esw [W] - wet, e_sk, e_max, e_sweat = threg.evaporation( - err_cr, err_sk, tsk, - self._ta, self._rh, r_et, - self._height, self._weight, self._bsa_equation, self._age) - - # Skin blood flow, basal skin blood flow [L/h] - bf_sk = threg.skin_bloodflow(err_cr, err_sk, - self._height, self._weight, self._bsa_equation, self._age, self._ci) - - # Hand, Foot AVA blood flow [L/h] - bf_ava_hand, bf_ava_foot = threg.ava_bloodflow(err_cr, err_sk, - self._height, self._weight, self._bsa_equation, self._age, self._ci) - if self.options["ava_zero"] and passive: - bf_ava_hand = 0 - bf_ava_foot = 0 - - # Thermogenesis by shivering [W] - mshiv = threg.shivering( - err_cr, err_sk, tcr, tsk, - self._height, self._weight, self._bsa_equation, self._age, self._sex, dtime, - self.options,) - - # Thermogenesis by non-shivering [W] - if self.options["nonshivering_thermogenesis"]: - mnst = threg.nonshivering(err_cr, err_sk, - self._height, self._weight, self._bsa_equation, self._age, - self.options["cold_acclimated"], self.options["bat_positive"]) - else: # not consider NST - mnst = np.zeros(17) - - #------------------------------------------------------------------ - # Thermogenesis - #------------------------------------------------------------------ - # Basal thermogenesis [W] - mbase = threg.local_mbase( - self._height, self._weight, self._age, self._sex, - self._bmr_equation,) - mbase_all = sum([m.sum() for m in mbase]) - - # Thermogenesis by work [W] - mwork = threg.local_mwork(mbase_all, self._par) - - # Sum of thermogenesis in core, muscle, fat, skin [W] - qcr, qms, qfat, qsk = threg.sum_m(mbase, mwork, mshiv, mnst,) - qall = qcr.sum() + qms.sum() + qfat.sum() + qsk.sum() - - #------------------------------------------------------------------ - # Other - #------------------------------------------------------------------ - # Blood flow in core, muscle, fat [L/h] - bf_cr, bf_ms, bf_fat = threg.crmsfat_bloodflow(mwork, mshiv, - self._height, self._weight, self._bsa_equation, self._age, self._ci) - - # Heat loss by respiratory - p_a = threg.antoine(self._ta)*self._rh/100 - res_sh, res_lh = threg.resp_heatloss(self._ta[0], p_a[0], qall) - - # Sensible heat loss [W] - shlsk = (tsk - to) / r_t * self._bsa - - # Cardiac output [L/h] - co = threg.sum_bf( - bf_cr, bf_ms, bf_fat, bf_sk, bf_ava_hand, bf_ava_foot) - - # Weight loss rate by evaporation [g/sec] - wlesk = (e_sweat + 0.06*e_max) / 2418 - wleres = res_lh / 2418 - - #------------------------------------------------------------------ - # Matrix - #------------------------------------------------------------------ - # Matrix A - # (83, 83,) ndarray - bf_art, bf_vein = matrix.vessel_bloodflow( - bf_cr, bf_ms, bf_fat, bf_sk, bf_ava_hand, bf_ava_foot - ) - bf_local = matrix.localarr( - bf_cr, bf_ms, bf_fat, bf_sk, bf_ava_hand, bf_ava_foot - ) - bf_whole = matrix.wholebody( - bf_art, bf_vein, bf_ava_hand, bf_ava_foot - ) - arr_bf = np.zeros((NUM_NODES,NUM_NODES)) - arr_bf += bf_local - arr_bf += bf_whole - - arr_bf /= self._cap.reshape((NUM_NODES,1)) # Change unit [W/K] to [/sec] - arr_bf *= dtime # Change unit [/sec] to [-] - - arr_cdt = self._cdt.copy() - arr_cdt /= self._cap.reshape((NUM_NODES,1)) # Change unit [W/K] to [/sec] - arr_cdt *= dtime # Change unit [/sec] to [-] - - arrB = np.zeros(NUM_NODES) - arrB[INDEX["skin"]] += 1/r_t*self._bsa - arrB /= self._cap # Change unit [W/K] to [/sec] - arrB *= dtime # Change unit [/sec] to [-] - - arrA_tria = -(arr_cdt + arr_bf) - - arrA_dia = arr_cdt + arr_bf - arrA_dia = arrA_dia.sum(axis=1) + arrB - arrA_dia = np.diag(arrA_dia) - arrA_dia += np.eye(NUM_NODES) - - arrA = arrA_tria + arrA_dia - arrA_inv = np.linalg.inv(arrA) - - # Matrix Q [W] / [J/K] * [sec] = [-] - # Thermogensis - arrQ = np.zeros(NUM_NODES) - arrQ[INDEX["core"]] += qcr - arrQ[INDEX["muscle"]] += qms[VINDEX["muscle"]] - arrQ[INDEX["fat"]] += qfat[VINDEX["fat"]] - arrQ[INDEX["skin"]] += qsk - - # Respiratory [W] - arrQ[INDEX["core"][2]] -= res_sh + res_lh #Chest core - - # Sweating [W] - arrQ[INDEX["skin"]] -= e_sk - - # Extra heat gain [W] - arrQ += self.ex_q.copy() - - arrQ /= self._cap # Change unit [W]/[J/K] to [K/sec] - arrQ *= dtime # Change unit [K/sec] to [K] - - # Boundary batrix [℃] - arr_to = np.zeros(NUM_NODES) - arr_to[INDEX["skin"]] += to - - # all - arr = self._bodytemp + arrB * arr_to + arrQ - - #------------------------------------------------------------------ - # New body temp. [oC] - #------------------------------------------------------------------ - self._bodytemp = np.dot(arrA_inv, arr) - - #------------------------------------------------------------------ - # Output paramters - #------------------------------------------------------------------ - dictout = {} - if output: # Default output - dictout["CycleTime"] = self._cycle - dictout["ModTime"] = self._t - dictout["dt"] = dtime - dictout["TskMean"] = self.TskMean - dictout["Tsk"] = self.Tsk - dictout["Tcr"] = self.Tcr - dictout["WetMean"] = np.average(wet, weights=_BSAst) - dictout["Wet"] = wet - dictout["Wle"] = (wlesk.sum() + wleres) - dictout["CO"] = co - dictout["Met"] = qall - dictout["Met"] = qall - dictout["RES"] = res_sh + res_lh - dictout["THLsk"] = shlsk + e_sk - - - detailout = {} - if self._ex_output: - detailout["Name"] = self.model_name - detailout["Height"] = self._height - detailout["Weight"] = self._weight - detailout["BSA"] = self._bsa - detailout["Fat"] = self._fat - detailout["Sex"] = self._sex - detailout["Age"] = self._age - detailout["Setptcr"] = setpt_cr - detailout["Setptcr"] = setpt_sk - detailout["Tcb"] = self.Tcb - detailout["Tar"] = self.Tar - detailout["Tve"] = self.Tve - detailout["Tsve"] = self.Tsve - detailout["Tms"] = self.Tms - detailout["Tfat"] = self.Tfat - detailout["To"] = to - detailout["Rt"] = r_t - detailout["Ret"] = r_et - detailout["Ta"] = self._ta.copy() - detailout["Tr"] = self._tr.copy() - detailout["RH"] = self._rh.copy() - detailout["Va"] = self._va.copy() - detailout["PAR"] = self._par - detailout["Icl"] = self._clo.copy() - detailout["Esk"] = e_sk - detailout["Emax"] = e_max - detailout["Esweat"] = e_sweat - detailout["BFcr"] = bf_cr - detailout["BFms"] = bf_ms[VINDEX["muscle"]] - detailout["BFfat"] = bf_fat[VINDEX["fat"]] - detailout["BFsk"] = bf_sk - detailout["BFava_hand"] = bf_ava_hand - detailout["BFava_foot"] = bf_ava_foot - detailout["Mbasecr"] = mbase[0] - detailout["Mbasems"] = mbase[1][VINDEX["muscle"]] - detailout["Mbasefat"] = mbase[2][VINDEX["fat"]] - detailout["Mbasesk"] = mbase[3] - detailout["Mwork"] = mwork - detailout["Mshiv"] = mshiv - detailout["Mnst"] = mnst - detailout["Qcr"] = qcr - detailout["Qms"] = qms[VINDEX["muscle"]] - detailout["Qfat"] = qfat[VINDEX["fat"]] - detailout["Qsk"] = qsk - dictout["SHLsk"] = shlsk - dictout["LHLsk"] = e_sk - dictout["RESsh"] = res_sh - dictout["RESlh"] = res_lh - - - if self._ex_output == "all": - dictout.update(detailout) - elif isinstance(self._ex_output, list): # if ex_out type is list - outkeys = detailout.keys() - for key in self._ex_output: - if key in outkeys: - dictout[key] = detailout[key] - return dictout - - - def dict_results(self): - """ - Get results as pandas.DataFrame format. - - Returns - ------- - pandas.DataFrame - """ - if not self._history: - print("The model has no data.") - return None - - def check_word_contain(word, *args): - """ - Check if word contains *args. - """ - boolfilter = False - for arg in args: - if arg in word: - boolfilter = True - return boolfilter - - # Set column titles - # If the values are iter, add the body names as suffix words. - # If the values are not iter and the single value data, convert it to iter. - key2keys = {} # Column keys - for key, value in self._history[0].items(): - try: - length = len(value) - if isinstance(value, str): - keys = [key] # str is iter. Convert to list without suffix - elif check_word_contain(key, "sve", "sfv", "superficialvein"): - keys = [key+BODY_NAMES[i] for i in VINDEX["sfvein"]] - elif check_word_contain(key, "ms", "muscle"): - keys = [key+BODY_NAMES[i] for i in VINDEX["muscle"]] - elif check_word_contain(key, "fat"): - keys = [key+BODY_NAMES[i] for i in VINDEX["fat"]] - elif length == 17: # if data contains 17 values - keys = [key+bn for bn in BODY_NAMES] - else: - keys = [key+BODY_NAMES[i] for i in range(length)] - except TypeError: # if the value is not iter. - keys= [key] # convert to iter - key2keys.update({key: keys}) - - data = [] - for i, dictout in enumerate(self._history): - row = {} - for key, value in dictout.items(): - keys = key2keys[key] - if len(keys) == 1: - values = [value] # make list if value is not iter - else: - values = value - row.update(dict(zip(keys, values))) - data.append(row) - - outdict = dict(zip(data[0].keys(), [[] for i in range(len(data[0].keys()))])) - for row in data: - for k in data[0].keys(): - outdict[k].append(row[k]) - return outdict - - - def to_csv(self, path=None, folder=None, unit=True): - """ - Export results with "units" as csv format. - If you want to know units of parametes, use this method. - - Parameters - ---------- - path : str, optional - Output path. If you don't use the default file name, set a name. - The default is None. - folder : str, optional - Output folder. If you use the default file name, set a only folder path. - The default is None. - unit : bool, optional - Writes unit in csv file. The default is True. - """ - if path is None: - nowtime = dt.datetime.now().strftime("%Y%m%d-%H%M%S") - path = "{}_{}.csv".format(self.model_name, nowtime) - if folder: - os.makedirs(folder, exist_ok=True) - path = folder + os.sep + path - elif not ((path[-4:] == ".csv") or (path[-4:] == ".txt")): - path += ".csv" - dictout = self.dict_results() - - columns = [k for k in dictout.keys()] - units = [] - for col in columns: - if "RES" in col[:3]: - units.append("[W]") - elif "Setpt" in col[:5]: - units.append("[oC]") - elif "RH" in col[:2]: - units.append("[%]") - elif "Va" in col[:2]: - units.append("[m/s]") - elif "Met" in col[:3]: - units.append("[W]") - elif "HL" in col[1:3]: - units.append("[W]") - elif "CO" in col[:2]: - units.append("[L/h]") - elif "T" in col[:1]: - units.append("[oC]") - elif "BF" in col[:2]: - units.append("[L/h]") - elif "M" in col[:1]: - units.append("[W]") - elif "Q" in col[:1]: - units.append("[W]") - elif "R" in col[:1]: - units.append("[K.m2/W]") - elif "E" in col[:1]: - units.append("[W]") - elif "dt" == col: - units.append("[sec]") - else: - units.append("") - - with open(path, "wt", newline="") as f: - writer = csv.writer(f) - writer.writerow(list(columns)) - writer.writerow(units) - for i in range(len(dictout["CycleTime"])): - row = [] - for k in columns: - row.append(dictout[k][i]) - writer.writerow(row) - - - #-------------------------------------------------------------------------- - # Setter - #-------------------------------------------------------------------------- - def set_ex_q(self, tissue, value): - """ - Set extra heat gain by tissue name. - - Parameters - ---------- - tissue : str - Tissue name. "core", "skin", or "artery".... If you set value to - Head muscle and other segment's core, set "all_muscle". - value : int, float, array - Heat gain [W] - - Returns - ------- - array - Current extra heat gain of model. - """ - self.ex_q[INDEX[tissue]] = value - return self.ex_q - - - #-------------------------------------------------------------------------- - # Setter & getter - #-------------------------------------------------------------------------- - - @property - def Ta(self): - return self._ta - @Ta.setter - def Ta(self, inp): - self._ta = _to17array(inp) - - @property - def Tr(self): - return self._tr - @Tr.setter - def Tr(self, inp): - self._tr = _to17array(inp) - - @property - def To(self): - hc = threg.fixed_hc(threg.conv_coef(self._posture, self._va, self._ta, self.Tsk,), self._va) - hr = threg.fixed_hr(threg.rad_coef(self._posture,)) - to = threg.operative_temp(self._ta, self._tr, hc, hr,) - return to - @To.setter - def To(self, inp): - self._ta = _to17array(inp) - self._tr = _to17array(inp) - - @property - def RH(self): - return self._rh - @RH.setter - def RH(self, inp): - self._rh = _to17array(inp) - - @property - def Va(self): - return self._va - @Va.setter - def Va(self, inp): - self._va = _to17array(inp) - - @property - def posture(self): - return self._posture - @posture.setter - def posture(self, inp): - if inp == 0: - self._posture = "standing" - elif inp == 1: - self._posture = "sitting" - elif inp == 2: - self._posture = "lying" - elif type(inp) == str: - if inp.lower() == "standing": - self._posture = "standing" - elif inp.lower() in ["sitting", "sedentary"]: - self._posture = "sitting" - elif inp.lower() in ["lying", "supine"]: - self._posture = "lying" - else: - self._posture = "standing" - print('posture must be 0="standing", 1="sitting" or 2="lying".') - print('posture was set "standing".') - - @property - def Icl(self): - return self._clo - @Icl.setter - def Icl(self, inp): - self._clo = _to17array(inp) - - @property - def PAR(self): - return self._par - @PAR.setter - def PAR(self, inp): - self._par = inp - - @property - def bodytemp(self): - return self._bodytemp - @bodytemp.setter - def bodytemp(self, inp): - self._bodytemp = inp.copy() - - #-------------------------------------------------------------------------- - # Getter - #-------------------------------------------------------------------------- - - @property - def BSA(self): - return self._bsa.copy() - - @property - def Rt(self): - hc = threg.fixed_hc(threg.conv_coef(self._posture, self._va, self._ta, self.Tsk,), self._va) - hr = threg.fixed_hr(threg.rad_coef(self._posture,)) - return threg.dry_r(hc, hr, self._clo) - - @property - def Ret(self): - hc = threg.fixed_hc(threg.conv_coef(self._posture, self._va, self._ta, self.Tsk,), self._va) - return threg.wet_r(hc, self._clo, self._iclo) - - @property - def Wet(self): - err_cr = self.Tcr - self.setpt_cr - err_sk = self.Tsk - self.setpt_sk - wet, *_ = threg.evaporation(err_cr, err_sk, - self._ta, self._rh, self.Ret, self._bsa_rate, self._age) - return wet - - @property - def WetMean(self): - wet = self.Wet - return np.average(wet, weights=_BSAst) - - - - @property - def TskMean(self): - return np.average(self._bodytemp[INDEX["skin"]], weights=_BSAst) - - @property - def Tsk(self): - return self._bodytemp[INDEX["skin"]].copy() - - @property - def Tcr(self): - return self._bodytemp[INDEX["core"]].copy() - - @property - def Tcb(self): - return self._bodytemp[0].copy() - - @property - def Tar(self): - return self._bodytemp[INDEX["artery"]].copy() - - @property - def Tve(self): - return self._bodytemp[INDEX["vein"]].copy() - - @property - def Tsve(self): - return self._bodytemp[INDEX["sfvein"]].copy() - - @property - def Tms(self): - return self._bodytemp[INDEX["muscle"]].copy() - - @property - def Tfat(self): - return self._bodytemp[INDEX["fat"]].copy() - - @property - def bodyname(self): - body = [ - "Head", "Neck", "Chest", "Back", "Pelvis", - "LShoulder", "LArm", "LHand", - "RShoulder", "RArm", "RHand", - "LThigh", "LLeg", "LHand", - "RThigh", "RLeg", "RHand",] - return body - - @property - def results(self): - return self.dict_results() - - @property - def BMR(self): - bmr = threg.basal_met( - self._height, self._weight, self._age, - self._sex, self._bmr_equation,) - return bmr - -def _to17array(inp): - """ - Make ndarray (17,). - - Parameters - ---------- - inp : int, float, ndarray, list - Number you make as 17array. - - Returns - ------- - ndarray - """ - try: - if len(inp) == 17: - array = np.array(inp) - else: - first_item = inp[0] - array = np.ones(17)*first_item - except: - array = np.ones(17)*inp - return array.copy() \ No newline at end of file diff --git a/build/lib/jos3/matrix.py b/build/lib/jos3/matrix.py deleted file mode 100644 index 3de062e..0000000 --- a/build/lib/jos3/matrix.py +++ /dev/null @@ -1,323 +0,0 @@ -# -*- coding: utf-8 -*- -import numpy as np - -def sub2whole(subarr_list): - ishape = 0 - jshape = 0 - for subarr in subarr_list: - ishape += subarr.shape[0] - jshape += subarr.shape[1] - - wholearr = np.zeros((ishape, jshape)) - i = 0 - j = 0 - for subarr in subarr_list: - iend = i + subarr.shape[0] - jend = j + subarr.shape[1] - wholearr[i:iend, j:jend] = subarr.copy() - i += subarr.shape[0] - j += subarr.shape[1] - - return wholearr - - -BODY_NAMES = [ - "Head", "Neck", "Chest", "Back", "Pelvis", - "LShoulder", "LArm", "LHand", - "RShoulder", "RArm", "RHand", - "LThigh", "LLeg", "LFoot", - "RThigh", "RLeg", "RFoot"] -LAYER_NAMES = ["artery", "vein", "sfvein", "core", "muscle", "fat", "skin"] - -def index_order(): - """ - Defines the index's order of the matrix - Returns - ------- - indexdict : nested dictionary - keys are BODY_NAMES and LAYER_NAMES - """ - # Defines exsisting layers as 1 or None - indexdict = {} - - for key in ["Head", "Pelvis"]: - indexdict[key] = { - "artery": 1, "vein": 1, "sfvein": None, - "core": 1, "muscle": 1, "fat": 1, "skin": 1} - - for key in ["Neck", "Chest", "Back"]: - indexdict[key] = { - "artery": 1, "vein": 1, "sfvein": None, - "core": 1, "muscle": None, "fat": None, "skin": 1} - - for key in BODY_NAMES[5:]: # limb segments - indexdict[key] = { - "artery": 1, "vein": 1, "sfvein": 1, - "core": 1, "muscle": None, "fat": None, "skin": 1} - - # Sets ordered indices in the matrix - indexdict["CB"] = 0 - order_count = 1 - for bn in BODY_NAMES: - for ln in LAYER_NAMES: - if not indexdict[bn][ln] is None: - indexdict[bn][ln] = order_count - order_count += 1 - - return indexdict, order_count -IDICT, NUM_NODES = index_order() - - -def index_bylayer(layer): - """ - Get indices of the matrix by the layer name. - Parameters - ---------- - layer : str - Layer name of jos. - ex) artery, vein, sfvein, core, muscle, fat or skin. - Returns - ------- - indices of the matrix : list - """ - - # Gets indices by the layer name - outindex = [] - for bn in BODY_NAMES: - for ln in LAYER_NAMES: - if (layer.lower() == ln) and IDICT[bn][ln]: - outindex.append(IDICT[bn][ln]) - return outindex - - -def validindex_bylayer(layer): - """ - Get indices of the matrix by the layer name. - Parameters - ---------- - layer : str - Layer name of jos. - ex) artery, vein, sfvein, core, muscle, fat or skin. - Returns - ------- - indices of the matrix : list - """ - - # Gets valid indices of the layer name - outindex = [] - for i, bn in enumerate(BODY_NAMES): - if IDICT[bn][layer]: - outindex.append(i) - return outindex - -# Constant parameters of the matrix' indicies -INDEX = {} -VINDEX = {} -for key in LAYER_NAMES: - INDEX[key] = index_bylayer(key) - VINDEX[key] = validindex_bylayer(key) - - -def localarr(bf_cr, bf_ms, bf_fat, bf_sk, bf_ava_hand, bf_ava_foot): - """ - Create matrix to calculate heat exchage by blood flow in each segment [W/K] - 1.067 [Wh/(L・K)] * Bloodflow [L/h] = [W/K] - """ - bf_local = np.zeros((NUM_NODES, NUM_NODES)) - for i, bn in enumerate(BODY_NAMES): - # Dictionary of indecies in each body segment - # key = layer name, value = index of matrix - indexof = IDICT[bn] - - # Common - bf_local[indexof["core"], indexof["artery"]] = 1.067*bf_cr[i] # art to cr - bf_local[indexof["skin"], indexof["artery"]] = 1.067*bf_sk[i] # art to sk - bf_local[indexof["vein"], indexof["core"]] = 1.067*bf_cr[i] # vein to cr - bf_local[indexof["vein"], indexof["skin"]] = 1.067*bf_sk[i] # vein to sk - - # If the segment has a muslce or fat layer - if not indexof["muscle"] is None: - bf_local[indexof["muscle"], indexof["artery"]] = 1.067*bf_ms[i] # art to ms - bf_local[indexof["vein"], indexof["muscle"]] = 1.067*bf_ms[i] # vein to ms - if not indexof["fat"] is None: - bf_local[indexof["fat"], indexof["artery"]] = 1.067*bf_fat[i] # art to fat - bf_local[indexof["vein"], indexof["fat"]] = 1.067*bf_fat[i] # vein to fat - - # Only hand - if i == 7 or i == 10: - bf_local[indexof["sfvein"], indexof["artery"]] = 1.067*bf_ava_hand # art to sfvein - # Only foot - if i == 13 or i == 16: - bf_local[indexof["sfvein"], indexof["artery"]] = 1.067*bf_ava_foot # art to sfvein - - return bf_local - - -def vessel_bloodflow(bf_cr, bf_ms, bf_fat, bf_sk, bf_ava_hand, bf_ava_foot): - """ - Get artery and vein blood flow rate [l/h] - """ - xbf = bf_cr + bf_ms + bf_fat + bf_sk - - bf_art = np.zeros(17) - bf_vein = np.zeros(17) - - #Head - bf_art[0] = xbf[0] - bf_vein[0] = xbf[0] - - #Neck (+Head) - bf_art[1] = xbf[1] + xbf[0] - bf_vein[1] = xbf[1] + xbf[0] - - #Chest - bf_art[2] = xbf[2] - bf_vein[2] = xbf[2] - - #Back - bf_art[3] = xbf[3] - bf_vein[3] = xbf[3] - - #Pelvis (+Thighs, Legs, Feet, AVA_Feet) - bf_art[4] = xbf[4] + xbf[11:17].sum() + 2*bf_ava_foot - bf_vein[4] = xbf[4] + xbf[11:17].sum() + 2*bf_ava_foot - - #L.Shoulder (+Arm, Hand, (arteryのみAVA_Hand)) - bf_art[5] = xbf[5:8].sum() + bf_ava_hand - bf_vein[5] = xbf[5:8].sum() - - #L.Arm (+Hand) - bf_art[6] = xbf[6:8].sum() + bf_ava_hand - bf_vein[6] = xbf[6:8].sum() - - #L.Hand - bf_art[7] = xbf[7] + bf_ava_hand - bf_vein[7] = xbf[7] - - #R.Shoulder (+Arm, Hand, (arteryのみAVA_Hand)) - bf_art[8] = xbf[8:11].sum() + bf_ava_hand - bf_vein[8] = xbf[8:11].sum() - - #R.Arm (+Hand) - bf_art[9] = xbf[9:11].sum() + bf_ava_hand - bf_vein[9] = xbf[9:11].sum() - - #R.Hand - bf_art[10] = xbf[10] + bf_ava_hand - bf_vein[10] = xbf[10] - - #L.Thigh (+Leg, Foot, (arteryのみAVA_Foot)) - bf_art[11] = xbf[11:14].sum() + bf_ava_foot - bf_vein[11] = xbf[11:14].sum() - - #L.Leg (+Foot) - bf_art[12] = xbf[12:14].sum() + bf_ava_foot - bf_vein[12] = xbf[12:14].sum() - - #L.Foot - bf_art[13] = xbf[13] + bf_ava_foot - bf_vein[13] = xbf[13] - - #R.Thigh (+Leg, Foot, (arteryのみAVA_Foot)) - bf_art[14] = xbf[14:17].sum() + bf_ava_foot - bf_vein[14] = xbf[14:17].sum() - - #R.Leg (+Foot) - bf_art[15] = xbf[15:17].sum() + bf_ava_foot - bf_vein[15] = xbf[15:17].sum() - - #R.Foot - bf_art[16] = xbf[16] + bf_ava_foot - bf_vein[16] = xbf[16] - - return bf_art, bf_vein - - -def wholebody(bf_art, bf_vein, bf_ava_hand, bf_ava_foot): - """ - Create matrix to calculate heat exchage by blood flow between segments [W/K] - """ - - def flow(up, down, bloodflow): - arr = np.zeros((NUM_NODES, NUM_NODES)) - # Coefficient = 1.067 [Wh/L.K] - arr[down,up] = 1.067*bloodflow # Change unit [L/h] to [W/K] - return arr - - arr83 = np.zeros((NUM_NODES, NUM_NODES)) - # Matrix offsets of segments - CB = IDICT["CB"] - Head = IDICT["Head"]["artery"] - Neck = IDICT["Neck"]["artery"] - Chest = IDICT["Chest"]["artery"] - Back = IDICT["Back"]["artery"] - Pelvis = IDICT["Pelvis"]["artery"] - LShoulder = IDICT["LShoulder"]["artery"] - LArm = IDICT["LArm"]["artery"] - LHand = IDICT["LHand"]["artery"] - RShoulder = IDICT["RShoulder"]["artery"] - RArm = IDICT["RArm"]["artery"] - RHand = IDICT["RHand"]["artery"] - LThigh = IDICT["LThigh"]["artery"] - LLeg = IDICT["LLeg"]["artery"] - LFoot = IDICT["LFoot"]["artery"] - RThigh = IDICT["RThigh"]["artery"] - RLeg = IDICT["RLeg"]["artery"] - RFoot = IDICT["RFoot"]["artery"] - - - arr83 += flow(CB, Neck, bf_art[1]) #CB to Neck.art - arr83 += flow(Neck, Head, bf_art[0]) #Neck.art to Head.art - arr83 += flow(Head+1, Neck+1, bf_vein[0]) #Head.vein to Neck.vein - arr83 += flow(Neck+1, CB, bf_vein[1]) #Neck.vein to CB - - arr83 += flow(CB, Chest, bf_art[2]) #CB to Chest.art - arr83 += flow(Chest+1, CB, bf_vein[2]) #Chest.vein to CB - - arr83 += flow(CB, Back, bf_art[3]) #CB to Back.art - arr83 += flow(Back+1, CB, bf_vein[3]) #Back.vein to CB - - arr83 += flow(CB, Pelvis, bf_art[4]) #CB to Pelvis.art - arr83 += flow(Pelvis+1, CB, bf_vein[4]) #Pelvis.vein to CB - - arr83 += flow(CB, LShoulder, bf_art[5]) #CB to LShoulder.art - arr83 += flow(LShoulder, LArm, bf_art[6]) #LShoulder.art to LArm.art - arr83 += flow(LArm, LHand, bf_art[7]) #LArm.art to LHand.art - arr83 += flow(LHand+1, LArm+1, bf_vein[7]) #LHand.vein to LArm.vein - arr83 += flow(LArm+1, LShoulder+1, bf_vein[6]) #LArm.vein to LShoulder.vein - arr83 += flow(LShoulder+1, CB, bf_vein[5]) #LShoulder.vein to CB - arr83 += flow(LHand+2, LArm+2, bf_ava_hand) #LHand.sfvein to LArm.sfvein - arr83 += flow(LArm+2, LShoulder+2, bf_ava_hand) #LArm.sfvein to LShoulder.sfvein - arr83 += flow(LShoulder+2, CB, bf_ava_hand) #LShoulder.sfvein to CB - - arr83 += flow(CB, RShoulder, bf_art[8]) #CB to RShoulder.art - arr83 += flow(RShoulder, RArm, bf_art[9]) #RShoulder.art to RArm.art - arr83 += flow(RArm, RHand, bf_art[10]) #RArm.art to RHand.art - arr83 += flow(RHand+1, RArm+1, bf_vein[10]) #RHand.vein to RArm.vein - arr83 += flow(RArm+1, RShoulder+1, bf_vein[9]) #RArm.vein to RShoulder.vein - arr83 += flow(RShoulder+1, CB, bf_vein[8]) #RShoulder.vein to CB - arr83 += flow(RHand+2, RArm+2, bf_ava_hand) #RHand.sfvein to RArm.sfvein - arr83 += flow(RArm+2, RShoulder+2, bf_ava_hand) #RArm.sfvein to RShoulder.sfvein - arr83 += flow(RShoulder+2, CB, bf_ava_hand) #RShoulder.sfvein to CB - - arr83 += flow(Pelvis, LThigh, bf_art[11]) #Pelvis to LThigh.art - arr83 += flow(LThigh, LLeg, bf_art[12]) #LThigh.art to LLeg.art - arr83 += flow(LLeg, LFoot, bf_art[13]) #LLeg.art to LFoot.art - arr83 += flow(LFoot+1, LLeg+1, bf_vein[13]) #LFoot.vein to LLeg.vein - arr83 += flow(LLeg+1, LThigh+1, bf_vein[12]) #LLeg.vein to LThigh.vein - arr83 += flow(LThigh+1, Pelvis+1, bf_vein[11]) #LThigh.vein to Pelvis - arr83 += flow(LFoot+2, LLeg+2, bf_ava_foot) #LFoot.sfvein to LLeg.sfvein - arr83 += flow(LLeg+2, LThigh+2, bf_ava_foot) #LLeg.sfvein to LThigh.sfvein - arr83 += flow(LThigh+2, Pelvis+1, bf_ava_foot) #LThigh.vein to Pelvis - - arr83 += flow(Pelvis, RThigh, bf_art[14]) #Pelvis to RThigh.art - arr83 += flow(RThigh, RLeg, bf_art[15]) #RThigh.art to RLeg.art - arr83 += flow(RLeg, RFoot, bf_art[16]) #RLeg.art to RFoot.art - arr83 += flow(RFoot+1, RLeg+1, bf_vein[16]) #RFoot.vein to RLeg.vein - arr83 += flow(RLeg+1, RThigh+1, bf_vein[15]) #RLeg.vein to RThigh.vein - arr83 += flow(RThigh+1, Pelvis+1, bf_vein[14]) #RThigh.vein to Pelvis - arr83 += flow(RFoot+2, RLeg+2, bf_ava_foot) #RFoot.sfvein to RLeg.sfvein - arr83 += flow(RLeg+2, RThigh+2, bf_ava_foot) #RLeg.sfvein to RThigh.sfvein - arr83 += flow(RThigh+2, Pelvis+1, bf_ava_foot) #RThigh.vein to Pelvis - - return arr83 \ No newline at end of file diff --git a/build/lib/jos3/thermoregulation.py b/build/lib/jos3/thermoregulation.py deleted file mode 100644 index bcea0e5..0000000 --- a/build/lib/jos3/thermoregulation.py +++ /dev/null @@ -1,871 +0,0 @@ -# -*- coding: utf-8 -*- -import numpy as np -import math - -# Import from relative path -try: - from .matrix import NUM_NODES, IDICT, BODY_NAMES - from . import construction as cons -# Import from absolute path -# These codes are for debugging -except ImportError: - from jos3.matrix import NUM_NODES, IDICT, BODY_NAMES - from jos3 import construction as cons - - -_BSAst = np.array([ - 0.110, 0.029, 0.175, 0.161, 0.221, - 0.096, 0.063, 0.050, 0.096, 0.063, 0.050, - 0.209, 0.112, 0.056, 0.209, 0.112, 0.056,]) - - -def conv_coef(posture="standing", va=0.1, ta=28.8, tsk=34.0,): - """ - Calculate convective heat transfer coefficient (hc) [W/K.m2] - - Parameters - ---------- - posture : str, optional - Select posture from standing, sitting or lying. - The default is "standing". - va : float or iter, optional - Air velocity [m/s]. If iter is input, its length should be 17. - The default is 0.1. - ta : float or iter, optional - Air temperature [oC]. If iter is input, its length should be 17. - The default is 28.8. - tsk : float or iter, optional - Skin temperature [oC]. If iter is input, its length should be 17. - The default is 34.0. - - Returns - ------- - hc : numpy.ndarray - Convective heat transfer coefficient (hc) [W/K.m2]. - - """ - # Natural convection - if posture.lower() == "standing": - # Ichihara et al., 1997, https://doi.org/10.3130/aija.62.45_5 - hc_natural = np.array([ - 4.48, 4.48, 2.97, 2.91, 2.85, - 3.61, 3.55, 3.67, 3.61, 3.55, 3.67, - 2.80, 2.04, 2.04, 2.80, 2.04, 2.04,]) - elif posture.lower() in ["sitting", "sedentary"]: - # Ichihara et al., 1997, https://doi.org/10.3130/aija.62.45_5 - hc_natural = np.array([ - 4.75, 4.75, 3.12, 2.48, 1.84, - 3.76, 3.62, 2.06, 3.76, 3.62, 2.06, - 2.98, 2.98, 2.62, 2.98, 2.98, 2.62,]) - - elif posture.lower() in ["lying", "supine"]: - # Kurazumi et al., 2008, https://doi.org/10.20718/jjpa.13.1_17 - # The values are applied under cold environment. - hc_a = np.array([ - 1.105, 1.105, 1.211, 1.211, 1.211, - 0.913, 2.081, 2.178, 0.913, 2.081, 2.178, - 0.945, 0.385, 0.200, 0.945, 0.385, 0.200,]) - hc_b = np.array([ - 0.345, 0.345, 0.046, 0.046, 0.046, - 0.373, 0.850, 0.297, 0.373, 0.850, 0.297, - 0.447, 0.580, 0.966, 0.447, 0.580, 0.966,]) - hc_natural = hc_a * (abs(ta - tsk) ** hc_b) - - # Forced convection - # Ichihara et al., 1997, https://doi.org/10.3130/aija.62.45_5 - hc_a = np.array([ - 15.0, 15.0, 11.0, 17.0, 13.0, - 17.0, 17.0, 20.0, 17.0, 17.0, 20.0, - 14.0, 15.8, 15.1, 14.0, 15.8, 15.1,]) - hc_b = np.array([ - 0.62, 0.62, 0.67, 0.49, 0.60, - 0.59, 0.61, 0.60, 0.59, 0.61, 0.60, - 0.61, 0.74, 0.62, 0.61, 0.74, 0.62,]) - hc_forced = hc_a * (va ** hc_b) - - # Select natural or forced hc. - # If local va is under 0.2 m/s, the hc valuse is natural. - hc = np.where(va<0.2, hc_natural, hc_forced) # hc [W/K.m2)] - - return hc - - -def rad_coef(posture="standing"): - """ - Calculate radiative heat transfer coefficient (hr) [W/K.m2] - - Parameters - ---------- - posture : str, optional - Select posture from standing, sitting or lying. - The default is "standing". - - Returns - ------- - hc : numpy.ndarray - Radiative heat transfer coefficient (hr) [W/K.m2]. - - """ - - - if posture.lower() == "standing": - # Ichihara et al., 1997, https://doi.org/10.3130/aija.62.45_5 - hr = np.array([ - 4.89, 4.89, 4.32, 4.09, 4.32, - 4.55, 4.43, 4.21, 4.55, 4.43, 4.21, - 4.77, 5.34, 6.14, 4.77, 5.34, 6.14,]) - elif posture.lower() in ["sitting", "sedentary"]: - # Ichihara et al., 1997, https://doi.org/10.3130/aija.62.45_5 - hr = np.array([ - 4.96, 4.96, 3.99, 4.64, 4.21, - 4.96, 4.21, 4.74, 4.96, 4.21, 4.74, - 4.10, 4.74, 6.36, 4.10, 4.74, 6.36,]) - elif posture.lower() in ["lying", "supine"]: - # Kurazumi et al., 2008, https://doi.org/10.20718/jjpa.13.1_17 - hr = np.array([ - 5.475, 5.475, 3.463, 3.463, 3.463, - 4.249, 4.835, 4.119, 4.249, 4.835, 4.119, - 4.440, 5.547, 6.085, 4.440, 5.547, 6.085,]) - return hr - - -def fixed_hc(hc, va): - """ - Fixes hc values to fit tow-node-model's values. - """ - mean_hc = np.average(hc, weights=_BSAst) - mean_va = np.average(va, weights=_BSAst) - mean_hc_whole = max(3, 8.600001*(mean_va**0.53)) - _fixed_hc = hc * mean_hc_whole/mean_hc - return _fixed_hc - - -def fixed_hr(hr): - """ - Fixes hr values to fit tow-node-model's values. - """ - mean_hr = np.average(hr, weights=_BSAst) - _fixed_hr = hr * 4.7/mean_hr - return _fixed_hr - -def operative_temp(ta, tr, hc, hr): - to = (hc*ta + hr*tr) / (hc + hr) - return to - - -def clo_area_factor(clo): - fcl = np.where(clo<0.5, clo*0.2+1, clo*0.1+1.05) - return fcl - - -def dry_r(hc, hr, clo): - """ - Calculate total sensible thermal resistance. - - Parameters - ---------- - hc : float or array - Convective heat transfer coefficient (hc) [W/K.m2]. - hr : float or array - Radiative heat transfer coefficient (hr) [W/K.m2]. - clo : float or array - Clothing insulation [clo]. - - Returns - ------- - rt : float or array - Total sensible thermal resistance between skin and ambient. - """ - fcl = clo_area_factor(clo) - r_a = 1/(hc+hr) - r_cl = 0.155*clo - r_t = r_a/fcl + r_cl - return r_t - - -def wet_r(hc, clo, iclo=0.45, lewis_rate=16.5): - """ - Calculate total evaporative thermal resistance. - - Parameters - ---------- - hc : float or array - Convective heat transfer coefficient (hc) [W/K.m2]. - clo : float or array - Clothing insulation [clo]. - iclo : float, or array, optional - Clothin vapor permeation efficiency [-]. The default is 0.45. - lewis_rate : float, optional - Lewis rate [K/kPa]. The default is 16.5. - - Returns - ------- - ret : float or array - Total evaporative thermal resistance. - - """ - fcl = clo_area_factor(clo) - r_cl = 0.155 * clo - r_ea = 1 / (lewis_rate * hc) - r_ecl = r_cl / (lewis_rate * iclo) - r_et = r_ea / fcl + r_ecl - return r_et - - -def heat_resistances( - ta=np.ones(17)*28.8, - tr=np.ones(17)*28.8, - va=np.ones(17)*0.1, - tsk=np.ones(17)*34, - clo=np.zeros(17), - posture="standing", - iclo=np.ones(17)*0.45, - options={},): - - hc = fixed_hc(conv_coef(posture, va, ta, tsk,)) - hr = fixed_hr(rad_coef(posture,)) - to = operative_temp(ta, tr, hc, hr,) - fcl = clo_area_factor(clo,) - r_t, r_a, r_cl = dry_r(hc, hr, clo) - r_et, r_ea, r_ecl = wet_r(hc, clo, iclo) - - return to, r_t, r_et, r_a, r_cl, r_ea, r_ecl, fcl - - -def error_signals(err_cr=0, err_sk=0): - """ - Calculate WRMS and CLDS signals of thermoregulation - - Parameters - ---------- - err_cr, err_sk : float or array, optional - Difference between setpoint and body temperatures. - The default is 0. - - Returns - ------- - wrms, clds : array - WRMS and CLDS signals. - """ - - # SKINR - receptor = np.array([ - 0.0549, 0.0146, 0.1492, 0.1321, 0.2122, - 0.0227, 0.0117, 0.0923, 0.0227, 0.0117, 0.0923, - 0.0501, 0.0251, 0.0167, 0.0501, 0.0251, 0.0167,]) - - # wrms signal - wrm = np.maximum(err_sk, 0) - wrm *= receptor - wrms = wrm.sum() - # clds signal - cld = np.minimum(err_sk, 0) - cld *= -receptor - clds = cld.sum() - - return wrms, clds - - -# Antoine equation [kPa] -antoine = lambda x: math.e**(16.6536-(4030.183/(x+235))) -# Tetens equation [kPa] -tetens = lambda x: 0.61078*10**(7.5*x/(x+237.3)) - - -def evaporation(err_cr, err_sk, tsk, ta, rh, ret, - height=1.72, weight=74.43, equation="dubois", age=20): - """ - Calculate evaporative heat loss. - - Parameters - ---------- - err_cr, err_sk : array - Difference between setpoint and body temperatures [oC]. - tsk : array - Skin temperatures [oC]. - ta : array - Air temperatures at local body segments [oC]. - rh : array - Relative humidity at local body segments [%]. - ret : array - Total evaporative thermal resistances [m2.K/W]. - height : float, optional - Body height [m]. The default is 1.72. - weight : float, optional - Body weight [kg]. The default is 74.43. - equation : str, optional - The equation name (str) of bsa calculation. Choose a name from "dubois", - "takahira", "fujimoto", or "kurazumi". The default is "dubois". - age : float, optional - Age [years]. The default is 20. - - Returns - ------- - wet : array - Local skin wettedness [-]. - e_sk : array - Evaporative heat loss at the skin by sweating and diffuse [W]. - e_max : array - Maximum evaporative heat loss at the skin [W]. - e_sweat : TYPE - Evaporative heat loss at the skin by only sweating [W]. - - """ - - wrms, clds = error_signals(err_cr, err_sk,) # Thermoregulation signals - bsar = cons.bsa_rate(height, weight, equation,) # BSA rate - bsa = _BSAst * bsar # BSA - p_a = antoine(ta)*rh/100 # Saturated vapor pressure of ambient [kPa] - p_sk_s = antoine(tsk) # Saturated vapor pressure at the skin [kPa] - - e_max = (p_sk_s - p_a) / ret * bsa # Maximum evaporative heat loss - - # SKINS - skin_sweat = np.array([ - 0.064, 0.017, 0.146, 0.129, 0.206, - 0.051, 0.026, 0.0155, 0.051, 0.026, 0.0155, - 0.073, 0.036, 0.0175, 0.073, 0.036, 0.0175,]) - - sig_sweat = (371.2*err_cr[0]) + (33.64*(wrms-clds)) - sig_sweat = max(sig_sweat, 0) - sig_sweat *= bsar - - # Signal decrement by aging - if age < 60: - sd_sweat = np.ones(17) - else: #age >= 60 - sd_sweat = np.array([ - 0.69, 0.69, 0.59, 0.52, 0.40, - 0.75, 0.75, 0.75, 0.75, 0.75, 0.75, - 0.40, 0.40, 0.40, 0.40, 0.40, 0.40,]) - - e_sweat = skin_sweat * sig_sweat * sd_sweat * 2**((err_sk)/10) - wet = 0.06 + 0.94*(e_sweat/e_max) - wet = np.minimum(wet, 1) # Wettedness' upper limit - e_sk = wet * e_max - e_sweat = (wet - 0.06) / 0.94 * e_max # Effective sweating - return wet, e_sk, e_max, e_sweat - - -def skin_bloodflow(err_cr, err_sk, - height=1.72, weight=74.43, equation="dubois", age=20, ci=2.59,): - """ - Calculate skin blood flow rate (BFsk) [L/h]. - - Parameters - ---------- - err_cr, err_sk : array - Difference between setpoint and body temperatures [oC]. - height : float, optional - Body height [m]. The default is 1.72. - weight : float, optional - Body weight [kg]. The default is 74.43. - equation : str, optional - The equation name (str) of bsa calculation. Choose a name from "dubois", - "takahira", "fujimoto", or "kurazumi". The default is "dubois". - age : float, optional - Age [years]. The default is 20. - ci : float, optional - Cardiac index [L/min/㎡]. The default is 2.59. - - Returns - ------- - BFsk : array - Skin blood flow rate [L/h]. - - """ - - wrms, clds = error_signals(err_cr, err_sk) - - # BFBsk - bfb_sk = np.array([ - 1.754, 0.325, 1.967, 1.475, 2.272, - 0.91, 0.508, 1.114, 0.91, 0.508, 1.114, - 1.456, 0.651, 0.934, 1.456, 0.651, 0.934,]) - # SKIND - skin_dilat = np.array([ - 0.0692, 0.0992, 0.0580, 0.0679, 0.0707, - 0.0400, 0.0373, 0.0632, 0.0400, 0.0373, 0.0632, - 0.0736, 0.0411, 0.0623, 0.0736, 0.0411, 0.0623,]) - # SKINC - skin_stric = np.array([ - 0.0213, 0.0213, 0.0638, 0.0638, 0.0638, - 0.0213, 0.0213, 0.1489, 0.0213, 0.0213, 0.1489, - 0.0213, 0.0213, 0.1489, 0.0213, 0.0213, 0.1489,]) - - sig_dilat = (100.5*err_cr[0]) + (6.4*(wrms-clds)) - sig_stric = (-10.8*err_cr[0]) + (-10.8*(wrms-clds)) - sig_dilat = max(sig_dilat, 0) - sig_stric = max(sig_stric, 0) - - # Signal decrement by aging - if age < 60: - sd_dilat = np.ones(17) - sd_stric = np.ones(17) - else: #age >= 60 - sd_dilat = np.array([ - 0.91, 0.91, 0.47, 0.47, 0.31, - 0.47, 0.47, 0.47, 0.47, 0.47, 0.47, - 0.31, 0.31, 0.31, 0.31, 0.31, 0.31, - ]) - sd_stric = np.ones(17) - - #皮膚血流量 [L/h] - bf_sk = (1 + skin_dilat * sd_dilat * sig_dilat) / \ - (1 + skin_stric * sd_stric * sig_stric) * bfb_sk * 2**(err_sk/6) - - bfbr = cons.bfb_rate(height, weight, equation, age, ci,) - bf_sk *= bfbr - return bf_sk - - -def ava_bloodflow(err_cr, err_sk, - height=1.72, weight=74.43, equation="dubois", age=20, ci=2.59,): - """ - Calculate areteriovenous anastmoses (AVA) blood flow rate [L/h] based on - Takemori's model, 1995. - - Parameters - ---------- - err_cr, err_sk : array - Difference between setpoint and body temperatures [oC]. - height : float, optional - Body height [m]. The default is 1.72. - weight : float, optional - Body weight [kg]. The default is 74.43. - equation : str, optional - The equation name (str) of bsa calculation. Choose a name from "dubois", - "takahira", "fujimoto", or "kurazumi". The default is "dubois". - age : float, optional - Age [years]. The default is 20. - ci : float, optional - Cardiac index [L/min/m2]. The default is 2.59. - - Returns - ------- - BFava_hand, BFava_foot : array - AVA blood flow rate at hand and foot [L/h]. - - """ - # Cal. mean error body core temp. - cap_bcr = [10.2975, 9.3935, 13.834] # Thermal capacity at Chest, Back and Pelvis - err_bcr = np.average(err_cr[2:5], weights=cap_bcr) - - # Cal. mean error skin temp. - bsa = _BSAst - err_msk = np.average(err_sk, weights=bsa) - - # Openbess of AVA [-] - sig_ava_hand = 0.265 * (err_bcr + 0.43) + 0.953 * (err_msk + 0.1905) + 0.9126 - sig_ava_foot = 0.265 * (err_bcr - 0.97) + 0.953 * (err_msk - 0.0095) + 0.9126 - - sig_ava_hand = min(sig_ava_hand, 1) - sig_ava_hand = max(sig_ava_hand, 0) - sig_ava_foot = min(sig_ava_foot, 1) - sig_ava_foot = max(sig_ava_foot, 0) - - bfbr = bfbr = cons.bfb_rate(height, weight, equation, age, ci,) - # AVA blood flow rate [L/h] - bf_ava_hand = 1.71 * bfbr * sig_ava_hand # Hand - bf_ava_foot = 2.16 * bfbr * sig_ava_foot # Foot - return bf_ava_hand, bf_ava_foot - - -def basal_met(height=1.72, weight=74.43, age=20, - sex="male", equation="harris-benedict"): - """ - Calculate basal metabolic rate [W]. - - Parameters - ---------- - height : float, optional - Body height [m]. The default is 1.72. - weight : float, optional - Body weight [kg]. The default is 74.43. - age : float, optional - Age [years]. The default is 20. - sex : str, optional - Choose male or female. The default is "male". - equation : str, optional - Choose harris-benedict or ganpule. The default is "harris-benedict". - - Returns - ------- - BMR : float - Basal metabolic rate [W]. - - """ - - if equation=="harris-benedict": - if sex=="male": - bmr = 88.362 + 13.397*weight + 500.3*height - 5.677*age - else: - bmr = 447.593 + 9.247*weight + 479.9*height - 4.330*age - - elif equation=="harris-benedict_origin": - if sex=="male": - bmr = 66.4730 + 13.7516*weight + 500.33*height - 6.7550*age - else: - bmr = 655.0955 + 9.5634*weight + 184.96*height - 4.6756*age - - elif equation=="japanese" or equation=="ganpule": - # Ganpule et al., 2007, https://doi.org/10.1038/sj.ejcn.1602645 - if sex=="male": - bmr = 0.0481*weight + 2.34*height - 0.0138*age - 0.4235 - else: - bmr = 0.0481*weight + 2.34*height - 0.0138*age - 0.9708 - bmr *= 1000 / 4.186 - - bmr *= 0.048 # [kcal/day] to [W] - - return bmr - - -def local_mbase(height=1.72, weight=74.43, age=20, - sex="male", equation="harris-benedict"): - """ - Calculate local basal metabolic rate [W]. - - Parameters - ---------- - height : float, optional - Body height [m]. The default is 1.72. - weight : float, optional - Body weight [kg]. The default is 74.43. - age : float, optional - Age [years]. The default is 20. - sex : str, optional - Choose male or female. The default is "male". - equation : str, optional - Choose harris-benedict or ganpule. The default is "harris-benedict". - - Returns - ------- - mbase : array - Local basal metabolic rate (Mbase) [W]. - - """ - - mbase_all = basal_met(height, weight, age, sex, equation) - # Distribution coefficient of basal metabolic rate - mbf_cr = np.array([ - 0.19551, 0.00324, 0.28689, 0.25677, 0.09509, - 0.01435, 0.00409, 0.00106, 0.01435, 0.00409, 0.00106, - 0.01557, 0.00422, 0.00250, 0.01557, 0.00422, 0.00250,]) - mbf_ms = np.array([ - 0.00252, 0.0, 0.0, 0.0, 0.04804, - 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, - 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,]) - mbf_fat = np.array([ - 0.00127, 0.0, 0.0, 0.0, 0.00950, - 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, - 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,]) - mbf_sk = np.array([ - 0.00152, 0.00033, 0.00211, 0.00187, 0.00300, - 0.00059, 0.00031, 0.00059, 0.00059, 0.00031, 0.00059, - 0.00144, 0.00027, 0.00118, 0.00144, 0.00027, 0.00118,]) - - mbase_cr = mbf_cr * mbase_all - mbase_ms = mbf_ms * mbase_all - mbase_fat = mbf_fat * mbase_all - mbase_sk = mbf_sk * mbase_all - return mbase_cr, mbase_ms, mbase_fat, mbase_sk - - -def local_mwork(bmr, par): - """ - Calculate local metabolic rate by work [W] - - Parameters - ---------- - bmr : float - Basal metbolic rate [W]. - par : float - Physical activity ratio [-]. - - Returns - ------- - Mwork : array - Local metabolic rate by work [W]. - - """ - mwork_all = (par-1) * bmr - mwf = np.array([ - 0, 0, 0.091, 0.08, 0.129, - 0.0262, 0.0139, 0.005, 0.0262, 0.0139, 0.005, - 0.2010, 0.0990, 0.005, 0.2010, 0.0990, 0.005]) - mwork = mwork_all * mwf - return mwork - - -PRE_SHIV = 0 -def shivering(err_cr, err_sk, tcr, tsk, - height=1.72, weight=74.43, equation="dubois", age=20, sex="male", dtime=60, - options={}): - """ - Calculate local metabolic rate by shivering [W]. - - Parameters - ---------- - err_cr, err_sk : array - Difference between setpoint and body temperatures [oC]. - tcr, tsk : array - Core and skin temperatures [oC]. - height : float, optional - Body height [m]. The default is 1.72. - weight : float, optional - Body weight [kg]. The default is 74.43. - equation : str, optional - The equation name (str) of bsa calculation. Choose a name from "dubois", - "takahira", "fujimoto", or "kurazumi". The default is "dubois". - age : float, optional - Age [years]. The default is 20. - sex : str, optional - Choose male or female. The default is "male". - dtime : float, optional - Interval of analysis time. The default is 60. - - Returns - ------- - Mshiv : array - Local metabolic rate by shivering [W]. - - """ - wrms, clds = error_signals(err_cr, err_sk,) - shivf = np.array([ - 0.0339, 0.0436, 0.27394, 0.24102, 0.38754, - 0.00243, 0.00137, 0.0002, 0.00243, 0.00137, 0.0002, - 0.0039, 0.00175, 0.00035, 0.0039, 0.00175, 0.00035,]) - sig_shiv = 24.36 * clds * (-err_cr[0]) - sig_shiv = max(sig_shiv, 0) - - if options: - if options["shivering_threshold"]: - # Asaka, 2016 - # Threshold of starting shivering - tskm = np.average(tsk, weights=_BSAst) # Mean skin temp. - if tskm < 31: - thres = 36.6 - else: - if sex == "male": - thres = -0.2436 * tskm + 44.10 - else: # sex == "female": - thres = -0.2250 * tskm + 43.05 - # Second threshold of starting shivering - if thres < tcr[0]: - sig_shiv = 0 - - global PRE_SHIV # Previous shivering thermogenesis [W] - if options: - if options["limit_dshiv/dt"]: - # Asaka, 2016 - # dshiv < 0.0077 [W/s] - dshiv = sig_shiv - PRE_SHIV - if options["limit_dshiv/dt"] is True: # default is 0.0077 [W/s] - limit_dshiv = 0.0077 * dtime - else: - limit_dshiv = options["limit_dshiv/dt"] * dtime - if dshiv > limit_dshiv: - sig_shiv = limit_dshiv + PRE_SHIV - elif dshiv < -limit_dshiv: - sig_shiv = -limit_dshiv + PRE_SHIV - PRE_SHIV = sig_shiv - - # Signal sd_shiv by aging - if age < 30: - sd_shiv = np.ones(17) - elif age < 40: - sd_shiv = np.ones(17) * 0.97514 - elif age < 50: - sd_shiv = np.ones(17) * 0.95028 - elif age < 60: - sd_shiv = np.ones(17) * 0.92818 - elif age < 70: - sd_shiv = np.ones(17) * 0.90055 - elif age < 80: - sd_shiv = np.ones(17) * 0.86188 - else: #age >= 80 - sd_shiv = np.ones(17) * 0.82597 - - bsar = cons.bsa_rate(height, weight, equation) - mshiv = shivf * bsar * sd_shiv * sig_shiv - return mshiv - -shivering -def nonshivering(err_cr, err_sk, - height=1.72, weight=74.43, equation="dubois", age=20, - coldacclimation=False, batpositive=True, - options={},): - """ - Calculate local metabolic rate by non-shivering [W] - - Parameters - ---------- - err_cr, err_sk : array - Difference between setpoint and body temperatures [oC]. - height : float, optional - Body height [m]. The default is 1.72. - weight : float, optional - Body weight [kg]. The default is 74.43. - equation : str, optional - The equation name (str) of bsa calculation. Choose a name from "dubois", - "takahira", "fujimoto", or "kurazumi". The default is "dubois". - age : float, optional - Age [years]. The default is 20. - coldacclimation : bool, optional - Whether the subject acclimates cold enviroment or not. - The default is False. - batpositive : bool, optional - Whether BAT ativity is positive or not. - The default is True. - - Returns - ------- - Mnst : array - Local metabolic rate by non-shivering [W]. - - """ - # NST (Non-Shivering Thermogenesis) model, Asaka, 2016 - wrms, clds = error_signals(err_cr, err_sk, ) - - bmi = weight / height**2 - - # BAT: brown adipose tissue [SUV] - bat = 10**(-0.10502 * bmi + 2.7708) - - # age factor - if age < 30: - bat *= 1.61 - elif age < 40: - bat *= 1.00 - else: # age >= 40 - bat *= 0.80 - - if coldacclimation: - bat += 3.46 - - if not batpositive: - # incidence age factor: T.Yoneshiro 2011 - if age < 30: - bat *= 44/83 - elif age < 40: - bat *= 15/38 - elif age < 50: - bat *= 7/26 - elif age < 50: - bat *= 1/8 - else: # age > 60 - bat *= 0 - - # NST limit - thres = ((1.80 * bat + 2.43) + 5.62) # [W] - - sig_nst = 2.8 * clds # [W] - sig_nst = min(sig_nst, thres) - - mnstf = np.array([ - 0.000, 0.190, 0.000, 0.190, 0.190, - 0.215, 0.000, 0.000, 0.215, 0.000, 0.000, - 0.000, 0.000, 0.000, 0.000, 0.000, 0.000,]) - bsar = cons.bsa_rate(height, weight, equation) - mnst = bsar * mnstf * sig_nst - return mnst - - -def sum_m(mbase, mwork, mshiv, mnst): - qcr = mbase[0].copy() - qms = mbase[1].copy() - qfat = mbase[2].copy() - qsk = mbase[3].copy() - - for i, bn in enumerate(BODY_NAMES): - # If the segment has a muscle layer, muscle heat production increases by the activity. - if not IDICT[bn]["muscle"] is None: - qms[i] += mwork[i] + mshiv[i] - # In other segments, core heat production increase, instead of muscle. - else: - qcr[i] += mwork[i] + mshiv[i] - qcr += mnst # Non-shivering thermogenesis occurs in core layers - return qcr, qms, qfat, qsk - - -def crmsfat_bloodflow(mwork, mshiv, - height=1.72, weight=74.43, equation="dubois", age=20, ci=2.59,): - """ - Calculate core, muslce and fat blood flow rate [L/h]. - - Parameters - ---------- - mwork : array - Metablic rate by work [W]. - mshiv : array - Metablic rate by shivering [W]. - height : float, optional - Body height [m]. The default is 1.72. - weight : float, optional - Body weight [kg]. The default is 74.43. - equation : str, optional - The equation name (str) of bsa calculation. Choose a name from "dubois", - "takahira", "fujimoto", or "kurazumi". The default is "dubois". - age : float, optional - Age [years]. The default is 20. - ci : float, optional - Cardiac index [L/min/㎡]. The default is 2.59. - - Returns - ------- - BFcr, BFms, BFfat : array - Core, muslce and fat blood flow rate [L/h]. - - """ - # Basal blood flow rate [L/h] - # core, CBFB - bfb_cr = np.array([ - 35.251, 15.240, 89.214, 87.663, 18.686, - 1.808, 0.940, 0.217, 1.808, 0.940, 0.217, - 1.406, 0.164, 0.080, 1.406, 0.164, 0.080,]) - # muscle, MSBFB - bfb_ms = np.array([ - 0.682, 0.0, 0.0, 0.0, 12.614, - 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, - 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,]) - # fat, FTBFB - bfb_fat = np.array([ - 0.265, 0.0, 0.0, 0.0, 2.219, - 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, - 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,]) - - bfbr = cons.bfb_rate(height, weight, equation, age, ci) - bf_cr = bfb_cr * bfbr - bf_ms = bfb_ms * bfbr - bf_fat = bfb_fat * bfbr - - for i, bn in enumerate(BODY_NAMES): - # If the segment has a muscle layer, muscle blood flow increases. - if not IDICT[bn]["muscle"] is None: - bf_ms[i] += (mwork[i] + mshiv[i])/1.163 - # In other segments, core blood flow increase, instead of muscle blood flow. - else: - bf_cr[i] += (mwork[i] + mshiv[i])/1.163 - return bf_cr, bf_ms, bf_fat - - -def sum_bf(bf_cr, bf_ms, bf_fat, bf_sk, bf_ava_hand, bf_ava_foot): - co = 0 - co += bf_cr.sum() - co += bf_ms.sum() - co += bf_fat.sum() - co += bf_sk.sum() - co += 2*bf_ava_hand - co += 2*bf_ava_foot - return co - - -def resp_heatloss(t, p, met): - res_sh = 0.0014 * met * (34 - t) #顕熱 - res_lh = 0.0173 * met * (5.87 - p) #潜熱 - return res_sh, res_lh - - -def get_lts(ta): - return 2.418*1000 \ No newline at end of file diff --git a/dist/jos3-yoshito-takahashi-0.0.3.tar.gz b/dist/jos3-yoshito-takahashi-0.0.3.tar.gz deleted file mode 100644 index 181a577..0000000 Binary files a/dist/jos3-yoshito-takahashi-0.0.3.tar.gz and /dev/null differ diff --git a/dist/jos3_yoshito_takahashi-0.0.3-py3-none-any.whl b/dist/jos3_yoshito_takahashi-0.0.3-py3-none-any.whl deleted file mode 100644 index 2012c42..0000000 Binary files a/dist/jos3_yoshito_takahashi-0.0.3-py3-none-any.whl and /dev/null differ diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index ac495ec..0000000 --- a/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -numpy==1.19.4 \ No newline at end of file diff --git a/setup.py b/setup.py index 9642eef..736b8d7 100644 --- a/setup.py +++ b/setup.py @@ -11,13 +11,6 @@ except IOError: readme = '' -try: - with open("requirements.txt") as f: - requirements = f.read().splitlines() -except: - requirements = ["numpy"] - - # version here = os.path.dirname(os.path.abspath(__file__)) initpath = os.path.join(here, "src", 'jos3', '__init__.py') @@ -28,7 +21,7 @@ version = line setup( - name="jos3-yoshito-takahashi", + name="jos3", version=version, url='https://github.com/TanabeLab/JOS-3', author='Yoshito Takahashi', @@ -38,7 +31,7 @@ long_description_content_type='text/markdown', packages=find_packages("src"), package_dir={'': "src"}, - install_requires=requirements, + install_requires=["numpy"], license="MIT", classifiers=[ 'Operating System :: OS Independent', diff --git a/src/jos3.egg-info/PKG-INFO b/src/jos3.egg-info/PKG-INFO deleted file mode 100644 index 935ddb8..0000000 --- a/src/jos3.egg-info/PKG-INFO +++ /dev/null @@ -1,75 +0,0 @@ -Metadata-Version: 1.1 -Name: jos3 -Version: 0.0.0 -Summary: Joint-thermoregulation system, JOS-3 -Home-page: https://github.com/TanabeLab/JOS-3 -Author: Yoshito Takahashi -Author-email: takahashiyoshito64@gmail.com -License: MIT -Description: # JOS-3 - - JOS-3 is a model to simulate a human thermoregulation. - - Its python package name is "jos3". - - The model has been derived from 65MN https://doi.org/10.1016/S0378-7788(02)00014-2 and JOS-2 https://doi.org/10.1016/j.buildenv.2013.04.013 model. - - Please cite us if you use this package : Y. Takahashi, A. Nomoto, S. Yoda, R. Hisayama, M. Ogata, Y. Ozeki, S. Tanabe,Thermoregulation Model JOS-3 with New Open Source Code, Energy & Buildings (2020), doi: https://doi.org/10.1016/j.enbuild.2020.110575 - - # Requirement - - * python 3 - * numpy - - # Installation - - ```bash - pip install git+https://github.com/TanabeLab/JOS-3.git - ``` - - # Usage - - ```python - - import pandas as pd - import jos3 - - model = jos3.JOS3(height=1.7, weight=60, age=30) # Builds a model - - # Set the first condition - model.To = 28 # Operative temperature [oC] - model.RH = 40 # Relative humidity [%] - model.Va = 0.2 # Air velocity [m/s] - model.PAR = 1.2 # Physical activity ratio [-] - model.simulate(60) # Exposre time = 60 [min] - - # Set the next condition - model.To = 20 # Changes only operative temperature - model.simulate(60) # Additional exposre time = 60 [min] - - df = pd.DataFrame(model.dict_results()) # Make pandas.DataFrame - df.TskMean.plot() # Show the graph of mean skin temp. - ``` - - ![result](example/ex_result.png) - - # Author - - * Yoshito Takahashi - * Master's level graduate [Tanabe Laboratory, Waseda University](https://www.tanabe.arch.waseda.ac.jp/en/) - * takahashiyoshito64@gmail.com - - # License - jos3 is under [MIT license](https://en.wikipedia.org/wiki/MIT_License). - -Platform: UNKNOWN -Classifier: Operating System :: OS Independent -Classifier: Intended Audience :: Science/Research -Classifier: Intended Audience :: Education -Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.6 -Classifier: Programming Language :: Python :: 3.7 -Classifier: Programming Language :: Python :: 3.8 -Classifier: Programming Language :: Python :: 3.9 -Classifier: Programming Language :: Python :: Implementation :: CPython -Classifier: License :: OSI Approved :: MIT License diff --git a/src/jos3.egg-info/SOURCES.txt b/src/jos3.egg-info/SOURCES.txt deleted file mode 100644 index 4f21d52..0000000 --- a/src/jos3.egg-info/SOURCES.txt +++ /dev/null @@ -1,13 +0,0 @@ -README.md -setup.py -src/jos3/__init__.py -src/jos3/comfmod.py -src/jos3/construction.py -src/jos3/jos3.py -src/jos3/matrix.py -src/jos3/thermoregulation.py -src/jos3.egg-info/PKG-INFO -src/jos3.egg-info/SOURCES.txt -src/jos3.egg-info/dependency_links.txt -src/jos3.egg-info/requires.txt -src/jos3.egg-info/top_level.txt \ No newline at end of file diff --git a/src/jos3.egg-info/dependency_links.txt b/src/jos3.egg-info/dependency_links.txt deleted file mode 100644 index 8b13789..0000000 --- a/src/jos3.egg-info/dependency_links.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/jos3.egg-info/requires.txt b/src/jos3.egg-info/requires.txt deleted file mode 100644 index 250d96c..0000000 --- a/src/jos3.egg-info/requires.txt +++ /dev/null @@ -1 +0,0 @@ -numpy==1.19.4 diff --git a/src/jos3.egg-info/top_level.txt b/src/jos3.egg-info/top_level.txt deleted file mode 100644 index 7981563..0000000 --- a/src/jos3.egg-info/top_level.txt +++ /dev/null @@ -1 +0,0 @@ -jos3 diff --git a/src/jos3/__init__.py b/src/jos3/__init__.py index abd4497..143250e 100644 --- a/src/jos3/__init__.py +++ b/src/jos3/__init__.py @@ -1,3 +1,3 @@ # -*- coding: utf-8 -*- from jos3.jos3 import * -__version__ = '0.0.3' \ No newline at end of file +__version__ = '0.0.5' \ No newline at end of file diff --git a/src/jos3_yoshito_takahashi.egg-info/PKG-INFO b/src/jos3_yoshito_takahashi.egg-info/PKG-INFO deleted file mode 100644 index b0f610d..0000000 --- a/src/jos3_yoshito_takahashi.egg-info/PKG-INFO +++ /dev/null @@ -1,80 +0,0 @@ -Metadata-Version: 2.1 -Name: jos3-yoshito-takahashi -Version: 0.0.3 -Summary: Joint-thermoregulation system, JOS-3 -Home-page: https://github.com/TanabeLab/JOS-3 -Author: Yoshito Takahashi -Author-email: takahashiyoshito64@gmail.com -License: MIT -Description: # JOS-3 - - JOS-3 is a model to simulate a human thermoregulation. - - Its python package name is "jos3". - - The model has been derived from 65MN https://doi.org/10.1016/S0378-7788(02)00014-2 and JOS-2 https://doi.org/10.1016/j.buildenv.2013.04.013 model. - - Please cite us if you use this package : Y. Takahashi, A. Nomoto, S. Yoda, R. Hisayama, M. Ogata, Y. Ozeki, S. Tanabe,Thermoregulation Model JOS-3 with New Open Source Code, Energy & Buildings (2020), doi: https://doi.org/10.1016/j.enbuild.2020.110575 - - # Requirement - - * python 3 - * numpy - - # Installation - - ```bash - pip install jos3 - - or - - pip install git+https://github.com/TanabeLab/JOS-3.git - ``` - - # Usage - - ```python - - import pandas as pd - import jos3 - - model = jos3.JOS3(height=1.7, weight=60, age=30) # Builds a model - - # Set the first condition - model.To = 28 # Operative temperature [oC] - model.RH = 40 # Relative humidity [%] - model.Va = 0.2 # Air velocity [m/s] - model.PAR = 1.2 # Physical activity ratio [-] - model.simulate(60) # Exposre time = 60 [min] - - # Set the next condition - model.To = 20 # Changes only operative temperature - model.simulate(60) # Additional exposre time = 60 [min] - - df = pd.DataFrame(model.dict_results()) # Make pandas.DataFrame - df.TskMean.plot() # Show the graph of mean skin temp. - ``` - - ![result](https://raw.githubusercontent.com/TanabeLab/JOS-3/master/example/ex_result.png) - - # Author - - * Yoshito Takahashi - * Master's level graduate [Tanabe Laboratory, Waseda University](https://www.tanabe.arch.waseda.ac.jp/en/) - * takahashiyoshito64@gmail.com - - # License - jos3 is under [MIT license](https://en.wikipedia.org/wiki/MIT_License). - -Platform: UNKNOWN -Classifier: Operating System :: OS Independent -Classifier: Intended Audience :: Science/Research -Classifier: Intended Audience :: Education -Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.6 -Classifier: Programming Language :: Python :: 3.7 -Classifier: Programming Language :: Python :: 3.8 -Classifier: Programming Language :: Python :: 3.9 -Classifier: Programming Language :: Python :: Implementation :: CPython -Classifier: License :: OSI Approved :: MIT License -Description-Content-Type: text/markdown diff --git a/src/jos3_yoshito_takahashi.egg-info/SOURCES.txt b/src/jos3_yoshito_takahashi.egg-info/SOURCES.txt deleted file mode 100644 index c398e00..0000000 --- a/src/jos3_yoshito_takahashi.egg-info/SOURCES.txt +++ /dev/null @@ -1,13 +0,0 @@ -README.md -setup.py -src/jos3/__init__.py -src/jos3/comfmod.py -src/jos3/construction.py -src/jos3/jos3.py -src/jos3/matrix.py -src/jos3/thermoregulation.py -src/jos3_yoshito_takahashi.egg-info/PKG-INFO -src/jos3_yoshito_takahashi.egg-info/SOURCES.txt -src/jos3_yoshito_takahashi.egg-info/dependency_links.txt -src/jos3_yoshito_takahashi.egg-info/requires.txt -src/jos3_yoshito_takahashi.egg-info/top_level.txt \ No newline at end of file diff --git a/src/jos3_yoshito_takahashi.egg-info/dependency_links.txt b/src/jos3_yoshito_takahashi.egg-info/dependency_links.txt deleted file mode 100644 index 8b13789..0000000 --- a/src/jos3_yoshito_takahashi.egg-info/dependency_links.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/src/jos3_yoshito_takahashi.egg-info/requires.txt b/src/jos3_yoshito_takahashi.egg-info/requires.txt deleted file mode 100644 index 250d96c..0000000 --- a/src/jos3_yoshito_takahashi.egg-info/requires.txt +++ /dev/null @@ -1 +0,0 @@ -numpy==1.19.4 diff --git a/src/jos3_yoshito_takahashi.egg-info/top_level.txt b/src/jos3_yoshito_takahashi.egg-info/top_level.txt deleted file mode 100644 index 7981563..0000000 --- a/src/jos3_yoshito_takahashi.egg-info/top_level.txt +++ /dev/null @@ -1 +0,0 @@ -jos3