# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

import numpy as np
import matplotlib.pyplot as plt

# +
# create constant producer profile
QFlowNom = [3.0e5, 1.2e5, 1.3e5, 1.3e5]
nProf = len(QFlowNom)
names = ['D85', 'D80', 'D79', 'D82']
time = np.linspace(0, 31536000, num=int(31536000/3600)+1) #stundenwerte
header = '#1 \ndouble table({},2) \n# time[s] \t Q_flow[W]'.format(len(time))

for i in range(nProf):
    data = np.array([time, np.full(len(time), QFlowNom[i])]).T
    np.savetxt('{}.txt'.format(names[i]), data, header=header, delimiter='\t', comments='')


# +
# create constant producer profile with 0.5 nominal load
QFlowNom = 0.5*np.array([3.0e5, 1.2e5, 1.3e5, 1.3e5])
nProf = len(QFlowNom)
names = ['D85_50', 'D80_50', 'D79_50', 'D82_50']
time = np.linspace(0, 31536000, num=int(31536000/3600)+1) #stundenwerte
header = '#1 \ndouble table({},2) \n# time[s] \t Q_flow[W]'.format(len(time))

for i in range(nProf):
    data = np.array([time, np.full(len(time), QFlowNom[i])]).T
    np.savetxt('{}.txt'.format(names[i]), data, header=header, delimiter='\t', comments='')


# +
# create constant producer profile with 0.25 nominal load
QFlowNom = 0.25*np.array([3.0e5, 1.2e5, 1.3e5, 1.3e5])
nProf = len(QFlowNom)
names = ['D85_25', 'D80_25', 'D79_25', 'D82_25']
time = np.linspace(0, 31536000, num=int(31536000/3600)+1) #stundenwerte
header = '#1 \ndouble table({},2) \n# time[s] \t Q_flow[W]'.format(len(time))

for i in range(nProf):
    data = np.array([time, np.full(len(time), QFlowNom[i])]).T
    np.savetxt('{}.txt'.format(names[i]), data, header=header, delimiter='\t', comments='')
# -



StarcoderdataJupyterScriptsDedupFiltered