diff --git a/MemMAPR_winda.sln b/MemMAPR_winda.sln
index 7b8044a..337f9ab 100644
--- a/MemMAPR_winda.sln
+++ b/MemMAPR_winda.sln
@@ -3,9 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.12.35707.178
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Main_program", "MemMAPR_winda.vcxproj", "{86DC468D-3A9F-48AB-80FC-059A120499AA}"
-EndProject
-Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "MemMAPR_visual", "..\MemMAPR_visual\MemMAPR_visual.pyproj", "{C56779D9-6429-49A0-8E09-0AE6A666EA21}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MemMAPR_main", "MemMAPR_winda.vcxproj", "{86DC468D-3A9F-48AB-80FC-059A120499AA}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -29,12 +27,6 @@ Global
{86DC468D-3A9F-48AB-80FC-059A120499AA}.Release|x64.Build.0 = Release|x64
{86DC468D-3A9F-48AB-80FC-059A120499AA}.Release|x86.ActiveCfg = Release|Win32
{86DC468D-3A9F-48AB-80FC-059A120499AA}.Release|x86.Build.0 = Release|Win32
- {C56779D9-6429-49A0-8E09-0AE6A666EA21}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {C56779D9-6429-49A0-8E09-0AE6A666EA21}.Debug|x64.ActiveCfg = Debug|Any CPU
- {C56779D9-6429-49A0-8E09-0AE6A666EA21}.Debug|x86.ActiveCfg = Debug|Any CPU
- {C56779D9-6429-49A0-8E09-0AE6A666EA21}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {C56779D9-6429-49A0-8E09-0AE6A666EA21}.Release|x64.ActiveCfg = Release|Any CPU
- {C56779D9-6429-49A0-8E09-0AE6A666EA21}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/MemMAPR_winda.vcxproj b/MemMAPR_winda.vcxproj
index 3f8476d..c1c60de 100644
--- a/MemMAPR_winda.vcxproj
+++ b/MemMAPR_winda.vcxproj
@@ -111,6 +111,7 @@
true
_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
true
+ ./include
Console
diff --git a/include/System.hpp b/include/System.hpp
index c56be73..8d513bd 100644
--- a/include/System.hpp
+++ b/include/System.hpp
@@ -6,18 +6,16 @@
class System{
Object& _obj;
Mesh _mesh;
- double _a1;
- double _a2;
+ double _a;
double _step;
public:
-System(Object& obj, double step = 10., double a1 = 1., double a2 = 1.): _obj(obj), _mesh(obj, step), _a1(a1), _a2(a2), _step(step) {}
+System(Object& obj, double step = 10., double a1 = 1.): _obj(obj), _mesh(obj, step), _a(a1), _step(step) {}
void DefineBounds(int, int, int, int);
std::vector>& Nodes();
std::vector& LineX();
std::vector& LineY();
double step() const { return _step; }
- double a1() const { return _a1; };
- double a2() const { return _a2; };
+ double a() const { return _a; };
};
#endif
diff --git a/src/Solver.cpp b/src/Solver.cpp
index 2f3284a..9f7beb5 100644
--- a/src/Solver.cpp
+++ b/src/Solver.cpp
@@ -1,6 +1,6 @@
#include "Solver.hpp"
-void Solver::SolveExplicit(System& program, double tstop) const {
- std::ofstream output(filename_expl);
+void Solver::SolveImplicit(System& program, double tstop) const {
+ std::ofstream output(filename_impl);
//output << "t x y T" << std::endl;
for (double t = 0.0; t < tstop; t += delta) {
@@ -50,8 +50,8 @@ void Solver::SolveExplicit(System& program, double tstop) const {
}
}
-void Solver::SolveImplicit(System& sys, double tstop) const {
- std::ofstream output(filename_impl);
+void Solver::SolveExplicit(System& sys, double tstop) const {
+ std::ofstream output(filename_expl);
//output << "t x y T" << std::endl;
for (double t = 0.; t < tstop; t += delta) {
@@ -66,7 +66,7 @@ void Solver::SolveImplicit(System& sys, double tstop) const {
double tx = (node->r()->T() - 2 * node->T() + node->l()->T()) / pow(sys.step(), 2);
double ty = (node->u()->T() - 2 * node->T() + node->d()->T()) / pow(sys.step(), 2);
- double t = delta * (tx + ty) + node->T();
+ double t = delta * (tx + ty) * sys.a() + node->T();
node->SetT(t);
}
}
@@ -85,17 +85,17 @@ void Solver::SolveLine(System& sys, std::vector& n) const {
/* Защита от нуля */
if (mu2 == 0.)
mu2 = .1;
- double val2 = -(2 * sys.a1()) / (pow(sys.step(), 2)) - 1 / delta;
- double val1 = sys.a1() / (pow(sys.step(), 2));
+ double val2 = -(2 * sys.a()) / (pow(sys.step(), 2)) - 1 / delta;
+ double val1 = sys.a() / (pow(sys.step(), 2));
std::vector> _Temperature(size);
std::vector right(size);
for (int i = 0; i < _Temperature.size(); i++)
_Temperature[i].resize(3, 0.0);
- _Temperature[0][0] = -(2 * sys.a1()) / (mu1 * pow(sys.step(), 2)) - 1 / delta; /* Первый узел по X */
- _Temperature[0][1] = (2 * sys.a1()) / ((mu1 + 1) * pow(sys.step(), 2)); /* Первый узел по Y */
- _Temperature.back()[1] = (2 * sys.a1()) / ((mu2 + 1) * pow(sys.step(), 2));
- _Temperature.back()[2] = -(2 * sys.a1()) / (mu2 * pow(sys.step(), 2)) - 1 / delta;
+ _Temperature[0][0] = -(2 * sys.a()) / (mu1 * pow(sys.step(), 2)) - 1 / delta; /* Первый узел по X */
+ _Temperature[0][1] = (2 * sys.a()) / ((mu1 + 1) * pow(sys.step(), 2)); /* Первый узел по Y */
+ _Temperature.back()[1] = (2 * sys.a()) / ((mu2 + 1) * pow(sys.step(), 2));
+ _Temperature.back()[2] = -(2 * sys.a()) / (mu2 * pow(sys.step(), 2)) - 1 / delta;
for (int i = 1; i < size - 1; i++) {
_Temperature[i][0] = val1;
@@ -105,8 +105,8 @@ void Solver::SolveLine(System& sys, std::vector& n) const {
for (int i = 0; i < right.size(); i++)
right[i] = -n[i + 1]->T() / delta;
- right.front() += -(2 * sys.a1() * n.front()->T()) / (mu1 * (mu1 + 1) * pow(sys.step(), 2));
- right.back() += -(2 * sys.a1() * n.back()->T()) / (mu2 * (mu2 + 1) * pow(sys.step(), 2));
+ right.front() += -(2 * sys.a() * n.front()->T()) / (mu1 * (mu1 + 1) * pow(sys.step(), 2));
+ right.back() += -(2 * sys.a() * n.back()->T()) / (mu2 * (mu2 + 1) * pow(sys.step(), 2));
std::vector tmps = ThomasMethod(_Temperature, right);
for (int i = 0; i < tmps.size(); i++)
n[i + 1]->SetT(tmps[i]);
diff --git a/src/main.cpp b/src/main.cpp
index eab61bf..4bf4d80 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -17,7 +17,7 @@
#define HOLE_Y 255.
#define HOLE_RADIUS 50.
-#define CONDUCTIVITY 50. // Теплопроводность материала
+#define CONDUCTIVITY 90. // Теплопроводность материала
void visualize(std::ofstream& file, std::string filename, int time_end) {
file << "set cbrange [" << 0 << ":" << 100 << "]" << std::endl;
@@ -36,12 +36,12 @@ int main()
3 - конвекция
4 - отсутствует
*/
- int left = 3;
- int top = 1;
- int right = 3;
- int bottom = 1;
+ int left = 1;
+ int top = 3;
+ int right = 1;
+ int bottom = 3;
int arc_bound = 3;
- int hole_bound = 1;
+ int hole_bound = 2;
double step_5 = 5;
double step_10 = 10;