fixed subdomain indices, CHANGED thermalCondicutivity of ceramic
This commit is contained in:
parent
e458b93b28
commit
4c5aa92fdd
4 changed files with 5384 additions and 5388 deletions
|
|
@ -428,12 +428,13 @@ void FEM_Matrix::CalculateLaplace_mult(vector<double> &f)
|
|||
|
||||
double FEM_Matrix::ThermalConductivity(const int subdomain)
|
||||
{
|
||||
// source: https://www.engineeringtoolbox.com/thermal-conductivity-d_429.html
|
||||
double lambda = 0.0;
|
||||
switch (subdomain)
|
||||
{
|
||||
// ceramic mug
|
||||
case 0:
|
||||
lambda = 4.0; // anything from 1 to 4
|
||||
lambda = 6.0; // anything from 1 to 4
|
||||
break;
|
||||
|
||||
// water
|
||||
|
|
@ -447,7 +448,7 @@ double FEM_Matrix::ThermalConductivity(const int subdomain)
|
|||
break;
|
||||
|
||||
default:
|
||||
lambda = 1.0;
|
||||
assert(false && "BAD subdomain");
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -456,6 +457,7 @@ double FEM_Matrix::ThermalConductivity(const int subdomain)
|
|||
|
||||
double FEM_Matrix::VolumetricHeatCapacity(const int subdomain)
|
||||
{
|
||||
// source? https://en.wikipedia.org/wiki/Table_of_specific_heat_capacities
|
||||
double c = 0.0;
|
||||
switch (subdomain)
|
||||
{
|
||||
|
|
@ -465,8 +467,8 @@ double FEM_Matrix::VolumetricHeatCapacity(const int subdomain)
|
|||
break;
|
||||
|
||||
// water
|
||||
case 1:
|
||||
c = 4.184 * 1e6;
|
||||
case 1:
|
||||
c = 4.184 * 1e6;
|
||||
break;
|
||||
|
||||
// air
|
||||
|
|
@ -475,7 +477,7 @@ double FEM_Matrix::VolumetricHeatCapacity(const int subdomain)
|
|||
break;
|
||||
|
||||
default:
|
||||
c = 1.0;
|
||||
assert(false && "BAD subdomain");
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -630,13 +632,13 @@ void FEM_Matrix::ApplyRobinBC_mult(std::vector<double> &f, const double u_out)
|
|||
int const subdomain = RobinEdgesSubdomains[i];
|
||||
double const alpha = Heat_transfer_coefficient(subdomain);
|
||||
|
||||
//int const EdgeNumber = RobinEdges[i];
|
||||
int const EdgeNumber = RobinEdges[i];
|
||||
|
||||
int const EdgeNode1 = RobinEdgeNodes[2*i];
|
||||
int const EdgeNode2 = RobinEdgeNodes[2*i + 1];
|
||||
|
||||
//cout << "Edge number " << EdgeNumber << ", subdomain: " << subdomain << " ";
|
||||
//cout << "Node1: " << EdgeNode1 << " Node2: " << EdgeNode2 << " " << endl;
|
||||
cout << "Edge number " << EdgeNumber << ", subdomain: " << subdomain << " ";
|
||||
cout << "Node1: " << EdgeNode1 << " Node2: " << EdgeNode2 << " " << endl;
|
||||
|
||||
double x_1 = Coordinates[2*EdgeNode1];
|
||||
double y_1 = Coordinates[2*EdgeNode1 + 1];
|
||||
|
|
@ -666,35 +668,25 @@ void FEM_Matrix::ApplyRobinBC_mult(std::vector<double> &f, const double u_out)
|
|||
return;
|
||||
}
|
||||
|
||||
// source: https://www.engineeringtoolbox.com/overall-heat-transfer-coefficient-d_434.html
|
||||
double FEM_Matrix::Heat_transfer_coefficient(const int subdomain)
|
||||
{
|
||||
int matlab_sd_index = subdomain - 1;
|
||||
double alpha = 0.0;
|
||||
|
||||
switch (matlab_sd_index)
|
||||
switch (subdomain)
|
||||
{
|
||||
// outside
|
||||
// ceramic to air
|
||||
case 0:
|
||||
alpha = 10.0;
|
||||
break;
|
||||
|
||||
// ceramic
|
||||
case 1:
|
||||
alpha = 1.0;
|
||||
break;
|
||||
|
||||
// water
|
||||
// air to air (Free Convection Gas - Free Convection Gas : U = 1 - 2 W/m2K (typical window, room to outside air through glass))
|
||||
case 2:
|
||||
alpha = 500.0;
|
||||
break;
|
||||
|
||||
// air
|
||||
case 3:
|
||||
alpha = 10.0;
|
||||
alpha = 1.0;
|
||||
break;
|
||||
|
||||
default:
|
||||
alpha = 1.0;
|
||||
assert(false && "BAD subdomain");
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue