Curve/Wire support, Helix update
parent
1f20f7ae42
commit
d79b15f49e
|
@ -125,6 +125,93 @@ bool Operator::SnapToMesh(double* dcoord, unsigned int* uicoord, bool lower)
|
|||
return ok;
|
||||
}
|
||||
|
||||
struct Operator::Grid_Path Operator::FindPath(double start[], double stop[])
|
||||
{
|
||||
struct Grid_Path path;
|
||||
double dV[] = {stop[0]-start[0],stop[1]-start[1],stop[2]-start[2]};
|
||||
|
||||
unsigned int uiStart[3],uiStop[3],currPos[3],pos[3];
|
||||
SnapToMesh(start,uiStart);
|
||||
SnapToMesh(stop,uiStop);
|
||||
currPos[0]=uiStart[0];
|
||||
currPos[1]=uiStart[1];
|
||||
currPos[2]=uiStart[2];
|
||||
double meshStart[] = {discLines[0][uiStart[0]], discLines[1][uiStart[1]], discLines[2][uiStart[2]]};
|
||||
double meshStop[] = {discLines[0][uiStop[0]], discLines[1][uiStop[1]], discLines[2][uiStop[2]]};
|
||||
|
||||
double foot,dist,minFoot,minDist,minDir;
|
||||
unsigned int minPos[3];
|
||||
double startFoot,stopFoot,currFoot;
|
||||
Point_Line_Distance(meshStart,start,stop,startFoot,dist);
|
||||
Point_Line_Distance(meshStop,start,stop,stopFoot,dist);
|
||||
currFoot=startFoot;
|
||||
|
||||
double P[3];
|
||||
|
||||
// cerr << "start pos " << discLines[0][currPos[0]] << " " << discLines[1][currPos[1]] << " " << discLines[2][currPos[2]] << endl;
|
||||
//
|
||||
// FDTD_FLOAT**** array = Create_N_3DArray(numLines);
|
||||
|
||||
while (minFoot<stopFoot)
|
||||
{
|
||||
minDist=1e300;
|
||||
for (int n=0;n<3;++n) //check all 6 surrounding points
|
||||
{
|
||||
P[0] = discLines[0][currPos[0]];
|
||||
P[1] = discLines[1][currPos[1]];
|
||||
P[2] = discLines[2][currPos[2]];
|
||||
if ((currPos[n]-1)>=0)
|
||||
{
|
||||
P[n] = discLines[n][currPos[n]-1];
|
||||
Point_Line_Distance(P,start,stop,foot,dist);
|
||||
if ((foot>currFoot) && (dist<minDist))
|
||||
{
|
||||
minFoot=foot;
|
||||
minDist=dist;
|
||||
minDir = n;
|
||||
minPos[0]=currPos[0];
|
||||
minPos[1]=currPos[1];
|
||||
minPos[2]=currPos[2];
|
||||
minPos[n]=currPos[n]-1;
|
||||
// array[n][minPos[0]][minPos[1]][minPos[2]] = 1;
|
||||
}
|
||||
}
|
||||
if ((currPos[n]+1)<numLines[n])
|
||||
{
|
||||
P[n] = discLines[n][currPos[n]+1];
|
||||
Point_Line_Distance(P,start,stop,foot,dist);
|
||||
if ((foot>currFoot) && (dist<minDist))
|
||||
{
|
||||
minFoot=foot;
|
||||
minDist=dist;
|
||||
minDir = n;
|
||||
minPos[0]=currPos[0];
|
||||
minPos[1]=currPos[1];
|
||||
minPos[2]=currPos[2];
|
||||
minPos[n]=currPos[n]+1;
|
||||
// array[n][minPos[0]][minPos[1]][minPos[2]] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
// cerr << "next best pos " << minDir << " " << " " << discLines[0][minPos[0]] << " " << discLines[1][minPos[1]] << " " << discLines[2][minPos[2]] << endl;
|
||||
currPos[0]=minPos[0];
|
||||
currPos[1]=minPos[1];
|
||||
currPos[2]=minPos[2];
|
||||
currFoot=minFoot;
|
||||
path.dir.push_back(minDir);
|
||||
path.posPath[0].push_back(minPos[0]);
|
||||
path.posPath[1].push_back(minPos[1]);
|
||||
path.posPath[2].push_back(minPos[2]);
|
||||
}
|
||||
|
||||
// ofstream file("test.vtk",ios_base::out);
|
||||
//
|
||||
// ProcessFields::DumpVectorArray2VTK(file,"path",array,discLines,numLines);
|
||||
// file.close();
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
double Operator::GetNumberCells()
|
||||
{
|
||||
if (numLines)
|
||||
|
@ -204,14 +291,6 @@ void Operator::DumpMaterial2File(string filename)
|
|||
unsigned int pos[3];
|
||||
double inMat[4];
|
||||
|
||||
ofstream file(filename.c_str(),ios_base::out);
|
||||
// file.open;
|
||||
if (file.is_open()==false)
|
||||
{
|
||||
cerr << "Operator::DumpMaterial2File: Can't open file: " << filename << endl;
|
||||
return;
|
||||
}
|
||||
|
||||
epsilon = Create3DArray( numLines);
|
||||
mue = Create3DArray( numLines);
|
||||
kappa = Create3DArray( numLines);
|
||||
|
@ -238,6 +317,13 @@ void Operator::DumpMaterial2File(string filename)
|
|||
}
|
||||
}
|
||||
|
||||
ofstream file(filename.c_str(),ios_base::out);
|
||||
if (file.is_open()==false)
|
||||
{
|
||||
cerr << "Operator::DumpMaterial2File: Can't open file: " << filename << endl;
|
||||
return;
|
||||
}
|
||||
|
||||
string names[] = {"epsilon","mue","kappa","sigma"};
|
||||
FDTD_FLOAT*** array[] = {epsilon,mue,kappa,sigma};
|
||||
ProcessFields::DumpMultiScalarArray2VTK(file, names, array, 4, discLines, numLines);
|
||||
|
@ -756,5 +842,54 @@ bool Operator::CalcPEC()
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
//special treatment for primitives of type curve (treated as wires)
|
||||
double p1[3];
|
||||
double p2[3];
|
||||
struct Grid_Path path;
|
||||
vector<CSProperties*> vec_prop = CSX->GetPropertyByType(CSProperties::METAL);
|
||||
for (size_t p=0;p<vec_prop.size();++p)
|
||||
{
|
||||
CSProperties* prop = vec_prop.at(p);
|
||||
for (size_t n=0;n<prop->GetQtyPrimitives();++n)
|
||||
{
|
||||
CSPrimitives* prim = prop->GetPrimitive(n);
|
||||
CSPrimCurve* curv = prim->ToCurve();
|
||||
if (curv)
|
||||
{
|
||||
for (size_t i=1;i<curv->GetNumberOfPoints();++i)
|
||||
{
|
||||
curv->GetPoint(i-1,p1);
|
||||
curv->GetPoint(i,p2);
|
||||
path = FindPath(p1,p2);
|
||||
cerr << p1[0] << " " << p1[1] << " " << p1[2] << endl;
|
||||
cerr << p2[0] << " " << p2[1] << " " << p2[2] << endl;
|
||||
for (size_t t=0;t<path.dir.size();++t)
|
||||
{
|
||||
cerr << path.dir.at(t) << " " << path.posPath[0].at(t) << " " << path.posPath[1].at(t) << " " << path.posPath[2].at(t) << endl;
|
||||
vv[path.dir.at(t)][path.posPath[0].at(t)][path.posPath[1].at(t)][path.posPath[2].at(t)] = 0;
|
||||
vi[path.dir.at(t)][path.posPath[0].at(t)][path.posPath[1].at(t)][path.posPath[2].at(t)] = 0;
|
||||
vv[0][path.posPath[0].at(t)][path.posPath[1].at(t)][path.posPath[2].at(t)] = 0;
|
||||
vi[0][path.posPath[0].at(t)][path.posPath[1].at(t)][path.posPath[2].at(t)] = 0;
|
||||
vv[1][path.posPath[0].at(t)][path.posPath[1].at(t)][path.posPath[2].at(t)] = 0;
|
||||
vi[1][path.posPath[0].at(t)][path.posPath[1].at(t)][path.posPath[2].at(t)] = 0;
|
||||
vv[2][path.posPath[0].at(t)][path.posPath[1].at(t)][path.posPath[2].at(t)] = 0;
|
||||
vi[2][path.posPath[0].at(t)][path.posPath[1].at(t)][path.posPath[2].at(t)] = 0;
|
||||
}
|
||||
cerr << "found path size: " << path.dir.size() << endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// double p1[] = {10,0,0};
|
||||
// double p2[] = {10,0,50};
|
||||
// struct Grid_Path path = FindPath(p1,p2);
|
||||
//
|
||||
// for (size_t i=0;i<path.dir.size();++i)
|
||||
// {
|
||||
// vv[path.dir.at(i)][path.posPath[0].at(i)][path.posPath[1].at(i)][path.posPath[2].at(i)] = 0;
|
||||
// vi[path.dir.at(i)][path.posPath[0].at(i)][path.posPath[1].at(i)][path.posPath[2].at(i)] = 0;
|
||||
// }
|
||||
}
|
||||
|
||||
|
|
|
@ -63,6 +63,13 @@ protected:
|
|||
virtual void Init();
|
||||
virtual void InitOperator();
|
||||
|
||||
typedef struct Grid_Path
|
||||
{
|
||||
vector<unsigned int> posPath[3];
|
||||
vector<unsigned short> dir;
|
||||
};
|
||||
struct Grid_Path FindPath(double start[], double stop[]);
|
||||
|
||||
ContinuousStructure* CSX;
|
||||
double gridDelta;
|
||||
|
||||
|
|
|
@ -147,11 +147,13 @@ void BuildPlaneWave(const char* filename)
|
|||
CSPropMaterial* mat2 = new CSPropMaterial(CSX.GetParameterSet());
|
||||
mat2->SetEpsilon(2);
|
||||
CSX.AddProperty(mat2);
|
||||
box = new CSPrimBox(CSX.GetParameterSet(),mat2);
|
||||
box->SetCoord(0,width/-2.0);box->SetCoord(1,width/2.0);
|
||||
box->SetCoord(2,hight/-2.0);box->SetCoord(3,hight/2.0);
|
||||
box->SetCoord(4,length/-4.0);box->SetCoord(5,length/4.0);
|
||||
CSX.AddPrimitive(box);
|
||||
CSPrimCylindricalShell* cylshell = new CSPrimCylindricalShell(CSX.GetParameterSet(),mat2);
|
||||
cylshell->SetRadius(length/4.0);
|
||||
cylshell->SetShellWidth(200.0);
|
||||
cylshell->SetCoord(0,0.0);cylshell->SetCoord(1,0.0);
|
||||
cylshell->SetCoord(2,hight/-2.0);cylshell->SetCoord(3,hight/2.0);
|
||||
cylshell->SetCoord(4,0.0);cylshell->SetCoord(5,0.0);
|
||||
CSX.AddPrimitive(cylshell);
|
||||
|
||||
CSPropElectrode* elec = new CSPropElectrode(CSX.GetParameterSet());
|
||||
elec->SetExcitation(1,1);
|
||||
|
@ -490,7 +492,7 @@ void BuildCoaxial_Cartesian(const char* filename)
|
|||
//E-field dump
|
||||
CSPropDumpBox* Edump = new CSPropDumpBox(CSX.GetParameterSet());
|
||||
Edump->SetDumpType(0);
|
||||
Edump->SetDumpMode(2);
|
||||
Edump->SetDumpMode(0);
|
||||
Edump->SetName("Et_");
|
||||
CSX.AddProperty(Edump);
|
||||
box = new CSPrimBox(CSX.GetParameterSet(),Edump);
|
||||
|
@ -609,10 +611,11 @@ void BuildHelix(const char* filename)
|
|||
ContinuousStructure CSX;
|
||||
|
||||
double feed_length=10;
|
||||
double wire_rad = 0.7;
|
||||
double wire_rad = sqrt(1.4/PI);
|
||||
double coil_rad = 10;
|
||||
double coil_length = 50;
|
||||
int coil_turns = 8;
|
||||
int coil_res = 10;
|
||||
double delta[] = {0.5,0.5,0.5};
|
||||
|
||||
CSPrimBox* box = NULL;
|
||||
|
@ -628,33 +631,61 @@ void BuildHelix(const char* filename)
|
|||
copper->SetName("copper");
|
||||
CSX.AddProperty(copper);
|
||||
|
||||
CSPrimUserDefined* helix = new CSPrimUserDefined(CSX.GetParameterSet(),copper);
|
||||
helix->SetCoordSystem(CSPrimUserDefined::CYLINDER_SYSTEM);
|
||||
helix->SetFunction("(r>(rad_coil-rad_wire))&(r<rad_coil+rad_wire)&(sqrt(pow(x-r*cos(2*pi*z*turns/coil_length),2)+pow(y-r*sin(2*pi*z*turns/coil_length),2))<(2*rad_wire))&(z>0)&(z<coil_length)");
|
||||
CSX.AddPrimitive(helix);
|
||||
CSPrimCylinder* cyl = new CSPrimCylinder(CSX.GetParameterSet(),copper);
|
||||
cyl->SetRadius(wire_rad);
|
||||
cyl->SetCoord(0,coil_rad); cyl->SetCoord(1,coil_rad+feed_length);
|
||||
cyl->SetCoord(2,0.0); cyl->SetCoord(3,0.0);
|
||||
cyl->SetCoord(4,0.0); cyl->SetCoord(5,0.0);
|
||||
CSX.AddPrimitive(cyl);
|
||||
cyl = new CSPrimCylinder(CSX.GetParameterSet(),copper);
|
||||
cyl->SetRadius(wire_rad);
|
||||
cyl->SetCoord(0,coil_rad); cyl->SetCoord(1,coil_rad+feed_length);
|
||||
cyl->SetCoord(2,0.0); cyl->SetCoord(3,0.0);
|
||||
cyl->SetCoord(4,coil_length); cyl->SetCoord(5,coil_length);
|
||||
CSX.AddPrimitive(cyl);
|
||||
// CSPropMetal* pec = new CSPropMetal(CSX.GetParameterSet());
|
||||
// CSX.AddProperty(pec);
|
||||
// CSPrimCurve* curve = new CSPrimCurve(CSX.GetParameterSet(),pec);
|
||||
CSPrimWire* curve = new CSPrimWire(CSX.GetParameterSet(),copper);
|
||||
curve->SetWireRadius("rad_wire");
|
||||
double p[3];
|
||||
double dt = 1.0/coil_res;
|
||||
double height=0;
|
||||
for (int n=0;n<coil_turns;++n)
|
||||
{
|
||||
for (int m=0;m<=coil_res;++m)
|
||||
{
|
||||
p[0] = coil_rad * cos(2*PI*dt*m);
|
||||
p[1] = coil_rad * sin(2*PI*dt*m);
|
||||
p[2] = height + coil_length/(double)coil_turns * dt*m;
|
||||
// cerr << p[0] << " " << p[1] << " " << p[2] << " " << endl;
|
||||
curve->AddPoint(p);
|
||||
}
|
||||
height += coil_length/(double)coil_turns;
|
||||
}
|
||||
// exit(0);
|
||||
CSX.AddPrimitive(curve);
|
||||
|
||||
double kappa_resist = (coil_length)/50/1e-3;
|
||||
// CSPrimUserDefined* helix = new CSPrimUserDefined(CSX.GetParameterSet(),copper);
|
||||
// helix->SetCoordSystem(CSPrimUserDefined::CYLINDER_SYSTEM);
|
||||
// helix->SetFunction("(r>(rad_coil-rad_wire))&(r<rad_coil+rad_wire)&(sqrt(pow(x-r*cos(2*pi*z*turns/coil_length),2)+pow(y-r*sin(2*pi*z*turns/coil_length),2))<(2*rad_wire))&(z>0)&(z<coil_length)");
|
||||
// CSX.AddPrimitive(helix);
|
||||
|
||||
box = new CSPrimBox(CSX.GetParameterSet(),copper);
|
||||
box->SetCoord(0,coil_rad); box->SetCoord(1,coil_rad+feed_length);
|
||||
box->SetCoord(2,-0.5); box->SetCoord(3,0.5);
|
||||
box->SetCoord(4,-0.5); box->SetCoord(5,0.5);
|
||||
CSX.AddPrimitive(box);
|
||||
box = new CSPrimBox(CSX.GetParameterSet(),copper);
|
||||
box->SetCoord(0,coil_rad); box->SetCoord(1,coil_rad+feed_length);
|
||||
box->SetCoord(2,-0.5); box->SetCoord(3,0.5);
|
||||
box->SetCoord(4,coil_length-0.5); box->SetCoord(5,coil_length+0.5);
|
||||
CSX.AddPrimitive(box);
|
||||
box = new CSPrimBox(CSX.GetParameterSet(),copper);
|
||||
box->SetCoord(0,coil_rad+feed_length-0.5); box->SetCoord(1,coil_rad+feed_length+0.5);
|
||||
box->SetCoord(2,-0.5); box->SetCoord(3,0.5);
|
||||
box->SetCoord(4,0.0); box->SetCoord(5,coil_length);///2.0-delta[2]);
|
||||
CSX.AddPrimitive(box);
|
||||
|
||||
double kappa_resist = (coil_length/3.0)/50/1e-3;
|
||||
CSPropMaterial* Src_Resist = new CSPropMaterial(CSX.GetParameterSet());
|
||||
Src_Resist->SetKappa(kappa_resist,2);
|
||||
Src_Resist->SetIsotropy(false);
|
||||
Src_Resist->SetName("resist");
|
||||
CSX.AddProperty(Src_Resist);
|
||||
box = new CSPrimBox(CSX.GetParameterSet(),Src_Resist);
|
||||
box->SetPriority(100);
|
||||
box->SetCoord(0,coil_rad+feed_length-0.5); box->SetCoord(1,coil_rad+feed_length+0.5);
|
||||
box->SetCoord(2,-0.5); box->SetCoord(3,0.5);
|
||||
box->SetCoord(4,0.0); box->SetCoord(5,coil_length);///2.0-delta[2]);
|
||||
box->SetCoord(4,coil_length/3.0); box->SetCoord(5,coil_length/3.0*2.0);///2.0-delta[2]);
|
||||
CSX.AddPrimitive(box);
|
||||
// box = new CSPrimBox(CSX.GetParameterSet(),Src_Resist);
|
||||
// box->SetCoord(0,coil_rad+feed_length-0.5); box->SetCoord(1,coil_rad+feed_length+0.5);
|
||||
|
@ -670,7 +701,7 @@ void BuildHelix(const char* filename)
|
|||
box = new CSPrimBox(CSX.GetParameterSet(),elec);
|
||||
box->SetCoord(0,coil_rad+feed_length+0.5); box->SetCoord(1,coil_rad+feed_length-0.5);
|
||||
box->SetCoord(2,-0.5); box->SetCoord(3,0.5);
|
||||
box->SetCoord(4,0.0); box->SetCoord(5,coil_length);
|
||||
box->SetCoord(4,coil_length/3.0); box->SetCoord(5,coil_length/3.0*2.0);///2.0-delta[2]);
|
||||
CSX.AddPrimitive(box);
|
||||
|
||||
// CSPropMetal* elec_mat = new CSPropMetal(CSX.GetParameterSet());
|
||||
|
@ -743,7 +774,7 @@ void BuildHelix(const char* filename)
|
|||
CSX.AddPrimitive(box);
|
||||
|
||||
//current calc
|
||||
double curr_dist = 1;
|
||||
double curr_dist = 2;
|
||||
CSPropProbeBox* curr = new CSPropProbeBox(CSX.GetParameterSet());
|
||||
curr->SetProbeType(1);
|
||||
curr->SetName("i1");
|
||||
|
@ -814,6 +845,7 @@ void BuildHelix(const char* filename)
|
|||
|
||||
TiXmlElement FDTD_Opts("FDTD");
|
||||
FDTD_Opts.SetAttribute("NumberOfTimesteps",maxIter);
|
||||
FDTD_Opts.SetDoubleAttribute("endCriteria",1e-8);
|
||||
|
||||
TiXmlElement Excite("Excitation");
|
||||
Excite.SetAttribute("Type",Excit_Type);
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes" ?>
|
||||
<openEMS>
|
||||
<FDTD NumberOfTimesteps="500000">
|
||||
<FDTD NumberOfTimesteps="500000" endCriteria="1.000000e-08">
|
||||
<Excitation Type="0" f0="500000000" fc="500000000" />
|
||||
<BoundaryCond xmin="1" xmax="1" ymin="1" ymax="1" zmin="1" zmax="1" />
|
||||
</FDTD>
|
||||
<ContinuousStructure>
|
||||
<RectilinearGrid DeltaUnit="0.001000">
|
||||
<RectilinearGrid DeltaUnit="1.000000e-03">
|
||||
<XLines Qty="67">-35,-25,-20,-15,-12,-11,-10.5,-10,-9.5,-9,-8.5,-8,-7.5,-7,-6.5,-6,-5.5,-5,-4.5,-4,-3.5,-3,-2.5,-2,-1.5,-1,-0.5,0,0.5,1,1.5,2,2.5,3,3.5,4,4.5,5,5.5,6,6.5,7,7.5,8,8.5,9,9.5,10,10.5,11,12,13.5,15,17,18,19,19.5,20,20.5,21,22,23,25,27.5,30,35,45</XLines>
|
||||
<YLines Qty="57">-35,-25,-20,-15,-12,-11,-10.5,-10,-9.5,-9,-8.5,-8,-7.5,-7,-6.5,-6,-5.5,-5,-4.5,-4,-3.5,-3,-2.5,-2,-1.5,-1,-0.5,0,0.5,1,1.5,2,2.5,3,3.5,4,4.5,5,5.5,6,6.5,7,7.5,8,8.5,9,9.5,10,10.5,11,12,13,15,17.5,20,25,35</YLines>
|
||||
<ZLines Qty="117">-25,-15,-10,-5,-2,-1,-0.5,0,0.5,1,1.5,2,2.5,3,3.5,4,4.5,5,5.5,6,6.5,7,7.5,8,8.5,9,9.5,10,10.5,11,11.5,12,12.5,13,13.5,14,14.5,15,15.5,16,16.5,17,17.5,18,18.5,19,19.5,20,20.5,21,21.5,22,22.5,23,23.5,24,24.5,25,25.5,26,26.5,27,27.5,28,28.5,29,29.5,30,30.5,31,31.5,32,32.5,33,33.5,34,34.5,35,35.5,36,36.5,37,37.5,38,38.5,39,39.5,40,40.5,41,41.5,42,42.5,43,43.5,44,44.5,45,45.5,46,46.5,47,47.5,48,48.5,49,49.5,50,50.5,51,52,53,55,57.5,60,65,75</ZLines>
|
||||
</RectilinearGrid>
|
||||
<ParameterSet>
|
||||
<Parameter Type="Const" name="rad_coil" Sweep="1" value="10.000000" />
|
||||
<Parameter Type="Const" name="rad_wire" Sweep="1" value="0.700000" />
|
||||
<Parameter Type="Const" name="turns" Sweep="1" value="8.000000" />
|
||||
<Parameter Type="Const" name="coil_length" Sweep="1" value="50.000000" />
|
||||
<Parameter Type="Const" name="rad_coil" Sweep="1" value="1.000000e+01" />
|
||||
<Parameter Type="Const" name="rad_wire" Sweep="1" value="6.675581e-01" />
|
||||
<Parameter Type="Const" name="turns" Sweep="1" value="8.000000e+00" />
|
||||
<Parameter Type="Const" name="coil_length" Sweep="1" value="5.000000e+01" />
|
||||
</ParameterSet>
|
||||
<Properties>
|
||||
<Material ID="0" Name="copper" Isotropy="1">
|
||||
|
@ -32,7 +32,7 @@
|
|||
<EdgeColor R="135" G="112" B="233" a="255" />
|
||||
<Property Epsilon="1.000000e+00" Mue="1.000000e+00" Kappa="0.000000e+00" Sigma="0.000000e+00" />
|
||||
<PropertyY Epsilon="1.000000e+00" Mue="1.000000e+00" Kappa="0.000000e+00" Sigma="0.000000e+00" />
|
||||
<PropertyZ Epsilon="1.000000e+00" Mue="1.000000e+00" Kappa="1.000000e+03" Sigma="0.000000e+00" />
|
||||
<PropertyZ Epsilon="1.000000e+00" Mue="1.000000e+00" Kappa="3.333333e+02" Sigma="0.000000e+00" />
|
||||
<WeightX Epsilon="1.000000e+00" Mue="1.000000e+00" Kappa="1.000000e+00" Sigma="1.000000e+00" />
|
||||
<WeightY Epsilon="1.000000e+00" Mue="1.000000e+00" Kappa="1.000000e+00" Sigma="1.000000e+00" />
|
||||
<WeightZ Epsilon="1.000000e+00" Mue="1.000000e+00" Kappa="1.000000e+00" Sigma="1.000000e+00" />
|
||||
|
@ -67,41 +67,131 @@
|
|||
</ProbeBox>
|
||||
</Properties>
|
||||
<Primitives>
|
||||
<UserDefined ID="0" PropertyID="0" Priority="0" CoordSystem="1">
|
||||
<CoordShift X="0.000000e+00" Y="0.000000e+00" Z="0.000000e+00" />
|
||||
<Function>(r>(rad_coil-rad_wire))&(r<rad_coil+rad_wire)&(sqrt(pow(x-r*cos(2*pi*z*turns/coil_length),2)+pow(y-r*sin(2*pi*z*turns/coil_length),2))<(2*rad_wire))&(z>0)&(z<coil_length)</Function>
|
||||
</UserDefined>
|
||||
<Cylinder ID="1" PropertyID="0" Priority="0" Radius="7.000000e-01">
|
||||
<P0 X="1.000000e+01" Y="0.000000e+00" Z="0.000000e+00" />
|
||||
<P1 X="2.000000e+01" Y="0.000000e+00" Z="0.000000e+00" />
|
||||
</Cylinder>
|
||||
<Cylinder ID="2" PropertyID="0" Priority="0" Radius="7.000000e-01">
|
||||
<P0 X="1.000000e+01" Y="0.000000e+00" Z="5.000000e+01" />
|
||||
<P1 X="2.000000e+01" Y="0.000000e+00" Z="5.000000e+01" />
|
||||
</Cylinder>
|
||||
<Box ID="3" PropertyID="1" Priority="0">
|
||||
<Wire ID="0" PropertyID="0" Priority="0" WireRadius="term:rad_wire">
|
||||
<Vertex X="1.000000e+01" Y="0.000000e+00" Z="0.000000e+00" />
|
||||
<Vertex X="8.090170e+00" Y="5.877853e+00" Z="6.250000e-01" />
|
||||
<Vertex X="3.090170e+00" Y="9.510565e+00" Z="1.250000e+00" />
|
||||
<Vertex X="-3.090170e+00" Y="9.510565e+00" Z="1.875000e+00" />
|
||||
<Vertex X="-8.090170e+00" Y="5.877853e+00" Z="2.500000e+00" />
|
||||
<Vertex X="-1.000000e+01" Y="1.224606e-15" Z="3.125000e+00" />
|
||||
<Vertex X="-8.090170e+00" Y="-5.877853e+00" Z="3.750000e+00" />
|
||||
<Vertex X="-3.090170e+00" Y="-9.510565e+00" Z="4.375000e+00" />
|
||||
<Vertex X="3.090170e+00" Y="-9.510565e+00" Z="5.000000e+00" />
|
||||
<Vertex X="8.090170e+00" Y="-5.877853e+00" Z="5.625000e+00" />
|
||||
<Vertex X="1.000000e+01" Y="-2.449213e-15" Z="6.250000e+00" />
|
||||
<Vertex X="1.000000e+01" Y="0.000000e+00" Z="6.250000e+00" />
|
||||
<Vertex X="8.090170e+00" Y="5.877853e+00" Z="6.875000e+00" />
|
||||
<Vertex X="3.090170e+00" Y="9.510565e+00" Z="7.500000e+00" />
|
||||
<Vertex X="-3.090170e+00" Y="9.510565e+00" Z="8.125000e+00" />
|
||||
<Vertex X="-8.090170e+00" Y="5.877853e+00" Z="8.750000e+00" />
|
||||
<Vertex X="-1.000000e+01" Y="1.224606e-15" Z="9.375000e+00" />
|
||||
<Vertex X="-8.090170e+00" Y="-5.877853e+00" Z="1.000000e+01" />
|
||||
<Vertex X="-3.090170e+00" Y="-9.510565e+00" Z="1.062500e+01" />
|
||||
<Vertex X="3.090170e+00" Y="-9.510565e+00" Z="1.125000e+01" />
|
||||
<Vertex X="8.090170e+00" Y="-5.877853e+00" Z="1.187500e+01" />
|
||||
<Vertex X="1.000000e+01" Y="-2.449213e-15" Z="1.250000e+01" />
|
||||
<Vertex X="1.000000e+01" Y="0.000000e+00" Z="1.250000e+01" />
|
||||
<Vertex X="8.090170e+00" Y="5.877853e+00" Z="1.312500e+01" />
|
||||
<Vertex X="3.090170e+00" Y="9.510565e+00" Z="1.375000e+01" />
|
||||
<Vertex X="-3.090170e+00" Y="9.510565e+00" Z="1.437500e+01" />
|
||||
<Vertex X="-8.090170e+00" Y="5.877853e+00" Z="1.500000e+01" />
|
||||
<Vertex X="-1.000000e+01" Y="1.224606e-15" Z="1.562500e+01" />
|
||||
<Vertex X="-8.090170e+00" Y="-5.877853e+00" Z="1.625000e+01" />
|
||||
<Vertex X="-3.090170e+00" Y="-9.510565e+00" Z="1.687500e+01" />
|
||||
<Vertex X="3.090170e+00" Y="-9.510565e+00" Z="1.750000e+01" />
|
||||
<Vertex X="8.090170e+00" Y="-5.877853e+00" Z="1.812500e+01" />
|
||||
<Vertex X="1.000000e+01" Y="-2.449213e-15" Z="1.875000e+01" />
|
||||
<Vertex X="1.000000e+01" Y="0.000000e+00" Z="1.875000e+01" />
|
||||
<Vertex X="8.090170e+00" Y="5.877853e+00" Z="1.937500e+01" />
|
||||
<Vertex X="3.090170e+00" Y="9.510565e+00" Z="2.000000e+01" />
|
||||
<Vertex X="-3.090170e+00" Y="9.510565e+00" Z="2.062500e+01" />
|
||||
<Vertex X="-8.090170e+00" Y="5.877853e+00" Z="2.125000e+01" />
|
||||
<Vertex X="-1.000000e+01" Y="1.224606e-15" Z="2.187500e+01" />
|
||||
<Vertex X="-8.090170e+00" Y="-5.877853e+00" Z="2.250000e+01" />
|
||||
<Vertex X="-3.090170e+00" Y="-9.510565e+00" Z="2.312500e+01" />
|
||||
<Vertex X="3.090170e+00" Y="-9.510565e+00" Z="2.375000e+01" />
|
||||
<Vertex X="8.090170e+00" Y="-5.877853e+00" Z="2.437500e+01" />
|
||||
<Vertex X="1.000000e+01" Y="-2.449213e-15" Z="2.500000e+01" />
|
||||
<Vertex X="1.000000e+01" Y="0.000000e+00" Z="2.500000e+01" />
|
||||
<Vertex X="8.090170e+00" Y="5.877853e+00" Z="2.562500e+01" />
|
||||
<Vertex X="3.090170e+00" Y="9.510565e+00" Z="2.625000e+01" />
|
||||
<Vertex X="-3.090170e+00" Y="9.510565e+00" Z="2.687500e+01" />
|
||||
<Vertex X="-8.090170e+00" Y="5.877853e+00" Z="2.750000e+01" />
|
||||
<Vertex X="-1.000000e+01" Y="1.224606e-15" Z="2.812500e+01" />
|
||||
<Vertex X="-8.090170e+00" Y="-5.877853e+00" Z="2.875000e+01" />
|
||||
<Vertex X="-3.090170e+00" Y="-9.510565e+00" Z="2.937500e+01" />
|
||||
<Vertex X="3.090170e+00" Y="-9.510565e+00" Z="3.000000e+01" />
|
||||
<Vertex X="8.090170e+00" Y="-5.877853e+00" Z="3.062500e+01" />
|
||||
<Vertex X="1.000000e+01" Y="-2.449213e-15" Z="3.125000e+01" />
|
||||
<Vertex X="1.000000e+01" Y="0.000000e+00" Z="3.125000e+01" />
|
||||
<Vertex X="8.090170e+00" Y="5.877853e+00" Z="3.187500e+01" />
|
||||
<Vertex X="3.090170e+00" Y="9.510565e+00" Z="3.250000e+01" />
|
||||
<Vertex X="-3.090170e+00" Y="9.510565e+00" Z="3.312500e+01" />
|
||||
<Vertex X="-8.090170e+00" Y="5.877853e+00" Z="3.375000e+01" />
|
||||
<Vertex X="-1.000000e+01" Y="1.224606e-15" Z="3.437500e+01" />
|
||||
<Vertex X="-8.090170e+00" Y="-5.877853e+00" Z="3.500000e+01" />
|
||||
<Vertex X="-3.090170e+00" Y="-9.510565e+00" Z="3.562500e+01" />
|
||||
<Vertex X="3.090170e+00" Y="-9.510565e+00" Z="3.625000e+01" />
|
||||
<Vertex X="8.090170e+00" Y="-5.877853e+00" Z="3.687500e+01" />
|
||||
<Vertex X="1.000000e+01" Y="-2.449213e-15" Z="3.750000e+01" />
|
||||
<Vertex X="1.000000e+01" Y="0.000000e+00" Z="3.750000e+01" />
|
||||
<Vertex X="8.090170e+00" Y="5.877853e+00" Z="3.812500e+01" />
|
||||
<Vertex X="3.090170e+00" Y="9.510565e+00" Z="3.875000e+01" />
|
||||
<Vertex X="-3.090170e+00" Y="9.510565e+00" Z="3.937500e+01" />
|
||||
<Vertex X="-8.090170e+00" Y="5.877853e+00" Z="4.000000e+01" />
|
||||
<Vertex X="-1.000000e+01" Y="1.224606e-15" Z="4.062500e+01" />
|
||||
<Vertex X="-8.090170e+00" Y="-5.877853e+00" Z="4.125000e+01" />
|
||||
<Vertex X="-3.090170e+00" Y="-9.510565e+00" Z="4.187500e+01" />
|
||||
<Vertex X="3.090170e+00" Y="-9.510565e+00" Z="4.250000e+01" />
|
||||
<Vertex X="8.090170e+00" Y="-5.877853e+00" Z="4.312500e+01" />
|
||||
<Vertex X="1.000000e+01" Y="-2.449213e-15" Z="4.375000e+01" />
|
||||
<Vertex X="1.000000e+01" Y="0.000000e+00" Z="4.375000e+01" />
|
||||
<Vertex X="8.090170e+00" Y="5.877853e+00" Z="4.437500e+01" />
|
||||
<Vertex X="3.090170e+00" Y="9.510565e+00" Z="4.500000e+01" />
|
||||
<Vertex X="-3.090170e+00" Y="9.510565e+00" Z="4.562500e+01" />
|
||||
<Vertex X="-8.090170e+00" Y="5.877853e+00" Z="4.625000e+01" />
|
||||
<Vertex X="-1.000000e+01" Y="1.224606e-15" Z="4.687500e+01" />
|
||||
<Vertex X="-8.090170e+00" Y="-5.877853e+00" Z="4.750000e+01" />
|
||||
<Vertex X="-3.090170e+00" Y="-9.510565e+00" Z="4.812500e+01" />
|
||||
<Vertex X="3.090170e+00" Y="-9.510565e+00" Z="4.875000e+01" />
|
||||
<Vertex X="8.090170e+00" Y="-5.877853e+00" Z="4.937500e+01" />
|
||||
<Vertex X="1.000000e+01" Y="-2.449213e-15" Z="5.000000e+01" />
|
||||
</Wire>
|
||||
<Box ID="1" PropertyID="0" Priority="0">
|
||||
<P1 X="1.000000e+01" Y="-5.000000e-01" Z="-5.000000e-01" />
|
||||
<P2 X="2.000000e+01" Y="5.000000e-01" Z="5.000000e-01" />
|
||||
</Box>
|
||||
<Box ID="2" PropertyID="0" Priority="0">
|
||||
<P1 X="1.000000e+01" Y="-5.000000e-01" Z="4.950000e+01" />
|
||||
<P2 X="2.000000e+01" Y="5.000000e-01" Z="5.050000e+01" />
|
||||
</Box>
|
||||
<Box ID="3" PropertyID="0" Priority="0">
|
||||
<P1 X="1.950000e+01" Y="-5.000000e-01" Z="0.000000e+00" />
|
||||
<P2 X="2.050000e+01" Y="5.000000e-01" Z="5.000000e+01" />
|
||||
</Box>
|
||||
<Box ID="4" PropertyID="2" Priority="0">
|
||||
<P1 X="2.050000e+01" Y="-5.000000e-01" Z="0.000000e+00" />
|
||||
<P2 X="1.950000e+01" Y="5.000000e-01" Z="5.000000e+01" />
|
||||
<Box ID="4" PropertyID="1" Priority="100">
|
||||
<P1 X="1.950000e+01" Y="-5.000000e-01" Z="1.666667e+01" />
|
||||
<P2 X="2.050000e+01" Y="5.000000e-01" Z="3.333333e+01" />
|
||||
</Box>
|
||||
<Box ID="5" PropertyID="3" Priority="0">
|
||||
<Box ID="5" PropertyID="2" Priority="0">
|
||||
<P1 X="2.050000e+01" Y="-5.000000e-01" Z="1.666667e+01" />
|
||||
<P2 X="1.950000e+01" Y="5.000000e-01" Z="3.333333e+01" />
|
||||
</Box>
|
||||
<Box ID="6" PropertyID="3" Priority="0">
|
||||
<P1 X="-3.500000e+01" Y="0.000000e+00" Z="-2.500000e+01" />
|
||||
<P2 X="4.500000e+01" Y="0.000000e+00" Z="7.500000e+01" />
|
||||
</Box>
|
||||
<Box ID="6" PropertyID="4" Priority="0">
|
||||
<Box ID="7" PropertyID="4" Priority="0">
|
||||
<P1 X="-3.500000e+01" Y="0.000000e+00" Z="-2.500000e+01" />
|
||||
<P2 X="4.500000e+01" Y="0.000000e+00" Z="7.500000e+01" />
|
||||
</Box>
|
||||
<Box ID="7" PropertyID="5" Priority="0">
|
||||
<Box ID="8" PropertyID="5" Priority="0">
|
||||
<P1 X="2.000000e+01" Y="0.000000e+00" Z="5.000000e+01" />
|
||||
<P2 X="2.000000e+01" Y="0.000000e+00" Z="0.000000e+00" />
|
||||
</Box>
|
||||
<Box ID="8" PropertyID="6" Priority="0">
|
||||
<P1 X="1.900000e+01" Y="-1.000000e+00" Z="2.500000e+01" />
|
||||
<P2 X="2.100000e+01" Y="1.000000e+00" Z="2.500000e+01" />
|
||||
<Box ID="9" PropertyID="6" Priority="0">
|
||||
<P1 X="1.800000e+01" Y="-2.000000e+00" Z="2.500000e+01" />
|
||||
<P2 X="2.200000e+01" Y="2.000000e+00" Z="2.500000e+01" />
|
||||
</Box>
|
||||
</Primitives>
|
||||
</ContinuousStructure>
|
||||
|
|
2
main.cpp
2
main.cpp
|
@ -83,7 +83,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
const char* file=fileHelix;
|
||||
|
||||
// FDTD.DebugMaterial();
|
||||
FDTD.DebugMaterial();
|
||||
// FDTD.DebugOperator();
|
||||
#endif
|
||||
|
||||
|
|
|
@ -8,7 +8,6 @@ CONFIG -= app_bundle
|
|||
TEMPLATE = app
|
||||
OBJECTS_DIR = obj
|
||||
INCLUDEPATH += ../CSXCAD \
|
||||
../fparser \
|
||||
../tinyxml
|
||||
LIBS += -L../CSXCAD \
|
||||
-lCSXCAD \
|
||||
|
|
Loading…
Reference in New Issue