Example #1
0
def validation0():
    '''
    通気層を有する壁体の熱貫流率の検証
    通気風量0での検証
    :return:
    '''

    # 固定値の設定
    h_out = global_number.get_h_out()
    h_in = global_number.get_h_in()

    # パラメータの設定
    theta_e = 0.0
    theta_r = 20.0
    j_surf = 500.0
    a_surf = 0.8
    c_1 = 5.0
    c_2 = 0.5

    parms = vw.Parameters(theta_e=theta_e,
                          theta_r=theta_r,
                          J_surf=j_surf,
                          a_surf=a_surf,
                          C_1=c_1,
                          C_2=c_2,
                          l_h=3.5,
                          l_w=0.455,
                          l_d=0.05,
                          angle=90.0,
                          v_a=0.0,
                          l_s=100.,
                          emissivity_1=0.9,
                          emissivity_2=0.9)

    # 通気層の状態値を取得
    status = vw.get_wall_status_values(parms, h_out, h_in)

    # 温度状態値の出力
    print('各部温度')
    print(status.matrix_temp)
    print('h_cv= ', status.h_cv)
    print('h_rv= ', status.h_rv)

    # 熱流の出力
    print('屋外表面熱流')
    print(
        vw.get_heat_flow_0(matrix_temp=status.matrix_temp,
                           param=parms,
                           h_out=h_out))

    # 外装材伝導熱流の出力
    print('外装材伝導熱流')
    print(vw.get_heat_flow_1(matrix_temp=status.matrix_temp, param=parms))

    # 通気層熱伝達
    print('通気層熱伝達')
    print(
        vw.get_heat_flow_2(matrix_temp=status.matrix_temp,
                           h_cv=status.h_cv,
                           h_rv=status.h_rv))

    # 通気層排気熱量
    print('通気層からの排気熱量')
    print(
        vw.get_heat_flow_exhaust(matrix_temp=status.matrix_temp,
                                 param=parms,
                                 theta_as_in=parms.theta_e,
                                 h_cv=status.h_cv))

    # 通気層内表面から通気層空気への熱流
    print('通気層内表面から通気層空気への熱流')
    print(
        vw.get_heat_flow_convect_vent_layer(matrix_temp=status.matrix_temp,
                                            param=parms,
                                            h_cv=status.h_cv))

    # 断熱材+内装材の伝導熱量
    print('断熱材+内装材の伝導熱量')
    print(vw.get_heat_flow_3(matrix_temp=status.matrix_temp, param=parms))

    # 室内表面熱流の計算
    print('室内表面熱流')
    q = vw.get_heat_flow_4(matrix_temp=status.matrix_temp,
                           param=parms,
                           h_in=h_in)
    print(q)

    # 通気層を考慮した熱貫流率
    h_o = 25.0
    theta_sat = theta_e + a_surf * j_surf / h_o
    Ue = q / (theta_sat - theta_r)
    print('Ue= ', Ue)

    # 通気層から室内までの熱貫流率
    h_i = 9.0
    h_as_s = 9.1  # 通気層を有する壁体の省エネ基準における屋外側熱伝達率
    Us = 1.0 / (1.0 / h_as_s + 1.0 / c_2 + 1.0 / h_i)
    # 通気層から室内までの熱貫流率(屋外側熱伝達率は省エネ基準の値)
    Usd = 1.0 / (1.0 / (status.h_cv + status.h_rv) + 1.0 / c_2 + 1.0 / h_i)
    # 通気層から室内までの熱貫流率(屋外側熱伝達率はここで計算した値)
    print('Us= ', Us, 'Usd= ', Usd)

    # Usdを用いて計算した室内側熱流
    theta_as_e = (status.matrix_temp[4] * status.h_cv + status.matrix_temp[1] * status.h_rv) \
                / (status.h_cv + status.h_rv)
    q_usd = Usd * (theta_as_e - theta_r)
    print('q_usd= ', q_usd)
    Ue_calc = Usd * (theta_as_e - theta_r) / (theta_sat - theta_r)
    print('UsからUeを計算', Ue_calc)
    eta_e = Ue_calc * a_surf / h_o
    print('eta_e= ', eta_e)
    print('Usから熱流を計算', Ue * (theta_e - theta_r) + eta_e * j_surf)

    # 層構成から計算した熱貫流率
    Ue_from_layer = 1.0 / (1.0 / h_o + 1.0 / h_i + 1.0 / c_1 + 1.0 / c_2 +
                           1.0 / (status.h_cv / 2.0 + status.h_rv))
    print('Ue_from_layer= ', Ue_from_layer)
