From 7ac8c4eaf224294b1d18d9409330f120c5d7c898 Mon Sep 17 00:00:00 2001 From: Konstantin Kutscher <kutscher@irmb.tu-bs.de> Date: Mon, 24 Feb 2020 11:35:04 +0100 Subject: [PATCH] add to organ pipe setup new microphones --- source/Applications/OrganPipe/OrganPipe.cpp | 28 +++++++++++++++++++++ source/Applications/OrganPipe/config.txt | 4 ++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/source/Applications/OrganPipe/OrganPipe.cpp b/source/Applications/OrganPipe/OrganPipe.cpp index 229d7bf75..b23ae7643 100644 --- a/source/Applications/OrganPipe/OrganPipe.cpp +++ b/source/Applications/OrganPipe/OrganPipe.cpp @@ -452,8 +452,36 @@ void run(string configname) nodes.push_back(UbTupleFloat3(float(organPipeGeo->getX1Minimum()+0.0719), float(0.0), float(organPipeGeo->getX3Maximum()+0.05))); micCoProcessor->addMicrophone(Vector3D(organPipeGeo->getX1Maximum()+0.05, 0.0, organPipeGeo->getX3Centroid())); nodes.push_back(UbTupleFloat3(float(organPipeGeo->getX1Maximum()+0.05), float(0.0), float(organPipeGeo->getX3Centroid()))); + + //additional mics for ray traysing + Vector3D vec1(g_minX1+0.5*deltaXcoarse, g_minX2+0.5*deltaXcoarse, g_minX3+0.5*deltaXcoarse); + micCoProcessor->addMicrophone(vec1); + nodes.push_back(UbTupleFloat3(float(vec1[0]), float(vec1[1]), float(vec1[2]))); + + Vector3D vec2(g_minX1+0.5*deltaXcoarse, g_maxX2-0.5*deltaXcoarse, g_minX3+0.5*deltaXcoarse); + micCoProcessor->addMicrophone(vec2); + nodes.push_back(UbTupleFloat3(float(vec2[0]), float(vec2[1]), float(vec2[2]))); + + Vector3D vec3(g_minX1+0.5*deltaXcoarse, g_minX2+0.5*deltaXcoarse, g_maxX3-0.5*deltaXcoarse); + micCoProcessor->addMicrophone(vec3); + nodes.push_back(UbTupleFloat3(float(vec3[0]), float(vec3[1]), float(vec3[2]))); + + Vector3D vec4(g_minX1+0.5*deltaXcoarse, g_maxX2-0.5*deltaXcoarse, g_maxX3-0.5*deltaXcoarse); + micCoProcessor->addMicrophone(vec4); + nodes.push_back(UbTupleFloat3(float(vec4[0]), float(vec4[1]), float(vec4[2]))); + + Vector3D vec5(organPipeGeo->getX1Minimum()+0.0719, 0.0, organPipeGeo->getX3Maximum()); + micCoProcessor->addMicrophone(vec5); + nodes.push_back(UbTupleFloat3(float(vec5[0]), float(vec5[1]), float(vec5[2]))); + + Vector3D vec6(organPipeGeo->getX1Maximum(), 0.0, organPipeGeo->getX3Centroid()); + micCoProcessor->addMicrophone(vec6); + nodes.push_back(UbTupleFloat3(float(vec6[0]), float(vec6[1]), float(vec6[2]))); + ////////////////////////////////////////////////////////////////// + if (myid==0) WbWriterVtkXmlBinary::getInstance()->writeNodes(pathOut+"/geo/mic", nodes); + SPtr<UbScheduler> stepGhostLayer(new UbScheduler(1)); SPtr<Calculator> calculator(new BasicCalculator(grid, stepGhostLayer, endTime)); calculator->addCoProcessor(nupsCoProcessor); diff --git a/source/Applications/OrganPipe/config.txt b/source/Applications/OrganPipe/config.txt index e71ffa838..cdf91e372 100644 --- a/source/Applications/OrganPipe/config.txt +++ b/source/Applications/OrganPipe/config.txt @@ -1,10 +1,12 @@ pathOut = e:/temp/OrganPipe -pathGeo = C:/Users/maini/Desktop/organflute +pathGeo = d:/Projects/SFB880/OrganPipe/geo availMem = 2e9 logToFile = false +QN = 67.5 + newStart = true restartStep = 250000 -- GitLab