sys.path.append(os.path.join(os.environ["HOME"], "tsysblend"))

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 numpy as np

import pdb


tc.clearScene()

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)
Beispiel #2
0
sys.path.append(os.path.join(os.environ["HOME"], "tsysblend"))

# 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))]