Example #2
0
def get_wall_status_data_by_detailed_calculation(
        calc_mode_h_cv: str, calc_mode_h_rv: str) -> pd.DataFrame:
    """
    通気層を有する壁体の総当たりパラメータを取得し、各ケースの計算結果を保有するDataFrameを作成する

    :param calc_mode_h_cv: 対流熱伝達率の計算モード
    :param calc_mode_h_rv: 放射熱伝達率の計算モード
    :return: DataFrame
    """

    # パラメータの総当たりリストを作成する
    parameter_name = [
        'theta_e', 'theta_r', 'j_surf', 'a_surf', 'C_1', 'C_2', 'l_h', 'l_w',
        'l_d', 'angle', 'v_a', 'l_s', 'emissivity_1', 'emissivity_2'
    ]
    df = pd.DataFrame(get_parameter_list(), columns=parameter_name)

    # 固定値の設定
    h_out = global_number.get_h_out()
    h_in = global_number.get_h_in()

    # 計算結果格納用配列を用意
    theta_sat = []  # 相当外気温度[℃]
    theta_out_surf = []  # 外気側表面温度[℃]
    theta_1_surf = []  # 通気層に面する面1の表面温度[℃]
    theta_2_surf = []  # 通気層に面する面1の表面温度[℃]
    theta_in_surf = []  # 室内側表面温度[℃]
    theta_as_ave = []  # 通気層の平均温度[℃]
    effective_emissivity = []  # 有効放射率[-]
    h_cv = []  # 通気層の対流熱伝達率[W/(m2・K)]
    h_rv = []  # 通気層の放射熱伝達率[W/(m2・K)]
    theta_as_e = []  # 通気層の等価温度[℃]
    q_room_side = []  # 室内表面熱流[W/m2]
    k_e = []  # 通気層を有する壁体の相当熱貫流率を求めるための補正係数[-]
    heat_balance_0 = []  # 外気側表面の熱収支収支[W/m2]
    heat_balance_1 = []  # 通気層に面する面1の熱収支[W/m2]
    heat_balance_2 = []  # 通気層に面する面2の熱収支[W/m2]
    heat_balance_3 = []  # 室内側表面の熱収支[W/m2]
    heat_balance_4 = []  # 通気層内空気の熱収支[W/m2]
    is_optimize_succeed = []  # 最適化が正常に終了したかどうか
    optimize_message = []  # 最適化の終了メッセージ

    # エラーログ出力用の設定
    log = Log()
    saved_handler = np.seterrcall(log)

    with np.errstate(all='log'):  # withスコープ内でエラーが出た場合、Logを出力する
        for row in df.itertuples():
            print(row[0])
            # パラメータを設定
            parms = (vw.Parameters(theta_e=row.theta_e,
                                   theta_r=row.theta_r,
                                   J_surf=row.j_surf,
                                   a_surf=row.a_surf,
                                   C_1=row.C_1,
                                   C_2=row.C_2,
                                   l_h=row.l_h,
                                   l_w=row.l_w,
                                   l_d=row.l_d,
                                   angle=row.angle,
                                   v_a=row.v_a,
                                   l_s=row.l_s,
                                   emissivity_1=row.emissivity_1,
                                   emissivity_2=row.emissivity_2))

            # 通気層の状態値を取得
            status = vw.get_wall_status_values(parms, calc_mode_h_cv,
                                               calc_mode_h_rv, h_out, h_in)
            theta_out_surf.append(status.matrix_temp[0])
            theta_1_surf.append(status.matrix_temp[1])
            theta_2_surf.append(status.matrix_temp[2])
            theta_in_surf.append(status.matrix_temp[3])
            theta_as_ave.append(status.matrix_temp[4])
            effective_emissivity.append(
                htc.effective_emissivity_parallel(
                    emissivity_1=row.emissivity_1,
                    emissivity_2=row.emissivity_2))
            h_cv.append(status.h_cv)
            h_rv.append(status.h_rv)

            # 通気層の等価温度を取得
            theta_as_e_buf = epf.get_theata_as_e(status.matrix_temp[4],
                                                 status.matrix_temp[1],
                                                 status.h_cv, status.h_rv)
            theta_as_e.append(theta_as_e_buf)

            # 相当外気温度を計算
            theta_sat_buf = epf.get_theta_SAT(row.theta_e, row.a_surf,
                                              row.j_surf, h_out)
            theta_sat.append(theta_sat_buf)

            # 通気層を有する壁体の相当熱貫流率を求めるための補正係数を取得
            k_e.append(epf.get_k_e(theta_as_e_buf, row.theta_r, theta_sat_buf))

            # 室内側表面熱流を計算
            r_i_buf = epf.get_r_i(C_2=row.C_2)
            q_room_side.append(
                epf.get_heat_flow_room_side_by_vent_layer_heat_resistance(
                    r_i=r_i_buf,
                    theta_2=status.matrix_temp[2],
                    theta_r=row.theta_r))

            # 各層の熱収支収支を取得
            heat_balance_0.append(status.matrix_heat_balance[0])
            heat_balance_1.append(status.matrix_heat_balance[1])
            heat_balance_2.append(status.matrix_heat_balance[2])
            heat_balance_3.append(status.matrix_heat_balance[3])
            heat_balance_4.append(status.matrix_heat_balance[4])

            # 最適化に関する情報を取得
            is_optimize_succeed.append(status.is_optimize_succeed)
            optimize_message.append(status.optimize_message)

    # 計算結果をDataFrameに追加
    df['theta_sat'] = theta_sat
    df['theta_out_surf'] = theta_out_surf
    df['theta_1_surf'] = theta_1_surf
    df['theta_2_surf'] = theta_2_surf
    df['theta_in_surf'] = theta_in_surf
    df['theta_as_ave'] = theta_as_ave
    df['effective_emissivity'] = effective_emissivity
    df['h_cv'] = h_cv
    df['h_rv'] = h_rv
    df['theta_as_e'] = theta_as_e
    df['k_e'] = k_e
    df['q_room_side'] = q_room_side
    df['heat_balance_0'] = heat_balance_0
    df['heat_balance_1'] = heat_balance_1
    df['heat_balance_2'] = heat_balance_2
    df['heat_balance_3'] = heat_balance_3
    df['heat_balance_4'] = heat_balance_4
    df['is_optimize_succeed'] = is_optimize_succeed
    df['optimize_message'] = optimize_message

    return df
