Main

FEM@LLNL | A Full-Wave Electromagnetic Simulator for Frequency-Domain S-Parameter Calculations

Abstract: Sponsored by the MFEM project, the FEM@LLNL Seminar Series focuses on finite element research and applications talks of interest to the MFEM community. On January 9, 2024, Brian Young presented “A Full-Wave Electromagnetic Simulator for Frequency-Domain S-Parameter Calculations.” An open-source and free full-wave electromagnetic simulator is presented that addresses the engineering community’s need for the calculation of frequency-domain S-parameters. Two-dimensional port simulations are used to excite the 3D space and to extract S-parameters using modal projections. Matrix solutions are performed using complex computations. Features enabled by the MFEM library include adaptive mesh refinement, arbitrary order finite elements, and parallel processing using MPI. Implementation details are presented along with sample results and accuracy demonstrations. Learn more about MFEM at https://mfem.org/ and view the seminar speaker lineup at https://mfem.org/seminar/. LLNL-VIDEO-859175

Livermore Lab Events

4 days ago

[Music] [Music] today we have Ryan young um and I don't know if you remember him I think you gave us a talk about a year ago also in the mm Workshop yes so we're very happy to have you here uh Brian is an expert in electromagnetics and digital signal inte Anna design among others uh now I believe you're retired right but you you worked in many places yeah I I work full-time now I just don't get paid yes okay and today you're going to talk about full wave electronic Simulator for frequency domain
as parameter calculations okay we're very happy to have you here um take it away okay thank you so uh I have a kind of a standard agenda uh go through the motivation for this work uh features uh uh s parameters uh little bit of background there then the construction of the 3D simulator uh how I've implemented adapted mesh refinement and then a number of examples uh in discussion a few comments on a regression suite and a conclusion so the uh the motivation for this work is that uh I'm not aware
of any lowcost or free frequency domain s parameter electromagnetic simulator and because of that there's uh very limited ability for an individual to to uh explore ideas at home or to work on continuing education uh so the target audience is uh basically anyone who who would like to be able to do 3D electromagnetic simulators and produce s parameters uh to uh try to come up with new things or self-educate or even say s small startups that can't afford the uh very high cost of the the commercia
l simulators so as far as feasibility goes uh I'm a I'm a oneperson effort so uh you know you have to leverage existing open source projects so to produce a 3D electromagnetic simulator um here's what I'm doing I'm using free CAD for the cad uh G mesh for meshing uh MFM for the finite element and then visualization with par viw and that's essentially a simulator right there so all you need to do uh is just uh glue it all together with which uh is quite a bit of work but not nearly as much I thin
k as putting together any of the uh uh the pieces that uh are required to pull together a full scale simulator so the features I'm targeting uh is a fullwave Time harmonic 3D electromagnetic simulator that computes the electric and magnetic fields and then from those fields extract s parameters between 2D ports on the surface of the 3D space uh courtesy of MFM it supports high order arbitrary high order elements uh courtesy of mm pety slepy and some custom code also parallel processing via MPI a
nd then I'm also leveraging mm's adaptive mesh uh ability to do adaptive uh mesh refinement so uh so far the uh the one added feature that I need to add one feature I need to add before uh releasing it is to add the impedance boundary condition which I just left off uh because I didn't want to mess with it to start off with uh because there's so many things that have to be pulled together to get the to get it started so s parameters uh in case you're not familiar with them that's short for scatt
ering parameters it links the incident and reflected waves at the ports of a 3D Volume and uh my for my experience in engineering across a number of companies and uh uh technical Fields is s parameters just dominate uh frequency domain s parameters uh that that's just what's used to uh bring electromagnetic simulations into circuit simulations and for per performance analyses so for a practical simulator in my opinion that's just a musthave a requirement so that's why the focus on this uh electr
omagnetic simulator is uh the primary output is targeting s parameters okay so uh a quick background one slide background on S parameters uh the uh if you have a a a 3D black box with end ports at each Port you'll have an incident wave and then some fraction of that wave will bounce back or some energy will come out uh from energy driven driven into another port so the Convention in S parameters is the incident wave is a the reflected wave is B if you have n ports then you can relate uh the outp
uts to the inputs via the S parameter Matrix so uh the target uh uh action then analysis is to get the 3D solution so that you can uh uh drive it with uh Drive the space with incident waves get the reflected waves and then produce the S parameter Matrix which is the output so the uh the basic process is Define the ports which would be 2D flat surfaces on a 3D space uh they have to be flat because the assumption is that uh the energy coming into the into the 3D space is from a uh transmission lin
e uh or wave guide meaning that uh there's no dependence the only dependence in the field is in the Z Direction so it has to be flat um solve one column at a time by driving Port I and then if you don't if you terminate all the other uh uh ports then uh the reflected energy or all the for for I not equal to the driven Port then those are zero because there's no energy coming in so you can drive Port I get all the energy coming out of the other ports and then you can pick off the S parameter Matr
ix one column at a time so you have to to repeat the simulation end times to fill out the full Matrix uh once you've done that you can then output the results uh in a touch Touchstone file format which is what all the uh circuit simulators pull in uh results viewers plotters uh everything depends on esir on Touchstone files okay so uh this a little bit more about the setup suppose you have a 3D space uh you define the 2D ports on uh uh at each place where you want to uh Drive energy and take ene
rgy out um uh the the simulator uses mm's par submesh functionality to extract the 2D meshes on each of the 2D meshes at each Port the uh uh the electromagnetic simulation it it's solved for the 2D simulation assuming it's a TR transmission line uh using open parum 2D which is what I presented uh uh at the uh workshop two workshops ago then the 2D field solution is applied to the 3D space which forces the fields to take the 2D solute the 2D field solution and then an absorbing boundary condition
is applied to the other ports so that gives you a unique setup that you can then solve the 3D electromagnetic simulation and then you just uh cycle through and repeat that for all the ports and uh when you're done you can extract the uh s parameters so moving on to the 3D uh Ved elements setup uh the simulator uses the weak form of the wave equation so this is basically exactly what everybody else does so there's uh nothing Innovative here um and uh MFM is unique is uh very well set up to solve
this equation uh with uh the one exception I'll talk about which makes it a little more interesting so uh the first term can be solved with the curl curl integrator second term with the vector Fe Mass integrator uh the third term is this is the surface term and that's where you need to apply boundary conditions and that's where the ports are so you have to integrate bring in the ports from the the uh surface term so the surface term can be broken into uh the end ports and then everything else u
m the surfaces the surface that's not ports right now uh can be a perfect electric conductor um uh which is uh easy to apply directly in the matrix by manipulating the dos and then and then there's the end ports which have to be uh uh considered so copying the the the end the the port set up the surface for the ports uh the there's the part part with the dove manipulation and then there's the part that has the incross uh curl of e and that term is not directly supported uh in mm so that's where
uh a little bit of more work has to be applied uh uh to solve what needs to be solved using MFM and the way that uh the way I'm handling that is similar very similar to What's Done in the uh in the literature where you apply a vector identity to break the electric field into the tangential and normal components and then to the derivative term because you're making the assumption that the the uh field at the ports is coming from a transmission line the derivative with respect to the direction you
're traveling uh is known because it's uh just the propagation constant so that's just written out of here on the right where uh the derivative because of the known uh dependence in the direction of propagation Z to the minus gamma n uh you can take the derivative and so you have one term out of this is just gamma times the the tangential electric field and that can be implemented with the vector Fe Mass integrator so that term is easy to take care of the next term is the gradient is a gradient
term of the normal component and that turn that operation is not supported n MFM for nlec elements because the uh it it includes a normal component on the boundary but n nalic elements don't have uh the normals on the boundaries so uh what I'm choosing to do is to just neglect this term and I have a whole slide next to talk about what happens when you neglect this term so uh the the the from a physics point of view a zero gradient of a nonzero normal component is not physically realizable so eff
ectively that just means I'm assuming that the normal component of electric field is zero from a transmission line point of view what that means is that only transverse electric or transverse electromagnetic uh uh transmission line modes are directly supported so not TM the but the from a engineering point of view um the te and TM cases dominate what everybody looks at I'm not sure I've ever seen anybody use anything but a te or temm because these are the kind of practical transmission lines use
d in real applications like micr strip strip line coax Triax slotline uh co-planner wave guide rectangular wave guide and generally in any in conductor transmission line so in practice the te restriction is not significantly uh limiting so I'm not expecting this to to to be a problem now if you try to solve with a nonte te mode or use a temm TM mode um it will happily solve it but you will uh get a bad answer distorts the field so you'll get the wrong answer uh but if you really with with the wa
y the simulator is currently set up if you really wanted to get the s param for TM modes what you could do is set it up like you would um an experiment in a lab where you launch te modes then include in your 3D space transitions to the uh to the TM mode of interest and then you could do uh a standard deembedding operation so not very convenient but uh if you really do need to do TM modes uh uh you could actually do it that way kind of the hard way uh a lot of times uh the fields of Interest the
modes of Interest are Quasi temm te or quasi temm modes where the normal component is small compared to the transverse component it's usually very small uh so there will be a small error there I'm not expecting that there would be uh a significant hit to accuracy so for engineering purposes I I think that quasi TM quasi TM modes that it'll just be fine uh eventually I'd like to relax this restriction uh one would be by in including the gradient term somehow that would uh either my understanding
of mm would have to greatly increase to to implement that myself or it need to be added by the mm team uh or I could Implement uh a perfectly matched layer boundary condition uh to uh absorb completely absorb reflections so that the uh uh the Distortion caused by the uh the field at the the TM field at the ports would uh not occur okay so top level uh implementation details uh starting at start here uh starting point is a 3D uh par mesh so import a mesh into a par mesh then go through the biline
ar forms uh according to sort of standard methodology very similar to the examples U the difference is since I'm doing frequency domain I need to use complex numbers so there's a real and imaginary uh uh version U I'm doing Matrix operations on a CPU so I go to a h two hyper par matrices to get the real and the imaginary part but I need to solve them in complex so those are converted to a complex pepsy uh using a uh conversion routine that I wrote could not find one that would do that uh that se
ems to be pretty effective then uh on the 3D par mesh you can use the par submesh methods uh and MFM to pull off the meshes for the 2D ports those can then be exported and solved in uh open par em 2D uh and then the fields are brought back in to the 3D program to do the custom system integration so uh it's it's a custom construction because it's complex but also I'm applying dos from the ports and applying uh PC boundary conditions to form a complex linear system which is then solved in PSY and
then uh once that's solved then you can pull out the uh real imaginary parts of the electric field similar uh uh flow as for the electric field solve for the the magnetic field and uh and then once you have the E and H you can then postprocess to solve for S parameters or export for viewing and pairview so after you have the uh the 3D electromagnetic solution and you want to go to the S parameters uh there is one uh uh issue that has to be addressed and that is that at the driving Port you you h
ave set it up to drive uh the the energy into the problem well there's reflected energy coming out of the problem so there's an uh electric field wave traveling into the space there's electric field wave coming out of the space and you have to separate uh those two because uh for example reflection is uh the output divided by the input so you have to separate the total e into its uh forward and reverse traveling components and to do that at least the the way I I I'm doing it is you need the magn
etic field uh to separate the two uh to simplify things uh in this operation I'm only using the tangential components uh because in all practical applications that I'm aware of the uh the tangential components dominate the the the longitudinal components at the ports so there's no need to mess with the normal components so the setup for that is you have the uh the total field at Port ey is going to be a weighted uh sum of the uh field traveling in the plus Direction and field traveling in the mi
nus Direction so the key is to find those two weights uh one way to do it uh which I'm finding to be very effective is to uh dot product the fields with the uh dot product with the field in the minus Direction integrate over the surface of the port and those uh inner products are easily implemented in infm uh then replace the field in the minus Direction with the field in the plus direction and you end up with uh uh a relative simple oper uh equation where you have one equation and two unknowns
you know e0 and you know E2 from the inner products and now you're still looking to find C1 and C2 then repeat the the operation for the magnetic field and what you uh and this is where it get where the the the trick happens is when the when you replace the electric the magnetic field with uh the the negative component with the Positive component there's a sign change so you work through the uh inner products and you end up with another equation but now there's a minus sign in the equation so th
at allows you to uniquely solve for the weights uh splitting the the positive and the negative uh directions of the Waves so with those weights you can then move on to solving for uh uh the reflection coefficient uh at the at the dire Port so uh in s parameters the the they're always talked about terms of A's and B's A's towards the 3D space B's are the reflected U you can talk about those in terms of voltage waves or current waves uh right now I'm implementing it as voltage waves so Ace ofi is
the uh voltage wave traveling in the plus Direction divided by the characteristic of the port and B ofi is the the reflected wave divided by the uh characteristic characteristic impedance of the port so those voltage waves amplitudes are proportional to the weights so you can uh substitute in the weights and then simply divide it out so the reflection coefficient SII is B subi over a subi and then you can calculate that with the known weights from the U all the in product calculations now for s
for the off diagonal terms sji there you can just use direct calculation with voltages you using the uh uh the definition that sji is B subj over a subi so you have the voltage wave uh at Port J divided by the voltage wave at Port I and you can just uh for the for Port J uh there is no incident wave so the total voltage is just uh the voltage traveling away from the space so uh a direct calculation of the voltage gets you V subj on Visa by that's at the driving Port there you need the voltage tr
aveling towards the space not the total voltage but uh we have the weight for that so we can calculate the total voltage apply the weight for the for the portion that's going towards the the space and we can get uh uh the the needed voltage component traveling towards the space so then dividing that out we get the equation to calculate the O diagonal s parameter terms from the the 3D field and the weight and the weights okay so uh so with the 3D solution and the S parameters that that in effect
completes the the electromagnetic simulator uh the next step is to implement a adaptive mesh refinement and for that I'm following the setup used in the MFM Tesla mini app where uh the errors are calculated using the Cur Cur curl curl integrator on E the RT elements for flux and ND elements for the smooth flux the difference that that need to be implemented here is that there's real and imaginary electric field components so the error has to be calculated for both uh real and imaginary parts and
then combined then because uh as a refining the mesh uh you U you'd like at each iteration to solve to refine the mesh that overall improves the S parameters so U the errors need to be calculated as you drive each port and then saved and then you can combine the errors from all of the ports from all the driven ports uh and then threshold though that total number of ports defined elements to refine so uh that way you're refining elements in the areas that affect the overall s parameters uh event
ually it just uses uh the par Mass General refinement so it gets back to sort of the standard methodology at that point then to test for convergence since the primary output is uh the S parameters the U the convergence test is on the S parameter Matrix S so for that I'm calculating an error of of taking the the error at the N the S parameter at the nth iteration minus the S parameter at the N minus one iteration and then multiplying by the inverse of the S Perimeter at the nth iteration so more
or less just a kind of a standard error calculation and then take the max column Norm uh of that calculation so you can iterate until the error drops below uh some sort of uh a a user defined limit uh then there are options you can apply to that like do you meet uh a prescribed uh error limit once or you need it two or three times in a row uh you can ALS uh there's also the option to apply adaptive mesh refinement at multiple frequencies if you want to uh straddle a resonance or something like t
hat uh one thing I'm seeing which may or may not be an issue it's not hurting me right now but uh uh as I'm applying uh adaptive mesh reement uh with the MFM Library uh at each iteration the mesh quality goes down a little bit uh especially at the ports uh that's not causing me numerical issues uh in any of my examples so far but it'd be nice if the uh quality of the mesh somehow magically stayed constant as uh as adaptive mement was applied uh this may be a mistake on my point so if if someone
know knows uh that uh this isn't right I'd love to hear from you okay so I'd like to go through some examples so this first example is uh a pretty strenuous uh test of the quality of the solution where you take a rectangular wave guide that's filled with a uh that's dielectrically loaded and uh with a perfect solution the reflection coefficient S11 and DB goes to minus infinity uh if there's any imperfection in the space then uh you'll reflect energy off of any imperfection at the mesh or anythi
ng and then S11 will not be minus infinity uh because it goes to minus infinity uh you can push it as hard as you want to look for issues so in this example the mesh is very coarse starts off at almost a wavelength so if you're using linear elements there's no way you'll get a good answer U so the the plot on the lower left shows a p convergence as the num as the finite element order increases so the reflection coefficient is the blue curve at first order mesh elements the reflection coefficient
is near zero so that's an extremely poor answer but as you increase the order the error uh the S11 uh regularly improves until eventually it hits uh what appears perhaps to be a noise floor of around little I guess that's like a minus 170 DB or something uh to my experience using commercial simulators that's a a very good result um then for the phase error the delay through the the section it starts off once again with a very high eror around the fifth or sixth order elements there starting to
be very good and it continues to improve as the uh order of the fin an element solution increases uh the plot on the right just shows some metrics to check the the quality uh where there is the reciprocity error which is is uh S12 has to equal S21 if you have a lowquality solution they won't be equal so the magnitude of the reciprocity error comparing driving one port versus the other steadily improves as the finite element order increases so that's a good result uh the U the phase reciprocity e
rror also continues to improve uh until some sort of nor noise floor is hit so that's very good uh there's no losses in this problem so uh that means that uh S1 1^2 + S2 21^ 2 has to equal one so you can calculate an error uh based on uh non-physical energy loss and you can see that the passivity error uh with finite element finite element order continues to improve to a very small number so in this example this is showing that it's possible to uh get very very very good electromagnetic uh resul
ts uh to very low errors now this is a matrix Solution on a CPU so you get what you would expect where as the finite ele finite element order increases the runtime uh goes up at a very quick rate uh this is applying uh same example applying adaptive measure refinement uh instead of p p refinement it's h refinement to uh check to see if the Adaptive mesh refinement is working well uh and in general you can see at all the curves as as with each iteration that the answer steadily improves and uh yo
u get less error so uh uh I go into detail in these but it's uh uh showing uh the expected response of uh fairly linear Improvement in the answer uh as you uh as adapted mesh refinement continues to refine the mesh uh the plot on the lower left uh is interesting for me is that if you look at the phase ER of the delay through the the the problem uh if you just pick any error level say minus 40 DB and slide to the right uh what you find is that uh you get the fat oh I need to be on the plot on the
lower right sorry uh but same concept go pick a line go across and what you find is that to get the expect to beat the expected error you always end up reaching that error in the lowest runtime with a higher order element the problem is is you don't know exactly what order element that that would be required but uh uh the from these results I find in general is that uh within reason on runtime you're better off using as high order element is as you can get away with along with adaptive refineme
nt uh and that will ultimately end up with the best answer at the lowest runtime of course that's problem dependent so it it it's kind of a feel your way through it On Any Given problem okay so here's an example with a WR 75 wave guide with a dialectric puck uh in the middle of it and this is solved twice once second order with AMR once is fourth order with uh no AMR and this is a published result the red and black lines are uh uh open parium 3D and then dots and Crosses are uh the published res
ults and you can see that the result uh is uh very good and that and that the using adaptive mes refinement or no adaptive mes refinement with sufficient order uh can basically get you the same answer here's a w75 way guide T Junction uh this is solved with no adaptive refinement uh and then comparing uh uh the results against the literature once again there's uh very good results in this particular example the the mesh the maximum Edge length is a quarter wavelength and with fourth order elemen
ts uh quarter wavelength mesh is uh uh no issue this is a uh more complex example uh from the literature where there is a micr strip line on Gallum arsenide with uh leading to another micr strip line on Gallum arsenide with a with a Gap uh a bridge and the the block of material with the bridge uh is variable as a variable dialectric constant uh this is solved with uh fifth order elements with no adaptive refinement and across very uh four different dialectric fillings uh the agreement between me
asurement and the between this simulation and the published result uh is very good uh this is a slotline step uh slotline is generally very challenging for electromagnetic simulators because it's an edge coupled device and edges have strongly varying electromagnetic fields near the edge so you need a lot of refinement right next to the edge uh this slotline step is solved uh half of it using symmetry um this using third order F elements with 11 passes um of adaptive mesh refinement with a very t
ight uh convergence requirement 0.001 and the agreement between these results and the the lature are uh once again very good there's a a little plot on the low uh to the right uh repetitively solving uh with adapted mesh refinement and one frequency versus the number of slots on a on uh my dual processor Zeon uh and then fitting it on a log log plot the exponent is 655 so the efficiency for this problem is 655 as far as I can tell from the literature for a memory intensive application that is uh
uh a typical type number uh if anyone is aware that this 655 is a is a very poor number I would love to hear from you uh this is the most uh practical engineering uh example I've run so far it's a micr strip filter uh it includes dialectric losses only because I haven't put inductor losses in uh using second order elements with adaptive mesh refinement with nine iterations and a 0.02 convergence criteria uh this is measurement versus the published I mean simulation versus the published measurem
ent so it's a measurement versus simulation um and uh I think the agreement is very good given the the lack of conductor losses which wouldn't be great at this relatively low frequency um but it should still uh have an effect of rounding off the lossless result this this problem is really challenging for a finite element once again because the it's Edge coupled in the filter there's the three microstrip lines veryy close together uh so you have very fine meshes uh you need very fine meshes in th
at Gap and uh uh to to resolve the fields accurately on my computer I really wasn't able to use more than uh second order elements uh just because it's not a very Stout computer but it still solves this well with second order elements and then here's a sample field plot from perview since I'm targeting uh a general release not just a uh a research type program uh it needs uh commercial type uh support uh to verify that the tool is uh working well so there I've put together regression Suites for
both open parum 2D and 3D uh it's fully automated uh to run and to check for errors it runs Within without adapted mesh refinement uh for the open par m2d so far I have 27 test cases in it total of 43,000 uh checks uh individual checks to uh uh verify that it's operating well for the 3D simulator I'm up to 17 Tex test cases covering a variety of uh of Port types and in addition uh uh there are variations of taking the same problem rotating it in space in various orientations to make sure that uh
the uh the ports are correctly handled with respect to positive and negative directions uh on uh importing the fields and propagation constants so on and so far there's a total of 390 checks uh of s parameters in the these test cases so in inclusion uh I presented an effective 3D fullwave time harmonic em Simulator for calculating s parameters and uh I think that I've well demonstrated that it produces high accuracy um the te a technical issue with the implementation is neglecting the gradient
term where if you want to drive the 3D space with nonte modes you have to do deembedding I do believe that that should be very rare but if you really do need to do it you can still uh go the manual route and uh do the deembedding uh the uh not having the the gradient term included uh means that to separate the forward and reverse traveling waves I have to calculate the magnetic field uh in the literature uh where the they're using completely uh no libraries completely hand implemented finite elm
ent codes they are able to implement the gradient term uh and uh there they're able to debed the reverse the forward and reverse traveling waves without having to calculate the magnetic field but other than the two the 2x runtime hit there's there's no issue so the things left to do on the the simulator are to uh add the impedance boundary condition uh to support loss conductor losses in antennas it's already including dialectric losses so it's just uh conductor loss losses uh I don't think that
'll be hard from electromagnetic point of view it'll primarily be just making sure that uh capturing the 3D boundary conditions and making sure that they are properly applied to the 2D uh problems uh when it's exported to solve in the 2D simulator I'd like to add a a perfectly matched layer absorbing boundary condition at the ports that would allow me to relax the TM uh restriction and then uh write documentation and release it and it's uh will be a free open source uh simulator and finally I'd
like to thank uh Mark stole for uh many uh very very helpful uh email exchanges that got me over the hump a few times okay well that's that's it thank you for your attention thank you Brian that was a very nice talk thank you okay um any questions from the audience okay I do have a your does your uh what probably I go ahead but do you uh do you deal with different um primitivity you know it like in other words different materials or is it just all the one one material no you can uh have as many
materials as you like with different dialectric constants uh uh and loss tangents and I haven't run an example yet but it should also support different permeabilities but it's not really intending to T to Target uh rotating machines or anything like that so the uh uh so I haven't checked that but it's in inherently there but there's probably some mistake there but other than that uh any dialectric configuration you want in a 3D space okay I I do have a comment uh when you talk about the surface
integral that is missing just so this is really n cross e tested with with some other H care variable so it's n cross n cross k e right tested with v whatever on the B yeah I'm trying to go back to to that this one right yeah same cross k e tested with W on the boundary right part of the boundaries okay so there is one I don't know what what what version you're using there is we have this tangent Trace integrator um it's there in the new Master if it's not exactly what you need it's probably ver
y close uh okay maybe maybe you want to take a look CU I because I used something I I I I needed some similar term okay same really yeah I'll check into it uh the there there was a a support thread that I filed six or eight months ago I don't know exactly where this was discussed and that's where my you know I posted I need to support this how do I do it and the answer came back no because okay because of the the need for the normal component on the surface right yeah it's just inherently not su
pported yeah that's right yeah I I'll Trace down the tangent Trace integrator and see if I can uh make some progress with that okay and the other question I have is uh maybe I missed that maybe you said so now are you using any kind of uh absorbing boundary conditions you place to no I haven't put that in here okay we also have an example simple really p uh yeah yeah I would definitely be going in and looking at that and seeing how much of it it's a simple example it's a simple scut you know in
a box yeah yeah really where where I am at this point was to uh to get something running up to what I would consider kind of minimal commercial quality which is it's something that runs that runs very well with regression Suite uh backing it up and a lot of examples so as an example for the last week I've been running the regression Suite in a loop uh takes an hour and a half to run the 3D simul the 3D uh regression suite and I just set it up to run it 40 times and just looking for anything that
would pop up and actually something does pop well it used to pop up I fixed it now but the like the preconditioner uh in petsy fails like uh 8% of the time and so I was going to ask about that what is what is a solver in Psy oh it's just def system yeah uh gmr it's gmr with with with with what conditioner uh uh keski and it I complet but yeah just this is not this is indefinite right this is indefinite system uh so it it's it's at times borderline I think for the for the preconditioner um becau
se it Fails Like 8% of the time but what I find is that uh if it fails just try it again and it and it works the second time so okay that's that's that's not very assuring but okay B basically I tried every preconditioner that petsy supports and keski is best uh Lu is second best about 10% slower uh uh but they both uh run pretty effectively but occasionally rarely fail and so I'm just catching that how big how big are these systems how big are they ah because if it's not if if they're not that
big you know a direct solver will handle it this and you will I I go up to yeah I go up to a couple of million dos oh okay is that considered small or large it depends on a laptop it will be large yeah no I'm running machine dual processor a dual slot dual CPU Zeon machine yeah this yeah this this will be considered large I would say okay yeah on a large machine the direct solver will handle this uh yeah I mean the the the pck conditioner is uh it's uh open research problem for those for for for
timeon electromagnetics so well what what I find is unless the preconditioner fails in which case I just rerun it then it then it runs uh it converges some magic behind two iterations three iterations I mean just bangs it out it's just quite stunning in in fact before I got to the pre conditioner running well a long time ago it' take you know 5,000 iterations to solve on a small problem and then I finally got the preconditioner set up right and I thought I'd forgotten to solve the problem that
I'd commented out the Sol because it just banged it out so quickly I just almost didn't even see I like what happened okay okay now being an engineer and not a numerical scientist or anything I come at things very practically if it works yes test it to death and then beat it to death and then move on if it's not supposed to work and it's working for me then I really wouldn't know that I would I would suspect that if you increase the operating frequency that you're at you're going to run into is
lasted of course yeah of course I mean probably just you're probably just by Nature getting lucky yes exactly yeah exactly it will be more indefinite it will be yeah yeah you know high frequency depends on the on the dimensions of the problem and right and so in the problems I've run I've run the at the frequency range is appropriate for that problem and uh and so far I haven't seen it issues but yeah if I took one of you know you well calculating s parameters you you you you're bringing in uh t
he uh single mode operation anyway primarily and so uh you know you you know just any in any engineering type of application you're just not going to push it to a high frequency that's not appropriate for the uh structure that you're actually trying to test so that that may be why I haven't seen it it's just because I'm I'm using frequencies that for which the the problem is designed yeah makes sense can I ask a question about um I guess it's actually on this slide can you is it in a single simu
lation can you calculate s parameters into multiple modes on a port so say I have like a symmetric and an anti- symmetric mode uh that that would be like two boundary conditions on the same surface like you calculate both of those modes in par open par m2d can you then calculate like S1 S21 and S31 into both of those modes or is that not possible like how does that yeah that is definitely uh going to be uh uh in there it's supported right now I just haven't tested it to see what problems I need
to fix but open par m2d can calculate arbitrary numbers of ports so you can get uh like if you have a two conductor transmission line you can get the even and the odd modes and then you know the S parameters don't really care whether what port you're on it's just uh it'll import from open parium 2D the uh Port setups so strictly speaking you know I don't see a limitation with doing multi mode at the ports that was always the intention of supporting that I just have not built up those examples ye
t to uh to solve it and then uh and then work out whatever issues I have but that's always been the intention to support that yeah I guess not coming from as much of an electromagnetics background it it's always confused me because if you I guess look at it here it's like it's almost like your gamma so if you on like the lower left here you have this n cross D cross e uh is equal essentially gamma e and so then what your boundary condition ends up looking like it's like Gamma One Plus gamma 2 ri
ght so it's like is that does that physically make sense is that actually what happens I right now what I think will happen is you can only pick one gamma and so if the gamma for the two ports is radically different I think that will introduce an error U for the engineering I see okay but I think for the Eng you get the same 3D solution essentially but then you calculate scattering parameters into each of the modes and the 3D solution is the same it doesn't really care because the damping on the
other side is the same yeah oh that sense yeah so so that that's in effect implementing the A first order absorbing boundar condition so it when you use gamma for one mode say the odd mode U you'll be matched then but for the even mode the gamma will be slightly different so you'll be slightly mismatched for the uh even mode and so that will distort the solution slightly right uh for so I don't know how much all that is will affect practical applications uh all I can really do is just start bui
lding up uh good examples and seeing how it goes and then maybe I'll figure out a clever trick to get around that but that's sort of what I'm expecting right now uh but in the real world applications I'm I'm uh familiar with uh the even and the odd mode gamas aren't really very much different so and you're primarily insur interest in say the odd mode so if the even Mode's a little bit off uh you really don't care that much I don't think so I'll have you know it's only you know I'll find out when
I start working my way through those yeah that makes sense um yeah if no one else has anything I wanted to maybe draw your attention so there's a ton of overlap here with a project that I work on um called Palace um I don't you mentioned that there's maybe a lack of open- source solutions for uh computational electromagnetics and that's kind of we had the same ideas um that's the AWS one yeah yeah we got started at the exact same time we uh right we looked around and said there's nothing we nee
d so I'll go do it and then not knowing each other's efforts we been kind of doing the same thing yeah so we come much more from a solver's background and a computational background I'd say than in actual traditional computational electromagnetics or just straightforward electromagnetics or E backgrounds like both of us have mechanics and fluids backgrounds um but so we're much more focused on that but the use case is very much the same so we do all of this stuff um and at scale and it might be
something to check out or combine like we'd be we'd love to have your expertise um could be pretty fun and we could build some pretty cool stuff so like we we do um like we call them wave ports numeric wave ports but like solving 2di can value problems and driving Solutions calculating s parameters all that stuff um and then we have adaptive fast frequency sweeps also to like speed up the whole process better yeah thought if you want to reach out please do sure sure yeah I I thought it never hur
ts to have two people trying it but you know you're I think think you guys are targeting extremely large applications with uh using uh web re uh Cloud infrastructure and I'm thinking that my target audience is just an engineer with a computer at home who wants to play with some ideas that maybe wants to start a startup maybe wants to uh just educate and so uh I'm kind of intentionally not running Cloud stuff or gpus because my target audience is a guy with uh a mo you know just a regular home PC
and U and so I'm kind of trying to optimize for that use case while while true um like we certainly do Target large applications uh I guess maybe one of the driving principles behind both MFM and also uh our code is that it can be single source and do both yeah so I run a ton of stuff on my laptop um like I can solve a 5 to 10 million degree of freedom I can value a problem on my laptop on like a Macbook in a couple like in 30 seconds it's kind of absurd um like so the performance benefits that
you get from cloud scalability and all of the like memory bandwidth improvements that you get also lead to being able to run on lighter Hardware in our experience and so while yes we do Target large Hardware there's nothing Cloud native about it it is a C++ code that you download and build um okay and you can build it on youron machine and run it on as many cors as you want um whether you have a GPU or not so very much so it applies to both scenarios okay okay uh next thing Brian one more time
thank you Brian it was a very nice talk yeah thank you for the invitation and uh I think Aron will be in contact with you maybe if you can share your slides okay yeah sure [Music]

Comments