From 22b2912bbdd637c1a206b30f7d02c8e560ff9850 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Constantin=20Ri=C3=9F?= Date: Wed, 10 Feb 2010 22:30:18 +0100 Subject: =?UTF-8?q?ver=C3=A4nderungen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Temparray.cpp | 39 ++++++++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 9 deletions(-) (limited to 'Temparray.cpp') diff --git a/Temparray.cpp b/Temparray.cpp index 17889ae..115d199 100644 --- a/Temparray.cpp +++ b/Temparray.cpp @@ -240,7 +240,7 @@ void Temparray::calcTemp(){ temperatureold(i, j-1, k, l, m))*(1-exp(-(1/tau21)))); } - /*if(m == 0) { + if(m == 0) { area = (sqrt(pow((depth-innerdepth)/2, 2) + pow((width-innerwidth)/2, 2))* height) / 0.9 * meterperunit; @@ -331,8 +331,8 @@ void Temparray::calcTemp(){ temperaturenew(i, j, k, l, 0) = temperaturenew(i, j, k, l, 0) + ((temperatureold(i, j, k, l, 3) - temperatureold(i, j, k, l, 0))*(1-exp(-(1/tau21)))); - }*/ - if(j == sy-1) { + } + if(j == 0) { if(m % 2 == 0)area = (((depth - innerdepth)/2)*((width + innerwidth)/2)) / 0.9 * meterperunit; if(m % 2 == 1)area = (((width - innerwidth)/2)*((depth + innerdepth)/2)) @@ -349,8 +349,29 @@ void Temparray::calcTemp(){ tau12 = capacity * thermalresistance; - temperaturenew(i, j, k, 0, m) = - temperaturenew(i, j, k, 0, m) - ((temperatureold(i, j, k, 0, m) - earthtemp) + temperaturenew(i, j, k, l, m) = + temperaturenew(i, j, k, l, m) - ((temperatureold(i, j, k, l, m) - earthtemp) + *(1-exp(-(1/tau12)))); + } + if(j == sy-1) { + if(m % 2 == 0)area = (((depth - innerdepth)/2)*((width + innerwidth)/2)) + / 0.9 * meterperunit; + if(m % 2 == 1)area = (((width - innerwidth)/2)*((depth + innerdepth)/2)) + / 0.9 * meterperunit; + + thermalresistance = (3 + height/2) / 0.9 * meterperunit /(conductivity * area); + + if(m % 2 == 0)capacity = specificcapacity *((((depth - innerdepth)/2)* + ((width + innerwidth)/2)*height) + / 0.9 * meterperunit); + if(m % 2 == 1)capacity = specificcapacity *((((width - innerwidth)/2)* + ((depth + innerdepth)/2)*height) + / 0.9 * meterperunit); + + tau12 = capacity * thermalresistance; + + temperaturenew(i, j, k, l, m) = + temperaturenew(i, j, k, l, m) - ((temperatureold(i, j, k, l, m) - basementtemp) *(1-exp(-(1/tau12)))); } } @@ -379,8 +400,8 @@ void Temparray::calcTemp(){ temperatureold(i-1, j, k, 0, 3))*(1-exp(-(1/tau12)))); } if (i == 0 || i == sx-1) { - int h=3; - if(i == sx-1) h=1; + int h=1; + if(i == sx-1) h=3; width = cubehole(i, j, k, 0).getWidth(); height = cubehole(i, j, k, 0).getHeight(); @@ -425,8 +446,8 @@ void Temparray::calcTemp(){ temperatureold(i, j, k-1, 0, 0))*(1-exp(-(1/tau12)))); } if(k == 0 || k == sz-1) { - int h=0; - if(i == sz-1) h=2; + int h=2; + if(k == sz-1) h=0; width = cubehole(i, j, k, 0).getWidth(); height = cubehole(i, j, k, 0).getHeight(); -- cgit v1.2.3