Example #3
0
def get_wall_status_data_by_simplified_calculation_no_04() -> pd.DataFrame:
    """
    通気層を有する壁体の総当たりパラメータを取得し、簡易計算法案No.4(簡易計算法案No.3をさらに簡略化)による計算結果を保有するDataFrameを作成する

    :param: なし
    :return: DataFrame
    """

    # パラメータの総当たりリストを作成する
    parameter_name = [
        'theta_e', 'theta_r', 'j_surf', 'a_surf', 'C_1', 'C_2', 'l_h', 'l_w',
        'l_d', 'angle', 'v_a', 'l_s', 'emissivity_1', 'emissivity_2'
    ]
    df = pd.DataFrame(get_parameter_list(), columns=parameter_name)

    # 固定値の設定
    h_out = global_number.get_h_out()

    # 計算結果格納用配列を用意
    theta_sat = []  # 相当外気温度[℃]
    h_cv = []  # 通気層の対流熱伝達率[W/(m2・K)]
    h_rv = []  # 通気層の放射熱伝達率[W/(m2・K)]
    u_dash = []  # 修正熱貫流率[W/(m2・K)]
    eta_dash = []  # 修正日射熱取得率[-]
    q_room_side = []  # 室内表面熱流[W/m2]

    # エラーログ出力用の設定
    log = Log()
    saved_handler = np.seterrcall(log)

    with np.errstate(all='log'):  # withスコープ内でエラーが出た場合、Logを出力する
        for row in df.itertuples():
            print(row[0])
            # パラメータを設定
            parms = (vw.Parameters(theta_e=row.theta_e,
                                   theta_r=row.theta_r,
                                   J_surf=row.j_surf,
                                   a_surf=row.a_surf,
                                   C_1=row.C_1,
                                   C_2=row.C_2,
                                   l_h=row.l_h,
                                   l_w=row.l_w,
                                   l_d=row.l_d,
                                   angle=row.angle,
                                   v_a=row.v_a,
                                   l_s=row.l_s,
                                   emissivity_1=row.emissivity_1,
                                   emissivity_2=row.emissivity_2))

            # 相当外気温度を計算
            theta_sat.append(
                epf.get_theta_SAT(row.theta_e, row.a_surf, row.j_surf, h_out))

            # 対流熱伝達率、放射熱伝達率、修正熱貫流率、修正日射熱取得率、室内側表面熱流を計算
            h_cv_buf, h_rv_buf, u_dash_buf, eta_dash_buf, q_room_side_buf \
                = vws.get_vent_wall_performance_factor_by_simplified_calculation_no_04(parm=parms, h_out=h_out)

            # 配列に格納
            h_cv.append(h_cv_buf)
            h_rv.append(h_rv_buf)
            u_dash.append(u_dash_buf)
            eta_dash.append(eta_dash_buf)
            q_room_side.append(q_room_side_buf)

    # 計算結果をDataFrameに追加
    df['theta_sat'] = theta_sat
    df['h_cv'] = h_cv
    df['h_rv'] = h_rv
    df['u_dash'] = u_dash
    df['eta_dash'] = eta_dash
    df['q_room_side'] = q_room_side

    return df
