summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorConstantin Riß <constantin.riss@dre.de>2010-02-11 22:33:14 +0100
committerConstantin Riß <constantin.riss@dre.de>2010-02-11 22:33:14 +0100
commit9952a2ccbeb288cd12d96c405441bef0215d13db (patch)
treee5aa68aa9f5b7af9e306e15b6e53c5f9bf72c3a8
parent3fedb25ca1e56b2975a598a7193b965813ca1434 (diff)
downloadc3d-9952a2ccbeb288cd12d96c405441bef0215d13db.tar
c3d-9952a2ccbeb288cd12d96c405441bef0215d13db.zip
blablaslballbaababllablablalb
-rw-r--r--Temparray.cpp60
1 files changed, 21 insertions, 39 deletions
diff --git a/Temparray.cpp b/Temparray.cpp
index 39edd1b..0d48f44 100644
--- a/Temparray.cpp
+++ b/Temparray.cpp
@@ -258,11 +258,11 @@ void Temparray::calcTemp(){
tau12 = capacity * thermalresistance;
tau21 = capacity2 * thermalresistance;
- temperaturenew(i, j, k, l, m) =
- temperaturenew(i, j, k, l, m) - ((temperatureold(i, j, k, l, m) -
+ temperaturenew(i, j, k, l, 0) =
+ temperaturenew(i, j, k, l, 0) - ((temperatureold(i, j, k, l, 0) -
temperatureold(i, j, k, l, 1))*(1-exp(-(1/tau12))));
temperaturenew(i, j, k, l, 1) =
- temperaturenew(i, j, k, l, 1) + ((temperatureold(i, j, k, l, m) -
+ temperaturenew(i, j, k, l, 1) + ((temperatureold(i, j, k, l, 0) -
temperatureold(i, j, k, l, 1))*(1-exp(-(1/tau21))));
}
else if(m == 1) {
@@ -378,13 +378,13 @@ void Temparray::calcTemp(){
}
}
}
- if(i > 0) {
- width = cubehole(i, j, k, 0).getWidth();
- height = cubehole(i, j, k, 0).getHeight();
- depth = cubehole(i, j, k, 0).getDepth();
- innerwidth = cubehole(i, j, k, 0).getInnerWidth();
- innerdepth = cubehole(i, j, k, 0).getInnerDepth();
+ width = cubehole(i, j, k, 0).getWidth();
+ height = cubehole(i, j, k, 0).getHeight();
+ depth = cubehole(i, j, k, 0).getDepth();
+ innerwidth = cubehole(i, j, k, 0).getInnerWidth();
+ innerdepth = cubehole(i, j, k, 0).getInnerDepth();
+ if(i > 0) {
area = (((depth + innerdepth)/2)*height) / 0.9 * meterperunit;
thermalresistance = ((width - innerwidth)/2) / 0.9 * meterperunit /
@@ -405,12 +405,6 @@ void Temparray::calcTemp(){
int h=1;
if(i == sx-1) h=3;
- width = cubehole(i, j, k, 0).getWidth();
- height = cubehole(i, j, k, 0).getHeight();
- depth = cubehole(i, j, k, 0).getDepth();
- innerwidth = cubehole(i, j, k, 0).getInnerWidth();
- innerdepth = cubehole(i, j, k, 0).getInnerDepth();
-
area = (((depth + innerdepth)/2)*height) / 0.9 * meterperunit;
thermalresistance = (3 + (width - innerwidth)/4) / 0.9 * meterperunit /
@@ -425,38 +419,26 @@ void Temparray::calcTemp(){
*(1-exp(-(1/tau12))));
}
if(k > 0) {
- width = cubehole(i, j, k, 0).getWidth();
- height = cubehole(i, j, k, 0).getHeight();
- depth = cubehole(i, j, k, 0).getDepth();
- innerwidth = cubehole(i, j, k, 0).getInnerWidth();
- innerdepth = cubehole(i, j, k, 0).getInnerDepth();
+ area = (((width + innerwidth)/2)*height) / 0.9 * meterperunit;
- area = (((width + innerwidth)/2)*height) / 0.9 * meterperunit;
+ thermalresistance = ((depth - innerdepth)/2) / 0.9 * meterperunit /
+ (conductivity * area);
- thermalresistance = ((depth - innerdepth)/2) / 0.9 * meterperunit /
- (conductivity * area);
+ capacity = specificcapacity *((((width + innerwidth)/2)*((depth - innerdepth)/2)*
+ height)/0.9*meterperunit);
+ tau12 = capacity * thermalresistance;
- capacity = specificcapacity *((((depth - innerdepth)/2)*((width + innerwidth)/2)*
- height)/0.9*meterperunit);
- tau12 = capacity * thermalresistance;
-
- temperaturenew(i, j, k, 0, 2) =
- temperaturenew(i, j, k, 0, 2) - ((temperatureold(i, j, k, 0, 2) -
- temperatureold(i-1, j, k-1, 0, 0))*(1-exp(-(1/tau12))));
- temperaturenew(i, j, k-1, 0, 0) =
- temperaturenew(i, j, k-1, 0, 0) + ((temperatureold(i, j, k, 0, 2) -
- temperatureold(i, j, k-1, 0, 0))*(1-exp(-(1/tau12))));
+ temperaturenew(i, j, k, 0, 2) =
+ temperaturenew(i, j, k, 0, 2) - ((temperatureold(i, j, k, 0, 2) -
+ temperatureold(i, j, k-1, 0, 0))*(1-exp(-(1/tau12))));
+ temperaturenew(i, j, k-1, 0, 0) =
+ temperaturenew(i, j, k-1, 0, 0) + ((temperatureold(i, j, k, 0, 0) -
+ temperatureold(i, j, k-1, 0, 0))*(1-exp(-(1/tau12))));
}
if(k == 0 || k == sz-1) {
int h=2;
if(k == sz-1) h=0;
- width = cubehole(i, j, k, 0).getWidth();
- height = cubehole(i, j, k, 0).getHeight();
- depth = cubehole(i, j, k, 0).getDepth();
- innerwidth = cubehole(i, j, k, 0).getInnerWidth();
- innerdepth = cubehole(i, j, k, 0).getInnerDepth();
-
area = (((width + innerwidth)/2)*height) / 0.9 * meterperunit;
thermalresistance = (3 + (depth - innerdepth)/4) / 0.9 * meterperunit /