Dear Experts,
I’m trying to simulate a simple alternating strips layout (equally spaced field and sense strips) with neBEM.
I would like to implement periodic copies of a basic “cell” to avoid edge effects and reduce computation time of the influence matrix, but haven’t succeeded so far.
Specifically, if the periodic length of the cell set with “SetPeriodicX” falls in the middle of a strip (eg half of the strip is out of the periodic length), this is canceled out of the geometry (at least in the field computation). This same approach works using eg wires instead of strips.
I have then resorted to halving the width of these strips and setting the period such that after applying the periodic condition the strip width is correct again. Still, the field achieved is slightly different from the one computed for a “whole” strip.
Playing around with different Perdiocities didn’t help either.
Is there a solution to this problem?
Thank you in advance!
Bonus issue: i’ve tried using “SetMirrorPeriodicity”, but i keep getting the following message: “Mirror not correctly implemented in this version of neBEM”.
I attach here a basic working example.
int main(int argc, char* argv[]) {
TApplication app("app", &argc, argv);
MediumMagboltz gas;
gas.LoadGasFile("/afs/cern.ch/work/g/gzunica/garfield/Examples/GasFile/ar_93_co2_7.gas");
gas.LoadIonMobility("/afs/cern.ch/work/g/gzunica/garfield/Data/IonMobility_Ar+_Ar.txt");
gas.SetPressure(760.);
gas.SetTemperature(293.15);
MediumConductor Cu;
MediumPlastic glass;
glass.SetDielectricConstant(10.0);
// Geometry.
GeometrySimple geo;
double half_tck = 0.00015;
const double cat_v=-1500.;
const double sense_v=+10.;
const double field_v=-1700.;
const double backplane_v=-1700.;
SolidBox box1(0, 0, 0.5, 0.4,0.5, 0.0);
box1.SetBoundaryPotential(cat_v);
SolidBox box2(0, 0, -0.1000-half_tck, 0.4,0.5, 0.1);
box2.SetBoundaryDielectric();
SolidBox box3(0, 0, -0.2000-half_tck, 0.4,0.5, 0.0);
box3.SetBoundaryPotential(backplane_v);
geo.AddSolid(&box1, &Cu);
geo.AddSolid(&box2, &glass);
geo.AddSolid(&box3, &Cu);
const double radiusS = 0.0015;
const double radiusF = 0.005;
const double halflength = 0.5;
double xposF = -0.2;
double xposS = 0.0;
double passo = 0.4;
// adding sense strips
xposS=-0.4;
std::vector<SolidBox*> stripsS(3, nullptr);
for (int i = 0; i < 3; ++i) {
std::cout<<"spos::"<<xposS;
stripsS[i] = new SolidBox(xposS, 0.0, 0.0, radiusS, halflength,half_tck ); // alternate strips
if(i==0) stripsS[i] = new SolidBox(xposS+radiusS/2, 0.0, 0.0, radiusS/2, halflength,half_tck ); // alternate strips
if(i==2) stripsS[i] = new SolidBox(xposS-radiusS/2, 0.0, 0.0, radiusS/2, halflength,half_tck ); // alternate strips
stripsS[i]->SetBoundaryPotential(sense_v);
stripsS[i]->SetLabel("readout");
geo.AddSolid(stripsS[i], &Cu);
xposS += passo ;
}
// adding field strips
std::vector<SolidBox*> stripsF(2, nullptr);
for (int i = 0; i < 2; ++i) {
std::cout<<"sposF::"<<xposF;
stripsF[i] = new SolidBox(xposF, 0.0, 0.0, radiusF, halflength,half_tck); //alternate strips
stripsF[i]->SetBoundaryPotential(field_v);
geo.AddSolid(stripsF[i], &Cu);
xposF += passo ;
}
geo.PrintSolids();
geo.SetMedium(&gas);
ComponentNeBem3d nebem;
nebem.SetGeometry(&geo);
nebem.SetTargetElementSize(0.2);
nebem.SetMinMaxNumberOfElements(1, 100);
nebem.SetPeriodicityX(0.8);
nebem.SetPeriodicityY(1.);
nebem.SetPeriodicCopies(3,5,0);
nebem.Initialise();
// plot geometry
ViewGeometry geomView2d2(&geo);
TCanvas c2("c2", "", 600, 600);
geomView2d2.SetCanvas(&c2);
geomView2d2.SetPlaneXY();
geomView2d2.Plot3d();
geomView2d2.PlotPanels();
TCanvas c3("c3", "", 600, 600);
// Plot field contour
ViewField fieldView(&nebem);
fieldView.SetCanvas(&c3);
fieldView.SetArea(-1.,-0.4,-0.2,1.,0.4,0.5);
fieldView.SetPlaneXZ();
fieldView.PlotContour("v");
TCanvas c4("c4", "", 600, 600);
ViewField fieldView1(&nebem);
fieldView1.SetCanvas(&c4);
// Plot field contour
fieldView1.SetPlaneXY();
fieldView1.PlotContour("v");
gSystem->ProcessEvents();
app.Run(true);
}