Example #4
0
def get_wall_status_data_by_simplified_calculation_no_02() -> pd.DataFrame:
    """
    通気層を有する壁体の総当たりパラメータを取得し、簡易計算法案No.2(簡易式)による計算結果を保有するDataFrameを作成する

    :param: なし
    :return: DataFrame
    """

    # パラメータの総当たりリストを作成する
    parameter_name = [
        'theta_e', 'theta_r', 'j_surf', 'a_surf', 'C_1', 'C_2', 'l_h', 'l_w',
        'l_d', 'angle', 'v_a', 'l_s', 'emissivity_1', 'emissivity_2'
    ]
    df = pd.DataFrame(get_parameter_list(), columns=parameter_name)

    # 固定値の設定
    h_out = global_number.get_h_out()
    h_in = global_number.get_h_in()

    # 計算結果格納用配列を用意
    theta_sat = []  # 相当外気温度[℃]
    theta_as_ave = []  # 通気層の平均温度[℃]
    effective_emissivity = []  # 有効放射率[-]
    h_cv = []  # 通気層の対流熱伝達率[W/(m2・K)]
    h_rv = []  # 通気層の放射熱伝達率[W/(m2・K)]
    u_o = []  # 室外側から通気層までの熱貫流率[W/(m2・K)]
    u_i = []  # 室内側から通気層までの熱貫流率[W/(m2・K)]
    q_room_side = []  # 室内表面熱流[W/m2]

    # エラーログ出力用の設定
    log = Log()
    saved_handler = np.seterrcall(log)

    with np.errstate(all='log'):  # withスコープ内でエラーが出た場合、Logを出力する
        for row in df.itertuples():
            print(row[0])
            # パラメータを設定
            parms = (vw.Parameters(theta_e=row.theta_e,
                                   theta_r=row.theta_r,
                                   J_surf=row.j_surf,
                                   a_surf=row.a_surf,
                                   C_1=row.C_1,
                                   C_2=row.C_2,
                                   l_h=row.l_h,
                                   l_w=row.l_w,
                                   l_d=row.l_d,
                                   angle=row.angle,
                                   v_a=row.v_a,
                                   l_s=row.l_s,
                                   emissivity_1=row.emissivity_1,
                                   emissivity_2=row.emissivity_2))

            # 対流熱伝達率、放射熱伝達率を計算
            effective_emissivity_buf = htc.effective_emissivity_parallel(
                emissivity_1=row.emissivity_1, emissivity_2=row.emissivity_2)
            if parms.theta_r == 20.0:
                h_cv_buf = htc.convective_heat_transfer_coefficient_simplified_winter(
                    v_a=row.v_a)
                h_rv_buf = htc.radiative_heat_transfer_coefficient_simplified_winter(
                    effective_emissivity=effective_emissivity_buf)
            else:
                h_cv_buf = htc.convective_heat_transfer_coefficient_simplified_summer(
                    v_a=row.v_a)
                h_rv_buf = htc.radiative_heat_transfer_coefficient_simplified_summer(
                    effective_emissivity=effective_emissivity_buf)

            effective_emissivity.append(effective_emissivity_buf)
            h_cv.append(h_cv_buf)
            h_rv.append(h_rv_buf)

            # 通気層平均温度を取得
            theta_as_ave_buf, u_o_buf, u_i_buf = vws.get_vent_wall_temperature_by_simplified_calculation_no_02(
                parm=parms, h_out=h_out)
            theta_as_ave.append(theta_as_ave_buf)

            # 相当外気温度を計算
            theta_sat.append(
                epf.get_theta_SAT(row.theta_e, row.a_surf, row.j_surf, h_out))

            # 室外側から通気層までの熱貫流率、室内側から通気層までの熱貫流率
            u_o.append(u_o_buf)
            u_i.append(u_i_buf)

            # 室内側表面熱流を計算
            q_room_side.append(
                epf.get_heat_flow_room_side_by_vent_layer_heat_transfer_coeff(
                    u_i=u_i_buf,
                    theta_as_ave=theta_as_ave_buf,
                    theta_r=row.theta_r))

    # 計算結果をDataFrameに追加
    df['theta_sat'] = theta_sat
    df['theta_as_ave'] = theta_as_ave
    df['effective_emissivity'] = effective_emissivity
    df['h_cv'] = h_cv
    df['h_rv'] = h_rv
    df['u_o'] = u_o
    df['u_i'] = u_i
    df['q_room_side'] = q_room_side

    return df
