



This page documents the portion of the
libscuff API that handles
ancillary /tr>
1. Visualization
2. Geometrical Transformations
3. Setting Material Properties
You can use the The prototypes are
void RWGGeometry::SetEps(const char *Label, cdouble Eps, cdouble Mu); void RWGGeometry::SetEps(cdouble Eps); void RWGGeometry::SetEpsMu(const char *Label, cdouble Eps, cdouble Mu); void RWGGeometry::SetEpsMu(cdouble Eps, cdouble Mu);
The C++ example:
RWGGeometry *G = new RWGGeometry("MyGeometry.scuffgeo"); G>SetEps(3.4); // set the exterior medium to Eps = 3.4 cdouble MyEpsValue(4.5,6.7); G>SetEps("OuterSphere", MyEpsValue); // set the object labeled OuterSphere to Eps = 4.5+6.7i
Note that, as soon as you make any call to
4. Specialized routines for computing field data
4A. Power, Force, and Torque Transferred to Objects by the incident fieldOnce we have solved a scattering problem, we can compute the power absorbed by a scattering object from the incident field and the force and torque exerted by the external field on the object.
The former quantity is obtained by integrating the Poynting vector over
a surface bounding the object, while the latter quantities are obtained by integrating
the Maxwell stress tensor over a surface bounding the object.
Thus one way to get at these quantities would be to evaluate numerical cubatures
over bounding surfaces, with the E and H fields at each point
obtained by calling
Instead, scuffem suite takes advantage of
certain specialized BEM tricks to compute these quantities much more directly
and efficiently. The The prototypes are
void RWGGeometry::GetPFT(HVector *KN, HVector *RHS, cdouble Omega, int SurfaceIndex, double PFT[8]); void RWGGeometry::GetPFT(HVector *KN, HVector *RHS, cdouble Omega, char *SurfaceLabel, double PFT[8]); The input parameters are KN: the solution vector of the BEM scattering problem.
RHS: the righthandside vector of the BEM scattering problem.
Omega: the angular frequency.
SurfaceIndex / SurfaceLabel : either the integervalued
index (first prototype) or the stringvalued label (second prototype) of the
surface (object) for which you want to compute the power, force, and torque.
The
Note: Just to clarify, the element Power scattered by objects
The ``total power'' returned by
cdouble RWGGeometry::GetScatteredPower(HVector *KN, cdouble Omega, int SurfaceIndex); cdouble RWGGeometry::GetScatteredPower(HVector *KN, cdouble Omega, char *SurfaceLabel);
The input parameters here have the same significance as their
counterparts in
Note that C++ example:
/**/ /* initialize the geometry */ /**/ RWGGeometry *G=new RWGGeometry("MyGeometry.scuffgeo"); PreloadCache("MyCache.scuffcache"); /**/ /* assemble and factorize the BEM matrix */ /**/ double Omega=0.1; HMatrix *M = G>AllocateBEMMatrix(); G>AssembleBEMMatrix(Omega, M); M>LUFactorize(); /**/ /* create a plane wave field source and assemble the RHS vector*/ /**/ cdouble E0[3] = {1.0, 0.0, 0.0}; double nHat[3] = {0.0, 0.0, 1.0}; PlaneWave PW( E0, nHat ); HVector *KN = G>AllocateRHSVector(); HVector *RHS = G>AllocateRHSVector(); G>AssembleRHSVector(Omega, &PW, RHS); KN>Copy(RHS); /**/ /* solve the scattering problem */ /**/ M>LUSolve(KN); /**/ /* compute power, force, torque on the object labeled "Cube" */ /**/ double PFT[8]; G>GetPFT(KN, RHS, Omega, "Cube", PFT); printf("Absorbed power: %e watts \n", PFT[0]); printf("Total power: %e watts \n", PFT[1]); printf("X force: %e nanoNewtons \n", PFT[2]); printf("Z force: %e nanoNewtons \n", PFT[4]); /**/ /* compute scattered power */ /**/ double PScat = PFT[1]  PFT[0]; if ( fabs(PScat) < 0.01*fabs(PFT[1]) ) { // PScat as computed via PFT methods is inaccurate; // recompute using more acccurate approach PScat = GetScatteredPower(KN, Omega, "Cube"); }; printf("Scattered power: %e watts \n", PScat);
4B. Dyadic Green's functionsThe dyadic Green's functions (DGFs) of a material configuration are certain susceptibilities that characterize the response of the configuration to illumination by point sources. DGFs may be computed by solving scattering problems in which we place a point source at some point x^{′} and compute the fields at some other point x. The total DGF is obtained by computing the total field at x. The scatttering DGF (or the "scattering part" of the DGF) is obtained by computing just the scattered field at x, neglecting the direct contribution of the original point source. More specifically, the scattering electric and magnetic DGFs are 3x3 matrices whose components have the following significance:
The fact that BEM techniques naturally separate the contributions of induced sources from the contributions of incidentfield sources makes the BEM particularly wellsuited to the computation of scattering DGFs.
A quantity of particular interest in many branches of physics
is the scattering DGF evaluated for coincident
source and evaluation points
x^{′}=x.
libscuff offers the builtin class
method
void RWGGeometry::GetDyadicGFs(double X[3], cdouble Omega, HMatrix *M, HVector *KN, cdouble GE[3][3], cdouble GM[3][3]); The input parameters are
On return, the
5. Routines for evaluating numerical cubatures over panelsIn many cases it is convenient to evaluate surface integrals over the scattering surfaces in your geometry. For example, such integrals may be used to compute (1) the contribution of surface currents to the electromagnetic fields at arbitrary points in space, or (2) the electric and magnetic dipole moments induced by an incident field on the surfaces in your geometry.
Of course, many such calculations are performed automatically
for you behind the scenes by specialized
libscuff routines; for example,
item (1) is done for you by Since surfaces in scuffem are specified as unions of flat triangular panels, surface integrals reduce to panel integrals. Broadly speaking, there are two cases of interest:
More specifically, a panel cubature is a twodimensional integral of the form
where P is a panel, and where we have written the integrand to indicate that it may depend not only on the integration point x but also on the value b(x) of the RWG basis function at x. Similarly, a panelpanel cubature is a fourdimensional integral of the form
where P_{1} and P_{2} are two panels, and where again the integrand may depend on the values of the RWG basis functions on the two panels. Closely related to the notion of a panel cubature is the notion of an integral over the support of an RWG basis function, which we term a basisfunction cubature (or BF cubature for short). Since each RWG basis function is supported on two triangular panels, a basisfunction cubature is just a sum of two panel cubatures. Similarly, an obvious extension of the panelpanel cubature is the BFBF cubature, which is a fourdimensional integral over the supports of two RWG basis functions, computed in practice as a sum of four panelpanel integrals. libscuff offers the following routines for addressing each of the above situations.
void GetPanelCubature(RWGSurface *S, int np, PCFunction Integrand, void *UserData, int IDim, int Order, double RelTol, double AbsTol, cdouble Omega, HVector *KN, double *Result); void GetBFCubature(RWGSurface *S, int ne, PCFunction Integrand, void *UserData, int IDim, int Order, double RelTol, double AbsTol, cdouble Omega, HVector *KN, double *Result); void GetPanelPanelCubature(RWGSurface *S1, int np1, RWGSurface *S2, int np2, PPCFunction Integrand, void *UserData, int IDim, int Order, double RelTol, double AbsTol, cdouble Omega, HVector *KN, double *Result); void GetBFBFCubature(RWGSurface *S1, int ne1, RWGSurface *S2, int ne2, PPCFunction Integrand, void *UserData, int IDim, int Order, double RelTol, double AbsTol, cdouble Omega, HVector *KN, double *Result); The various parameters here are explained in the table below.

libscuff documentation: Ancillary RWGGeometry Operations, by Homer Reid 

Last Modified: 11/16/16 