Exemplo n.º 1
0
tc.setColorBounds(20,35)

tc.setBackgroundColor((1,1,1))

from_time = "2015-08-24 00:00:00"       # hier Betrachungszeitraum festlegen
to_time = "2015-08-24 23:59:59"

df = pd.read_table(os.path.join(os.environ["HOME"], "tsysblend/examples/temp_kbau_remastered.csv"), delimiter = "\t")
df["Time"]= pd.to_datetime(df["Time"])
df =df.set_index("Time")
datafr = np.round(df[from_time:to_time],1)

dtime = datafr.reset_index()

tc.createLegend((0,15,12),"Legende","°C",elements=7, text_size=0.8)
tc.animateSingleElement((0,-5,16),dtime, "Time", text_size=0.8)
tc.animateSingleElement((0,-5,14),datafr,"KIT Temperature", unit="°C", text_size=0.8)

a= 2
b = 3
c = 0.3

z = 5


# 0.Stock
k0aso = CubeState(datafr, "k0aso", location=(-a,-b,0), scale=(a,b,c), unit="°C")
k0asw = CubeState(datafr, "k0asw", location=(-a,b,0), scale=(a,b,c), unit="°C")
k0ano = CubeState(datafr, "k0ano", location=(a,-b,0), scale=(a,b,c), unit="°C")
k0anw = CubeState(datafr, "k0anw", location=(a,b,0), scale=(a,b,c), unit="°C")
Exemplo n.º 2
0
# This is to be the first example

import bpy
from tsysblend.state import LayerState, CubeState
from mathutils import Vector
from tsysblend.flow import  MassFlow, HeatFlow
import tsysblend.config as tc
import pandas as pd

import pdb

tc.clearScene()

tc.setColorBounds(45,85)
tc.setBackgroundColor((1,1,1))
tc.createLegend((0,11,10.5),"Legende","°C",elements=5)

datafr = pd.read_table(os.path.join(os.environ["HOME"], "tsysblend/examples/storage_ocp_ode.csv"), delimiter = ",", index_col = 0)

# Szene erstellen (Wärmeaustauscher, Tankschichten, Ströme)
T_hx_storage = CubeState(datafr, "T_hx_storage", location=(0,-12,6.3), text_location=(0,-19,6.3), scale=(1,1,2.5), unit="°C")

T_strat_0 = LayerState(datafr, "T_strat_0", location=(0,0,10.5), text_location=(0,2.5,10.4), unit="°C")
T_strat_1 = LayerState(datafr, "T_strat_1", location=(0,0,7.5), text_location=(0,2.5,7.4), unit="°C")
T_strat_2 = LayerState(datafr, "T_strat_2", location=(0,0,4.5), text_location=(0,2.5,4.4), unit="°C")
T_strat_3 = LayerState(datafr, "T_strat_3", location=(0,0,1.5), text_location=(0,2.5,1.4), unit="°C")

medians = [Vector((0, -1.25, 9.5)), Vector((0,-1.25,8.0))]
normals = [Vector((0, 0, -1)), Vector(( 0, 0, 1))]
mdot_strat_0_out = MassFlow(datafr, "mdot_strat_-_0", "T_strat_0","T_strat_1", text_location=(0,1.75,9.5), medians=medians, normals=normals, value=1.2, unit="kg/s")