Example #5
0
def get_wall_status_data_by_simplified_calculation_no_01() -> pd.DataFrame:
    """
    通気層を有する壁体の総当たりパラメータを取得し、簡易計算法案No.1(簡易版の行列式)による計算結果を保有するDataFrameを作成する

    :param: なし
    :return: DataFrame
    """

    # パラメータの総当たりリストを作成する
    parameter_name = [
        'theta_e', 'theta_r', 'j_surf', 'a_surf', 'C_1', 'C_2', 'l_h', 'l_w',
        'l_d', 'angle', 'v_a', 'l_s', 'emissivity_1', 'emissivity_2'
    ]
    df = pd.DataFrame(get_parameter_list(), columns=parameter_name)

    # 固定値の設定
    h_out = global_number.get_h_out()

    # 計算結果格納用配列を用意
    theta_sat = []  # 相当外気温度[℃]
    theta_1_surf = []  # 通気層に面する面1の表面温度[℃]
    theta_2_surf = []  # 通気層に面する面1の表面温度[℃]]
    theta_as_ave = []  # 通気層の平均温度[℃]
    effective_emissivity = []  # 有効放射率[-]
    h_cv = []  # 通気層の対流熱伝達率[W/(m2・K)]
    h_rv = []  # 通気層の放射熱伝達率[W/(m2・K)]
    q_room_side = []  # 室内表面熱流[W/m2]

    # エラーログ出力用の設定
    log = Log()
    saved_handler = np.seterrcall(log)

    with np.errstate(all='log'):  # withスコープ内でエラーが出た場合、Logを出力する
        for row in df.itertuples():
            print(row[0])
            # パラメータを設定
            parms = (vw.Parameters(theta_e=row.theta_e,
                                   theta_r=row.theta_r,
                                   J_surf=row.j_surf,
                                   a_surf=row.a_surf,
                                   C_1=row.C_1,
                                   C_2=row.C_2,
                                   l_h=row.l_h,
                                   l_w=row.l_w,
                                   l_d=row.l_d,
                                   angle=row.angle,
                                   v_a=row.v_a,
                                   l_s=row.l_s,
                                   emissivity_1=row.emissivity_1,
                                   emissivity_2=row.emissivity_2))

            # 通気層の状態値を取得
            temps, h_cv_buf, h_rv_buf, r_i_buf = vws.get_vent_wall_temperature_by_simplified_calculation_no_01(
                parm=parms, h_out=h_out)
            theta_1_surf.append(temps[0])
            theta_2_surf.append(temps[2])
            theta_as_ave.append(temps[1])
            effective_emissivity.append(
                htc.effective_emissivity_parallel(
                    emissivity_1=row.emissivity_1,
                    emissivity_2=row.emissivity_2))
            h_cv.append(h_cv_buf)
            h_rv.append(h_rv_buf)

            # 相当外気温度を計算
            theta_sat_buf = epf.get_theta_SAT(theta_e=row.theta_e,
                                              a_surf=row.a_surf,
                                              j_surf=row.j_surf,
                                              h_out=h_out)
            theta_sat.append(theta_sat_buf)

            # 室内側表面熱流を計算
            q_room_side.append(
                epf.get_heat_flow_room_side_by_vent_layer_heat_resistance(
                    r_i=r_i_buf, theta_2=temps[2], theta_r=row.theta_r))

    # 計算結果をDataFrameに追加
    df['theta_sat'] = theta_sat
    df['theta_1_surf'] = theta_1_surf
    df['theta_2_surf'] = theta_2_surf
    df['theta_as_ave'] = theta_as_ave
    df['effective_emissivity'] = effective_emissivity
    df['h_cv'] = h_cv
    df['h_rv'] = h_rv
    df['q_room_side'] = q_room_side

    return df
def calc_ventilation_wall_surface_temperatures(angle: float, theta_e: float,
                                               j_surf: float,
                                               season: str) -> tuple:
    """
    通気層内の面1、面2の表面温度を計算する関数

    :param angle:       通気層の傾斜角, degree
    :param theta_e:     外気温度, degree
    :param j_surf:      日射量, W/m2
    :param season:      季節('winter' or 'summer')
    :return: 通気層内の面1、面2の表面温度, degree
    """

    # 固定値の設定
    h_out = global_number.get_h_out()
    h_in = global_number.get_h_in()

    # 対流熱伝達、放射熱伝達の計算方法を指定
    calc_mode_h_cv = 'detailed'
    calc_mode_h_rv = 'detailed'

    # パラメータを設定
    parm = vw.Parameters(
        theta_e=theta_e,
        theta_r=20.0 if season == 'winter' else 27.0,
        J_surf=j_surf,
        a_surf=np.array([0.0, np.median([0.0, 1.0]), 1.0], dtype=float).mean(),
        C_1=np.array([0.5, np.median([0.5, 100.0]), 100.0],
                     dtype=float).mean(),
        C_2=np.array([0.1, np.median([0.1, 5.0]), 5.0], dtype=float).mean(),
        l_h=np.array([3.0, np.median([3.0, 12.0]), 12.0], dtype=float).mean(),
        l_w=np.array([0.05, np.median([0.05, 10.0]), 10.0],
                     dtype=float).mean(),
        l_d=np.array([0.05, np.median([0.05, 0.3]), 0.3], dtype=float).mean(),
        angle=angle,
        v_a=np.array([0.0, np.median([0.0, 1.0]), 1.0], dtype=float).mean(),
        l_s=0.45,
        emissivity_1=0.9,
        emissivity_2=np.array([0.1, np.median([0.1, 0.9]), 0.9],
                              dtype=float).mean())

    # 通気層の状態値を取得
    status = vw.get_wall_status_values(parm, calc_mode_h_cv, calc_mode_h_rv,
                                       h_out, h_in)

    # 屋外表面熱流
    q_outer_flow = vw.get_heat_flow_0(matrix_temp=status.matrix_temp,
                                      param=parm,
                                      h_out=h_out)

    # 通気層からの排気熱量
    q_exhaust_flow = vw.get_heat_flow_exhaust(matrix_temp=status.matrix_temp,
                                              param=parm,
                                              theta_as_in=parm.theta_e,
                                              h_cv=status.h_cv)

    # 室内表面熱流
    q_inner_flow = vw.get_heat_flow_4(matrix_temp=status.matrix_temp,
                                      param=parm,
                                      h_in=h_in)

    return status, q_outer_flow, q_exhaust_flow, q_inner_flow