#731 – E&M Reality Emerges with Robert Fennis

01:22:07
E&M Reality Emerges with Robert Fennis cover art

Download episode · 91 MB

Also on Apple · Spotify · YouTube · RSS

Show Notes

Robert Fennis is an RF engineer and consultant from the Netherlands and the creator of EMerge: a free, open-source 3D Finite Element Method (FEM) electromagnetic solver written in Python. He joins Chris to discuss demystifying the black magic of RF engineering, the mathematical and physics foundations of simulation, and how Emerge is “the IKEA of FEM solvers” in that it makes electromagnetic simulation accessible to everyone.

Timeline

  • Chris welcomes Robert Fennis, creator of EMerge, to discuss RF simulation as a way to unlock knowledge of the universe. (00:00:15)
  • LinkedIn Shout-outs: Chris and Robert praise the amazing RF visualizations done by past guests Lukas Henkel, Sam Aldahar, and Katerina Galitskaya. (00:01:20)
  • The Wizard School of RF: They discuss how RF engineering is often seen as a black magic wizard school of electronics, despite being normal to Robert. (00:03:10)
  • Pyramid of Knowledge: Robert explains how learning RF and simulation is like building a pyramid step-by-step, where you have to understand waves, ports, and S-parameters rather than trying to build it all from scratch. (00:05:00)
  • Python and LLMs: EMerge is written as a Python module but utilizes fast external libraries under the hood. They talk about how script-based engineering allows LLMs to assist by writing simulation code from existing examples on the EMerge Hub on GitHub. They draw a comparison to OpenSCAD’s parametric code-first approach in mechanical design. (00:07:30)
  • The Big Three Full-Wave Simulation Methods: Robert explains how full-wave solvers attempt to approach exact solutions to Maxwell’s equations. (00:11:30)
    • Finite Difference Time Domain (FDTD): A time-stepping method that operates similarly to movie physics engines, marching forward in time. (00:12:15)
    • Method of Moments (MoM): A method solving specifically for currents and voltages on conductors, using Green’s functions to calculate interactions without discretizing the surrounding air. (00:13:40)
    • Finite Element Method (FEM): A frequency-domain solver derived from variational calculus (the Principle of Least Action). It solves for complex electric fields in the airspace surrounding conductors, treating conductors as boundary constraints. (00:15:10)
  • The Veritasium Switch Video: They connect the physics of FEM to the famous Veritasium switch debate, noting that energy travels outside of wires. This is why FEM solvers must discretize the surrounding airspace to capture the physics, as famously illustrated in the Veritasium switch video. (00:18:20)
  • The Challenges of Real-World Boundaries: In FEM, boundary conditions define where the simulation ends. Choosing the right boundaries is critical because perfect electric conductors can introduce unrealistic internal resonances. (00:20:45)
  • Simplifying vs. Overcomplicating Models: Mentor advice on simplifying models to ensure convergence. Robert warns that adding too much detail quickly exhausts RAM, which is currently expensive. (00:22:15)
  • Frequency and Detail: A rule of thumb is that higher frequencies make small details matter more. Right-angled corners on PCB traces act as parasitic capacitors at 10 GHz, and silk screen on a 2.4 GHz patch antenna can completely de-tune it. (00:24:30)
  • Bluetooth Antenna Design Workflow: Chris shares his fear of designing custom 2.4 GHz antennas for boards like the NRF52840. Robert outlines his step-by-step customer consultation process, evaluating orientation and directivity (omnidirectional vs. directional). (00:32:15)
  • The Logarithmic Scale of Decibels: Squeezing S11 reflection coefficients from -20 dB to -25 dB only wins a fraction of a percent of energy. Since receivers have massive dynamic ranges, aiming for -10 dB or even -5 dB is often perfectly fine for non-critical systems. (00:36:40)
  • The Incremental Design Method: Instead of modeling the entire system, start with the simplest geometry (e.g., a simple square patch or wire). Find the length where it resonates, and then introduce components like plastic enclosures, screws, or clips one by one to see how they shift the resonant frequency. (00:41:20)
  • Working with Ports in EMerge: EMerge uses lump ports (numbered starting from 1) for PCBs and computes S-parameters like S11, which can be plotted on a logarithmic scale with the built-in plot_SP function. (00:44:50)
  • Alternative EMerge Applications: (00:47:45)
    • PCB Filters: Designing microstrip and coupled-line filters on FR4 or Rogers substrates. FR4 is risky due to variations in refractive index, making simulation validation highly valuable before spending money on expensive substrates. (00:48:10)
    • Radar Cross-Section (RCS): Modeling how objects scatter electromagnetic waves. (Note: Large stealth bombers are computationally impractical for EMerge, but smaller models work). (00:51:30)
    • Power Dividers: Tuning Wilkinson power dividers. (00:52:45)
    • Crosstalk and Signal Integrity: Making sure high-speed 1 Gbps bitstreams arrive intact without degrading or leaking into other ports. You can view an example crosstalk simulation on the EMerge Showcase page. (00:53:30)
  • Under-the-Hood Engineering and Performance: (00:55:00)
    • Robert shares his story of spending a week straight getting 3D solver matrices to assemble and solve. (00:55:15)
    • He highlights that 98% of the effort in building a solver is computational geometry (meshing), for which EMerge uses the GMSH library. (00:58:30)
    • Linear algebra is solved using Intel MKL on x86 platforms (thanks to Olaf Schenk) and Apple Accelerate on macOS (thanks to Dr. Jonathan Hogg). (01:00:15)
    • The solver assembles sparse coordinate matrices converted into compressed column storage. (01:02:00)
    • Robert wants EMerge to be the IKEA of FEM solvers—not perfect, but free, accessible, and good enough. (01:03:50)
  • The Nightmare of Importing PCBs: Why computational geometry makes importing PCBs incredibly difficult. (01:08:15)
    • Gerber Files: Aperture-based photographic formats. Approximating circles with polygons can lead to tiny gaps that crash mesh engines. (01:09:45)
    • STEP Files: They model trace thickness physically (which is unnecessary for EMerge) and cause floating-point rounding errors on round holes. (01:11:30)
    • ODB++: Robert is using Claude/AI to help write an ODB++ parser. (01:13:00)
  • Method Chaining and the Builder Pattern: An alternative to importing CAD files is describing geometry programmatically using a method chaining philosophy in Python (e.g., drawing traces with straight, turn_right, and skip functions). This forces the user to keep things simple, making the design additive rather than subtractive. (01:15:45)
  • Closing Thoughts and Consulting: Robert runs a consulting business but emphasizes that the open-source software is GPLv2 and has no warranty. He prefers teaching clients how to use the software and run simulations themselves. You can connect with Robert and other RF simulation enthusiasts via the EMerge Discord community. (01:19:30)

Transcript

Chris Gammell: This is the Amp Hour Podcast. Released August 19th, 2026. Episode 731. E&M Reality Emerges with Robert Fennis. Welcome to the Amp Hour. I'm Chris Gammell of Contextual Electronics.

Robert Fennis: Hello, and I'm Robert Fennis. I'm an engineer from the Netherlands, and I wrote Emerge, the free open source finite element solver in Python.

Chris Gammell: Welcome, Robert. How are you? I'm good. I'm good. We're going to satiate my increasing interest in the RF space, and my dumb questions will be plentiful throughout this interview, I'm sure. Robert and I were talking before the show about other guests we've had on about, like, this is a common trend, Lukas Henkel and Sam Aldeher and Katerina, that's it. I couldn't remember first, I didn't remember the last name. Yeah, Katerina Galizskaya. So all of these people are doing like visualizations, amazing visualizations, both on LinkedIn, elsewhere, and basically kind of simulation is this like unlock for the knowledge of the universe. So, Robert, I don't know if people have said this to you, but you are unlocking the knowledge of the universe for dummies like me.

Robert Fennis: I'm not as literally as that, but I love it. Yeah, I think RF engineering, you know that I've learned very late in my career that RF engineering is considered like the black magic wizard school of electronics. I never knew that.

Chris Gammell: You're just like, this is just normal for me. Yeah, it's like, you know, I keep growing up in the circus is like, yeah, I do backflips. What's the big deal? You know?

Robert Fennis: Yeah, well, the analogy is there also because, you know, kids in the circuit, they took many years to practice all these backflips and from that point on is normal. And then, of course, it makes sense looking back that if you just try to do it from scratch, it's like, oh, that's a far path. So I can totally understand. And it's built on a lot of mathematical concepts that you learn in university. So I can totally see how there's this. It's tough to get into compared to other fields where you can more easily, like, heuristic your way through it. I think more so than with RF. But I'd love to try to see if I can bridge that gap, you know, with these, what you call stupid questions. I think probably good questions. No, we'll see. Enlighten things and explain them.

Chris Gammell: I think one thing that is like a true barrier, though, is that like a lot of this stuff in the simulation space, in the RF space generally, it's like, it has been targeting, you know, high-end, military, industrial, even consumer, but it's truly high-end stuff. You know, so an ANSYS license, an HFSS license, these are not normally accessible. One thing that was interesting before we started recording is you talking about some of your university access and like being able to do it and like build your own knowledge based on this repeated simulation and trying the stuff you're TAing, right?

Robert Fennis: Yeah, absolutely. And I think with a lot of concepts that are, you know, that are very overwhelming to learn, I always imagine like a pyramid. If you already have a pyramid and you try to make it one higher, you just have to, you know, build an extra layer on the slope. But if you try to build a pyramid from scratch, you have to build everything below it as well to hold it up. And it's with knowledge, if you go through it in a step-by-step way, then, you know, learning the next step is, you know, you have to take some extra concepts on board. But if you go through it, you know, from scratch, and especially simulations, like you have to know what a port is, you know, you have to talk about waves. And then with waves, you're like, oh, should I talk about S-parameters? And then you have a forwards and backwards wave. And how does that interlock? So there's so many new things to take on board. Yeah. Where do you start?

Chris Gammell: It's a thought. Well, that is interesting. So when you think, so you have the software called Emerge. It is a Python script, but also like now there's been additional LLM tooling on top of it. I think that's kind of been an additional kind of accelerant. Is that right? Yeah.

Robert Fennis: Yeah. Well, so the, so the, yeah, it's, it's a, it's basically simulation software, but it, it's a Python module and it calls external libraries for the, the speedy stuff and NUMA to accelerate some of it. And so you, you, you type out your simulation as a script, which is a very large barrier to entry for a lot of people, because it's much more intuitive to just click on boxes and see them and change sizes. But if you do engineering, like every in an RF engineering and antenna specifically, like every dimension matters. So you're not winging anything. So you're typing out the dimensions very specifically anyway. So you might as well type them into a function, but that doesn't make it complicated. So what, what makes LLMs very cool is that you can give them a whole bunch of example scripts from the GitHub and they can figure it out and they can sort of play that role. If I see what you want to do, let me type it out and try to build it. I don't know how good they're at it. I'm seeing more people now using it more successfully. So it's a cool frontier. I probably should do something to, as an interface for the LLMs to, to, to learn about my package, but it's a,

Chris Gammell: well, I think Python is, is a lot of the, a lot of the clankers are great at Python to start with. I think another thing, like just as a comparison point, like I've always hated open SCAD in the mechanical realm. And yet it is like ramped in popularity because it's like, Oh, it's open. It's free, you know, free and open source. And then also it's super parametric and like, and it's code defined all of these things. Like LLMs are great at. I, I, some of my very analytical engineer friends were also great at that for open SCAD. I was always just like, can I just draw it? You know, like, like I want to be visual about it. And so it is that kind of, it feels like in a similar space as well. Um, yeah. So yeah,

Robert Fennis: a hundred percent. I can definitely recommend people if they're messing around with it and they're getting a hang of it. And if they're seeing the scripts and sort of seeing what the constituent parts are to really look at what they're actually generating and how to do it yourself, because very complicated geometries are sometimes surprisingly easy to type out. But what the hard part is you have to sort of visually remember like, okay, now this coordinate has to sort of be added on top of that other one. And there's very little feedback. You can in the merge call a function to see what you just did. So you can sort of go through that process, but it's, it's something you have to practice. Like it's, it requires a lot of visual imagination, sort of seeing it or draw it out on paper and just say, okay, it has to be that dimension. But once you get it, it's yeah, it takes a bit, but, um, in the end, it's probably worth it also to do it yourself maybe, but, I definitely a hundred percent support people using LLMs, especially like, why should I use this board versus something else? They will know the answer. So they can definitely help you set up and make the right choices there.

Chris Gammell: Can you give us like a, not a competitive analysis, but just like a, the other side of the coin, like the way it used to be like just 10 years ago, right? So software packages that are out there, things that you've used in your past. Like if, if I was indeed a hardware dummy as I am, uh, if I was walking into a, an RF job, what was some of the stuff that I would expect to see on someone's computer? And then what was that experience like as well?

Robert Fennis: Oh, that's a good question. So I, I often caveat this by saying that I started working at my first job at Dallas in, what was like the 2019, right before the pandemic. Um, so I, I don't have that like historical historical experience, but I've, I've been trained by someone who has, who literally came from that age where like the first version of H, HFSS. So to give a little bit of background, perhaps is, so what we're talking about in this case is finite element solver. There are three popular methods in electrodynamics. If you want to simulate things, full wave, it's find a difference time domain method of moments and find an element method. Um, so this is just one of the three time find a difference time domain is literally, it's almost like the electrical engineering version of how these physics simulation would run in movies. You time step through it and you see how things evolve. Method of moments is a very complex thing where I'm not an expert at it and it's pretty hard to explain. Find an element method is it's in this case, it's a, it's like the frequency domain version of the find a difference time. And what that means is you say, what's the solution at this frequency? And then you do it at a different frequency and then it's a different thing. You pick 10 and then it's usually enough to capture most of the behavior. Or maybe you do 20 or 30 frequencies. Um, we could get into the details of how that's all that method works, but it's, it's pretty.

Chris Gammell: I actually, I would like to do that because it's interesting. It's like the input. I'm just kind of like in my mind, I'm thinking like, Oh, okay. There's like probably a lot of dielectrics and material types and geometries and things like it, but maybe less so about like the, uh, like the moment by moment type of things, right? Like the,

Robert Fennis: yeah. So, so to try to see if I can sort of give like the broadest view and the most, uh, like the most abstract view, top level first. So what I said earlier was full wave solvers. So for people who don't know full wave solver, how the difference from other ones is that in principle, what you solve approaches, as you get numerically more precise, you approach an exact solution to the physics and the physics of electrodynamics and circuits is governed by the Maxwell's equations. And you also have, uh, non full wave methods and they approximate a solution. So they never get to the true answer, but in many cases they get close enough. And in those cases, they're much, much faster than full wave methods because they can skip a lot of stuff. So ray tracing, for example, like optical, yeah. Optical ray tracing would be like, uh, what you would get if you, if the wavelengths are so small and your problems are so large that it's, that the electromagnetic waves behave optically, like it's like a laser pointer is a laser pointer. They're technically pointers. They diverge eventually, but that's basically where you can make the ray tracing assumption. And so the finite element method is, so the finite difference time domain literally looks at the electric and the magnetic field and, and simulates them over time. So by taking time steps and then, uh, taking smaller, like in, in, in, in Georgia called oiler forward oiler methods, then the method of moments is with the method of moments, you specifically solve for currents and voltages. So you don't have to discreetize the air around it, right? You just have to look at, you, you basically ask what are the currents in my specific points in space in my conductors. And it requires like beforehand knowledge of how a current here would impact the current there by something called grease,

Speaker ?: grease,

Robert Fennis: grease functions. And so you have to know them beforehand and they get, get mathematically tricky to evaluate, but then you basically create this large system where, you know, how each current would impact every other current. And then you ask the computer to solve for which distribution is like internally coherent, basically, and make sense because otherwise you get a lot of large currents here, but then this should also be a large current, right? Because they influence each other. So it figures out which one is self-consistent. And with the finite element method, the math comes from, like, it took me a long time to get in it. The math comes from a variational calculus. So if everybody, anyone heard from the principle of least action, that's just like something you learn in physics, like physics takes the lazy route. This is the more generalized version of that. And you literally, it's like mathematics. You have like a scoring system for what a solution could be, but you don't know what the right one is. And you, and you formulate it in such a way that you can mathematically figure out which one gets the best score. And the best score would that one, in that case, be the, this is very, like, mathematicians would, like, get mad at me and throw a keyword at the screen. Don't worry, they don't listen to this podcast. Yeah. Roughly speaking.

Chris Gammell: I'd love to hear from you.

Robert Fennis: Roughly speaking, that's what you're doing. You're formulating the problem in a way that you sort of have to figure out which function is the right solution. But an important part is that, you solve for the electric fields. And you solve for it as a complex number. And because of that, you don't have to solve for the magnetic fields. You can infer that from the electric field. But the electric field doesn't live in conductors. It lives outside of them. So you simulate the space around the conductors. You don't simulate what's happening inside the conductors, because the conductors are just a constraint on what the electric field is allowed to do. And that makes it slower in cases where you have a lot of space where these electric fields must exist. But it's very, the finite element method is extremely flexible in what you can do with it, and what geometries you can model. The method of moment, you require that a priori knowledge. And so the simplest ones cannot deal with some geometries. So you have to add a lot of extra knowledge in there. The finite element can get very generic.

Chris Gammell: So if there's a perfectly spherical cow emitting milk in every direction, you care about the milk, not the cow. Is that a fair... Exactly. To use the old physics joke? Yeah.

Robert Fennis: There's a video, I don't know if you've seen it, by Veritasium's channel. And it was a very controversial video. It raised a lot of turmoil.

Chris Gammell: Turning on the switch?

Robert Fennis: Yeah, about turning on the switch. And where the point was that the actual energy travels outside of the wire. And that's very true. That's a very core thing in electromagnetics, or in the finite element method. In method of moment, you sort of... That information is in the Green's function, so you solve for the currents. But in fact, that's why you have to model the space around the wires, because that's where the physics is actually happening.

Chris Gammell: I mean, listeners of the show will know, when that all came up, and my co-host Dave, and many other people had lots of opinions, I'm like, I don't know, just measure when the light turns on. I don't care. Like, I'm more of an empiricist, I guess you might say. Like, I don't know, just like, wait and measure it, I guess, you know?

Robert Fennis: I mean, it's a completely sensible view. I guess the point is, in this case, is when I've seen that sometimes people, especially when they come from the method of moments method, and we'll get back to your question now, because we forgot about that, is that people forget to discreetize, to create like the airspace around their geometry that they want to model, because the fields are in there. If you model the electric field around the trace, it's also above the trace in the air, above the trace. Right. So that has to exist in the model to model.

Chris Gammell: Right. Well, just as like an optimization thing as well, right? You're, you're probably not, you don't have perfect knowledge of everything that might be in a space. So like, to use the Veritasium example, they had this huge, long looping thing, but they're like, and it's all a gap in between, right? Like, they had this big loop, but they didn't say there was like, another planet in the middle, but that could impact things. Is that kind of the point? Yeah. If there are other things in the mix?

Robert Fennis: Yeah. You, you don't know that beforehand. So, and you get very interesting cases as well. If you model like a, like some circuitry on a printed circuit board, you want to know, maybe you can make a trace with just like coppers by just giving copper the correct shape. You can make a filter that filters out some frequencies and let's through others. Right. And so you need to take into account the air around it. But then the question is the D by default in the finite element method, that you said that the boundaries of where the simulation domain stops or where I don't discretize my, my volume anymore, that's perfect electric conductor. And people are like, okay, but should you have that? But because if you have a perfect electric conductor, you can get internal resonances and suddenly your filter spikes and it doesn't, or it kills things. Got it. But it's there in reality as well. If you build a high frequency circuit and there is an enclosure around it, that's a metal box. You can get these spikes in practice as well. So it forces you to think of the actual stuff that is around. So to go back to your earlier question, traditionally the, the big players in this field are HFSS by now it's synopsis. It used to be answers and it has a whole history. And I don't know to that. And then you have from, uh, from Europe, you have the salt now has CST microwave studios. And, uh, another big one is console. Multiphysics is another player. And there are a bunch of other ones that are specifically focused on perhaps signal integrity. Yeah. And they're very, now they're very graphical user interface heavy. So you design it with like a box and a sphere and you cut the sphere from the box and add a cylinder and you assign the materials. And then you set up the boundary conditions, your press run, and you have your data and all those command steps are now, I tried to make it as similar as possible. You now type them out in Python, basically. Got it. With the advantage that you have your data now.

Chris Gammell: Got it. Well, just as like a high level question then. So, uh, you said it's important what you do include in the simulation. It seems like most simulations, I, I'm just hearkening back to my early spice days. And I know that that's a different beast entirely, but I just remember like my mentor was just like, you got to simplify, you got to simplify. They get the things that you can actually understand in there. And of course, young Chris was like putting in a whole schematic of things that I didn't understand. And of course it didn't converge and it sucked and whatever, but like, so where are the, you know, in, in broad strokes, how much do you have to know about a system in order to, to use emerge to like really understand things or really maybe, maybe not even just emerge, but in the simulation space, do I need to know that there's a hand in there or that, you know, or do I have to model every time there's a human in the meat bag in the space or, you know, a metal box around it? Like, how do you know?

Robert Fennis: This is, this is the question in a sense that like the easiest answer is just put anything, put everything in there, all the detail that you want, and then you're sure that everything is in there. The problem is that very often with the finite element method, the cost is that you run out of RAM and the audience knows RAM is now extremely pricey. Yeah. Right. So, and you can very easily, yeah, you can very easily grind through all of that. So you have to make smart decisions and those are not easy decisions to make. And a lot of simulation mistakes during the product development, phase are almost always that forgetting to put things into the simulation thinking, ah, it's not important, figuring out it is important. And a rough rule of thumb is that the higher the frequencies go, the bigger problem, small things become. So if you're in like one gigahertz below that, then usually, you know, you can make most of the big things, but you don't care as much about smaller details, but as you get to like three gigahertz and 10, 24, then everything starts to matter. Every little, like a PCB trace. If you just take a straight right angled corner, that little corner on the, it doesn't really matter. One gigahertz, but at 10 gigahertz that, that corner matters. It's a tiny capacitor and you have to cut it off.

Chris Gammell: The right angle thing, the right angle thing, that off that startup, you get to start a war with this. This is like the, that's, that's the Helen of Troy of the electronic sphere. You know what I mean? Like,

Robert Fennis: yeah, but it's, it's, what's very funny about it's to me, it's, it's not even a point that there could be discussion because there's just an answer to the question of whether it's good or not. The low frequency doesn't matter at high frequencies. It does. And so far as your system cares about it, it could, maybe it doesn't matter for the system that you have, because in, like if you have a bit stream of ones and zeros and you know, it can, it can incur some degradation, right? Yeah. But it's still roughly intact. But at some point it could matter if it's bad enough. If, if you have a long enough trace or you make a lot, but usually it's up to like the 10 gigahertz. When you go in that direction, it gets progressively worse.

Chris Gammell: Yeah.

Robert Fennis: So, but those, those, your answer is, I don't know,

Chris Gammell: just go run the simulation, man.

Robert Fennis: Yeah. It's, well, it's the answer is it's a lot of experience and mistakes that I make. For example, I, one of the first things I simulated and built myself was a, like a printed circuit root patch antenna at two gigahertz. And I, I worked a lot, but I never, because I worked in the military industry projects take so long from start to finish. And I, I only dropped in the middle of a project. I never went through that design cycle myself from start to finish. So it wasn't. And one of the things I forgot was that the silk screen on top of the trace absolutely matters. And I completely forgot about it. It's like, ah, who cares? Cause it didn't go through the design.

Chris Gammell: I've never seen one on the board, but like, why not?

Robert Fennis: And they're a nightmare to model in the finite element method. You have to sort of either remove them from the printed circuit board or wet thumb it because it's way too thin to model. It requires way too much detail. So that's actually, that sort of stuff. And even I make mistakes and you get better as you do more of it. Um,

Chris Gammell: got it.

Robert Fennis: And so, yeah,

Chris Gammell: got it. So experience still matters and battle scars are still going to inform your future experience. There's no shortcuts I'm hearing, which sucks. Cause I want some shortcuts and, uh, yeah, you just gotta do it.

Robert Fennis: Shortcuts. A hundred percent. Um, you know, if you want shortcuts, like I'm all for LLMs, especially in the case where you're getting outside of the knowledge space that you have, like I can't program C or C plus plus. I'm just a Python. That's all I can do. But for some of the solver interface that I needed, I needed some, some quick C C wrapper to communicate with the C library. I let LLMs do that because they're much better at it than I am. Ask an LLM, maybe not, you know what the answer is, but I want to know if this detail matters, what could be a simulation or something very simple that I could test to see how it impacts something. And maybe it knows an answer. You can riff around it and figure out like, could this matter? And if it has some answers, come up with an experiment that you can simulate very quickly to figure out if it's correct or not. Yeah. And go through that process. You can validate a hundred percent. They will have very good insights.

Chris Gammell: Sure. Sure. But it's still about like, you know, human brains, like building our own mental models. Right. Because like, it sounds like to me, like it, you could tell me a thousand times that the silk screen matters. Right.

Robert Fennis: Mm-hmm.

Chris Gammell: But I have to have, feel the pain on the bench being like, what the hell just happened? Like that scar tissue is ultimately is going to create a mental trigger that the next time I'm like, Oh, don't put silk screen there, Chris. That's a bad idea. You know what I mean? Like it's like building mental models is a, is a visceral, like you need to have the experience and like LLMs do offload that a little bit. And so it's, it is interesting that idea of like having LLMs prompt you to run the experiment to feel the pain, like just like try all these different things, you know?

Robert Fennis: Well, that's a good point. What I mostly meant is to have them figure out in which way you can generate the scenarios for you. So let's say, let's say this is the question, like, does my silk screen matter for my application? You ask it, like you figure out what's the frequency range. And then maybe you guys can help me set up a very simple simulation of a patch antenna with and without a silk screen and then run it and see the difference, see what the resonance frequencies are and how much they shift. And then you can tell if it's an issue or not and feel the pain in the results or ask it to help you set up an experiment that would be a good test for it. So it's more so getting familiar and specifically with things that you never think about, like maybe what might be some things that I'm not thinking, could these Vs matter and it will give you some answer and then it might prompt you to, well, maybe this is something interesting to look into.

Chris Gammell: Yeah. But definitely do it. That is the question I was asking about like, how do you know what to put in? Like that is like trying to just get your arms around the, you know, like, Oh, I could like design a teddy bear into the simulation, but probably doesn't have much impact, but like getting someone either an experienced voice or LLM or something like it, just to be like, check these things first and get through the simple list before you put in just the random crap that's laying around your house, you know? Like, okay.

Robert Fennis: Yeah. It's a good, something good for people at home, perhaps to take away from this is, this is, if you do a lot of simulations after a while, you just get some sort of internal intuition for how electromagnetic fields tend to behave. And one thing is you can, you know, this video, this hilarious video that's online where you have like a, one of these children's boxes with all the shapes, you have to put the shape and then you can fit the square into every single shape.

Chris Gammell: Yeah.

Robert Fennis: You can imagine, for example, electric, the electric field, or an electromagnetic signal at some frequency as some sort of ball, but it has a polarization. So it's maybe round in its shape originally. So maybe this is like one gigahertz. It's about this size, but it also has a polarization. So if I have a, like a metallic wire, well, that there's vertical, if, if they're aligned with the vertical wall, they won't want to go through because the electric field induces a current in the vertical wires. And that current will oppose the, will basically say the field has to be zero. So it doesn't want to go through. But if you rotate it, it's orthogonal, it's willing to go through. And so you can sort of imagine that thing as like, if I have a tiny screw, like a thin vertical pin, and this wave approaches it and it's in, and it's parallel to the, to the wire, it will see the wire. If it's 90 degree flipped, it won't see it and it will go through. But if it's very small, or in other words, if the pin is now very big, even that thickness could be thick enough that the electric field will see it and it would still interact with it. So things typically have some sort of like the electric field or electromagnetic signals have this sort of size thing where if something is like, if it's like a football and an object is like this shape of your thumb, basically that ratio, then if it's a wire with that cross section, the electric field would see it, but otherwise it's usually too small. If they're about like a football and a fist size, then you could start seeing small effects. So you can, you can get a sort of vague intuition of whether details can matter.

Chris Gammell: Yeah. Yeah. Yeah. Yeah. It is interesting. The, those like, uh, orders of magnitude, right? That's kind of what you're mentioning here, right? It's like orders of magnitude and like what actually matters. Right. And I just, again, just taking it back to my like spice simulation thing. It's like, yeah, that, that one, that one ohm resistor that it doesn't matter for this calculation, whatever it is. Right. You know, it's like, yeah, just understanding like that matters here. This doesn't, this doesn't, that really matters. That, that kind of idea is you're pulling, pulling stuff out and making simplified models of your own systems. Yeah. And mental models to then try and forward calculate for future things.

Robert Fennis: Yeah. A hundred percent. And what, what I do myself is usually you start with the simplest model that should in your mind, do what you think it does. And if it doesn't do what you think it does, you add more detail that you thought maybe wasn't relevant. And even if you, you are there, you will, you might still make, maybe add this detail, see it, if it does have an effect. And maybe it doesn't, if you want to check it and you're going to make the mistakes. Also, you're going to forget some things that you never thought about. It will still happen, but it's, it's also a procedure that you go through, especially with them because round things, especially thin VIAs, for example, are a nightmare on the mesh engine that has to discreetize the space. And I didn't build that one. All props. I have to say to Christophe Gozin and Jean-Francois, they built GMSH and it's amazing. But if you have a lot of people have like a lot of VIA cylinders in their printed circuit board and they want to import it, but they're a nightmare to mesh. They require a lot of elements and it doesn't add much detail, especially if you're like a wall VIAs around a trace, you could just as well add a, a copper solid wall.

Chris Gammell: I'm going to switch to, to square, square VIAs. Cause I can try, I could ask JLC if they do that, you know,

Robert Fennis: that would be great. Well, you can, most of the times you can model us around VIAs, the square way that will do the same thing, electronically, because your simulator doesn't see the difference. The fields. It's just like, it's just a short. That's so, yeah. Okay.

Chris Gammell: So if you don't mind, can we, so I've been doing Bluetooth stuff lately and I mentioned you before the show, I, you know, I've done stuff before where I'm like trying, I've used chip antennas. I've used, you know, UFLs to go out to regular antennas, but I've always been like scared to build my own antenna. Is this like, so first off, is, is that a good task? Like an onboard antenna for like a Bluetooth chip and like, and then is that a good example that we can maybe walk through as a, is a hardware dummy.

Chris Gammell: absolutely. Learn some hardware, learn some stuff. Yeah, absolutely. I think it's a great one. Okay.

Robert Fennis: So where do we start? So, so is the context here that you have like an effort for PCB, two layers, maybe like top and bottom layer.

Chris Gammell: And you want to add a four layers. Come on. I'm not an animal. Four layers. And yeah, so like four layers, you know, like I use a lot of like NRF 52, eight forties. Those are like, you know, you know, 10 year old Bluetooth chips, cheap, available, that sort of thing. I like the software side of things. So yeah.

Robert Fennis: Is that reasonable? Yeah. Yeah. So I, we can go through sort of my process as how I would approach this. If like a client, for example, a customer would come to me and say, I need help with designing this. The first thing I want to know is where the application is. Given the orientation of your printed circuit board, does it know where to radiate to, or could it be radiating to any direction? You don't know.

Chris Gammell: Audio just dropped out as I was replacing my Bluetooth. I'm sorry about that. Can you hear me? Okay. Okay. Sorry. Yeah. Yes. Please.

Robert Fennis: Like a wave. This is, this is the part to cut out.

Chris Gammell: That's right. The orientation of the circuit. Is it good now? Yes, it is. Thank you. Sorry.

Robert Fennis: Yeah. Okay. So, so the question I had is, is you say, if you're in there, the first thing I wonder is given that you have it in some position, do you know beforehand where the receiving or the other antenna that you want to communicate with is, or could it be anywhere?

Chris Gammell: I'd say.

Robert Fennis: And that might depend on the application. Anywhere. Yeah. Exactly.

Chris Gammell: So I think anywhere is a general, well, unless it's easier for this conversation, we can maybe make a point to point, you know, like two, you know, it's not like a horn antenna. No, no, no. Yeah.

Robert Fennis: No, no, no, it's, it's, it doesn't matter. The difference is that some antennas are directional. So they tend to send energy in one way and they can be more and more directional. And other antennas like dipoles or monopoles are fairly omnidirectional. There is no perfect antenna that radiates in all directions equally, but with the surrounding, usually you do get mostly that. So all the standard ones, like, uh, like wire antennas, like monopole dipole antennas, you have like, um, for, for PCBs, you, I don't know much about them, but you have to invert it F antenna, which you probably have seen maybe in photos, something like that. Yes. They're all in the end. They're all variations of basically doing the same thing. Think a wire. That's about a quarter wavelength that is resonating.

Chris Gammell: And yeah, yeah, yeah. Yeah. I mean, my, my biggest exposure to it, you know, usually it's again, fear based just, you know, so it's clear. It's like, Oh yeah, here's the 2.4 gigahertz antenna. There's a key cat footprint for it. That's in the library. Like, yeah, just, you know, YOLO. Uh, and I'm like, no, no, thank you. I would like to follow a vendor. I'll buy a chip. I'll pay more. I don't care. You know, like not saying that's much better either. Yeah.

Robert Fennis: No, but it's, it's look, I've, I helped someone else who, um, Bluetooth antenna for like two bucks on eBay. And if, if that person doesn't care and it wasn't to just get it very cheap, I'm not going to sit there. No, you have to pay me. I don't know how much to design one for you or to do it yourself. No, buy the cheapest thing that works. What, you know, why make it more complicated than it should be? But if you really want to try it yourself and want to do the design yourself, then yeah, give it, let's, uh, then you can figure out how to do it.

Chris Gammell: There's volume reasons though too, right? Like two bucks sounds very reasonable to you and me, and it might be proven out, but it's like times a million units. Like, Oh, actually no, no, no. It does make sense to put in the board and, you know, make lower your bomb costs, lower your, you know, if there, if there are true benefits like that,

Robert Fennis: if it lowers your bomb costs, then, then yeah, absolutely. Then, then it's worth it. Yeah. So that's, it's, it's a, it's a, it's a perfect example of, uh,

Chris Gammell: okay. So then in this case now we have, uh, so I guess we, we usually start from like a, you know, everything else is taken care of on a board. And then you kind of have this area that's devoted to it. And then you say, okay, now let's build an antenna or is it more like take a first shot and iterate and go back and forth? That sort of thing.

Robert Fennis: Good question. So for me, it's very application based, um, in the sense that if you have space, uh, in the sense that you can, you can do a lot of stuff and that I could basically ask you could, could I make an entirely separate antenna with a cable and put it somewhere if need, if need be. And you'd be like, oh yeah, that's fine. It doesn't matter. Then usually you can make things so much more simpler. Like integrated is very nice having things merge with something else, but it also makes your antenna design. It also forces the rest of the design to take the antenna into account. Right. It's like, it's like that family member. That's, that's, you know, that has very, a lot of special needs and you have to accommodate with, you know, the restaurant that you go through and stuff like that. So if you, if, if for your application, it doesn't have to be on board, it makes sense to think of it as a separate thing. If you say like, no, it's because it's a product, it has to be on boards. Then you immediately get into the point like, okay, what, what's going to be around it? Because that electric field, you have to imagine if, if the antenna does its job and the electric field is there, it's going to want to go everywhere. Is that an issue? And can we constrain it to stay away from regions where we don't want to, maybe some electronics or signal where we don't want it to go. Maybe it doesn't matter. And it couldn't matter for several reasons. So it's definitely good to think about this. If the product is, if it's very integrated or it has to be integrated with the product, because then you have to consider the impact of what the addition of the antenna may, may do.

Chris Gammell: I see. Well, even in the case of like, so say I drop a, you know, a UFL on there or something like it, and it, and then we design a separate antenna that's wired out, out to the, sorry, there's a wire out to that, you know, designed antenna. If it's still in the same enclosure, you still have to then pull in the original board and see how all that stuff interacts at the end as well.

Robert Fennis: Yeah. If it's in the same enclosure, I sort of assumed that the antenna could go out of the enclosure. You could stick it on top. Got it. Okay.

Chris Gammell: Got it. So metal box, wire escapes, get to ignore the box. Yeah.

Robert Fennis: Yeah, exactly. That's it. Okay. The box. Yeah. The box will, well, if it's part, if it's, if it's, yeah, the enclosure matters as well. Got it. Here's, here's a, here's a point for a lot of people to take, you can. Another thing that's very important is performance in the sense of what's the performance requirement from the system itself. And why do I say this? Um, a lot of communication chips like Bluetooth, they have like massive dynamic ranges in which they can operate. So like the max field strength that they can have before they clip and they, you know, they are overwhelming the receiver to the smallest one before it starts breaking up the connection. There, it's not like it's a factor of 10 between those levels. There's a fact of, you know, thousands, a hundred thousands of millions, perhaps. Yeah.

Chris Gammell: How well these log scale.

Robert Fennis: Exactly. And a mistake that I see a lot of people make is that the antennas, you very often look at the reflection coefficient. So if I offer a signal with a certain characteristic impedance, and we can talk about characteristic and what, what that means, then you get some sort of reflection and you want it to be low. And typically for an antenna, you say less than minus 10 dB, which is less than 10% of the energy is reflected. And a lot of people go, I could go from like minus 20 to minus 25. And I say, great. You just won like half a percent or like a percent of extra energy on top of the total of a hundred. Right. Did this make any difference in terms of performance and range? No, it didn't do anything. But even if you go up from say minus 10 dB, if you go to like, to like minus six or minus four, it gets worse, but it's the losses are still in the order of like half your energy is gone, but you have maybe another a hundred or a factor, a hundred or thousands of dynamic range at your disposal. And if in your application, you never get into that range requirements, even a terrible antenna that's badly matched. And it's just sort of a wire and it does something. If it works, it works.

Chris Gammell: Yeah.

Robert Fennis: And that's a very important one is people can spend a lot of hours optimizing the crap out of your antenna. But if it works, it works. Now you can do things stuff to completely destroy performance. Definitely. That's worth talking about. But a very important one to take into account. If you have like a wire design and it's like, Oh, it's like minus five dB. It's not great. Not well matched. You can still build it and it will still work fine.

Chris Gammell: Got it. Yeah. Yeah. Yeah. And you're saying that's because receivers are resilient for people. And a lot of applications. Yeah.

Robert Fennis: Yeah. You have a lot of dynamic range and, you know, you have a Bluetooth receiver. If I'm downstairs in the house where I'm never going to use this thing, maybe you can now go from like the stairs to your living room to like out of the door. Instead, if you have it slightly better, but you always use it in the same room, you know, and if you have your intent, you hold it here and then you're on the other side of a monitor. That's also like 10 dB loss.

Chris Gammell: Got it. So it's almost like a cost, like a time cost, a certification loss, a cost that sort of thing of like, and also manufacturing variability as well. Right. That was all kind of in play in, I'd imagine.

Robert Fennis: Absolutely. So, so the, again, the biggest point there is, is that because reflections, because like decibels scale very well in small numbers, you know, the step from like minus 20, 20 dB reflections to minus 30 is, like a factor of 10 and it makes no difference because you're literally going from 99% to 99.9%. So that's mostly the important, like for reflections, if it's roughly well matched, usually it's fine. There are reasons in high performance applications where you need a really good match, but for most people, that's not the case. So our goal should never be to make something perfect. It's to make it good enough.

Chris Gammell: Yeah, I see. Well, it's basically my whole career. Yeah. But I think perfect is the end of me, the good sort of thing too, because it might also, like people listening might be like frozen up and be like, oh no, I have to optimize this one mathematical thing in the simulation as well. And then you get out in the real world and not only does it not matter, there's things you didn't consider and all these other stuff too. Right.

Robert Fennis: Yeah. Yeah. A hundred percent. I had this, it's a friend of, uh, via via who asked some help and he just wanted the basic intent and he stuck one of these cheap, you know, monopole antennas that you can buy on a metal plate. And he said it worked better, you know, for directivity. It was better on one side of the plate than the other one. But the, the transmission was like, he lost maybe something like the vast majority of his energy because he literally put the printed circuit boards on the metal plates. And the electric field is, you know, is shorted by the presence of the plates. So it did it. So a tiny bit, but it still worked fine. So it says like, yeah, it's, it works fine. It's probably not a lot of energy comes out, but if you just put it slightly farther away, a quarter wavelength, then it radiates even more. But he didn't notice that degradation because what was important for him was that it's all going on one side of the plate and not around the plate to the other side. And that the patch didn't do that.

Chris Gammell: Got it. So I see I'm, what I'm hearing here is that success is guaranteed if I choose the right problem space that, as long as I don't have unrealistic expectations around the, you know, yeah, that's, that's great. That's great. So, okay. So now we have, so it sounds like maybe we should do the same thing where we're going to say, I have a board in a box, in a metal box, and I'm going to make a custom antenna that's outside the box for whatever reason I'm doing that instead of buying it. So then what is then the next step, you know, pulling this into a merge and, and working with it? Is it 3d models next? Or is it, uh, setting up parameters next? Like what, where are the pieces that we need to understand about it?

Robert Fennis: Very good. So, um, so with antennas, my advice is to, is you sort of, antennas can get very complicated. It seems to like very, very many different types and they all function differently, but a lot of antennas, if you boil them down are actually all the same antennas, just geometric variations. And so the simplest thing that I always recommend is to stick with the simplest variation of your antenna. That is the antenna that you're thinking of.

Robert Fennis: so for printed circuit boards, very often, what you just have is a wire that's, has a certain length. That's just,

Robert Fennis: yeah, you have a trace on your, on your PCB and it just goes outside of the PCB and it has a certain length and you hope that it resonates. And just take the simplest thing that does approximately that. Or if you say, or if you know, it's going to be an inverted F and Tana because they work well for some reason. It's like the simplest ones you can geometrically make and just get it to resonate at the frequency that you want. So what you would do is you, you would maybe draw on a piece of paper, the simplest variation. And what you think are those parts, you model the simplest version and you just press run and you take a frequency range. That's wider than where you expect it to be. Because if you don't model it quite well, the frequencies can shift, right? A lot of small details can have an impact on where the frequency goes. That would be the first step. And then you, and then if it's usually it's length relates to something resonating. So if it's a wire, if you make it longer, the resonance frequency goes down. And if it's too short, the fraction frequency will go up and you just change the length of that resonator until it, it's approximately where you want it to be. And it works to start with a design that you sort of know in principle works. Like I wouldn't do something like with wires in different directions with other wires close by. If you don't know what the impact is going to be.

Chris Gammell: Got it. Got it. Okay. So it's like basically building your kind of sanity check use case, just very basic level. Will it do anything? Yes, it will. Now I have that as a baseline for making it more complex in the future. That sort of thing.

Robert Fennis: Yeah. The reason you start that way is because a lot of things like the enclosure plastic will have an impact on the frequency. The problem is, is if you have five things that have a tiny impact on it, that nudge it some way in some direction, you don't know which ones might be the biggest impact. And you're tuning everything and you're making all kinds of, and you go everywhere and you can get it to work the way you want. If you add things one by one, you add the enclosure, maybe in the orientation of the antenna relative to the enclosure, it doesn't matter at all or the material that you use. Right. And in which case, you know, okay, that one is fine. And suddenly you add something, maybe a screw, or, you know, that there's a clip somewhere or a piece of wire and you add it and boom, the performance goes down. And then, you know, okay, that did something. And then you can model the field and see what happens, see what, how the fields behave.

Chris Gammell: Yeah. Okay. And then, so, okay. So now we're starting from single wire that approximates your scenario, your, your, your emitter. Your emitter in that case, you're adding stuff in. What is the output format that people expect to see as well? So like input formats, output formats, that sort of thing. Like, and then the interaction, you know, with the library.

Robert Fennis: What do you look like? Okay. So there's for antennas, if that's specifically what we're focusing on, there are usually two things to look at. The first one is if you have the antenna is driven by a port, a port is a, in simulations is the thing that injects energy into your domain. And in most applications for people listening, lump ports are fine. People say, you know, you have to use wave ports. Lump ports are fine. Especially if you work with PCBs, they're great. You have a lump port, so it's in emerge. It has to be numbered starting from one. So you just port one, you excited. And the first thing you look at is the reflection coefficient, which is S one, one in the case of an import network. And there's a plot. Underscore SP for S parameter function. That's built to sort of throw these, the data in. And you can look in the examples on my GitHub to see how you get the information out. It's a bit finicky and it, it seems maybe a bit for, for both. But if you browse through some examples, you'll see the pattern and it should, should be clear. And you want to see it. And by, by default it plots it in a logarithmic scale. And so you can see that at some frequency it starts dipping. And so you need, you need enough frequency points that you can see the dip. Sometimes if it's, if you have a very coarse frequency sampling, a very sharp matching frequency, if it's like very resonant, then you have like a very tiny dip, you might miss it. But if you find enough frequency points, you should see the dip. And then you go get that dip where you want it. In case of an omnidirectional antenna, if you didn't pick an antenna that is directional, you can, you can also look at the antenna pattern. So where does the energy radiate? If it's omnidirectional and your antenna is omnidirectional, you don't have much control over it anyway. It's, you can look at it in 3d and see if it behaves well, but it's, it's not necessarily depending on the application. It might have information that you're interested in. And otherwise it's illustrative, but the, the, the match is very important. Yeah. I mean, yeah. The antenna pattern is still important for gain because a match just means the energy didn't go back to where it came from, but it didn't tell you where it went. Usually it goes in the air away, but you can technically create structures where it gets lost into heat. You don't want that in high performance applications, but it's rare that you can literally, that, that your energy somehow gets dumped. Like the majority of your energy gets dumped into heat. That's very rare. You have to actively try to make that happen.

Chris Gammell: That's the microwave oven,

Robert Fennis: microwave oven scenario. Is that a hundred percent? Yes. That's a hundred percent what you, what's happening. So I'm sort of assuming that the people at home don't care if say half versus one DB gets transmitted into the heat, because for most applications, it doesn't matter. If you build a radar system, it absolutely matters. And it's a lot of power. It's a lot of heat. If you just make a simple communication thing, it's very small.

Chris Gammell: Most people shouldn't be transmitting at the levels that would be dangerous for cooking your radar technicians, right? That,

Robert Fennis: yeah. Or maybe it's not, but you just care about every single bit of energy being used as efficiently as possible. In which case it might matter because in radars, you know, the, the radiated energy means range, the more energy, the more range you have. So you want to squeeze everything out. If you cannot, if it's possible not to waste the energy, you don't want to, but again, for like a Bluetooth chip for some hacker, it's, I'm just going to say it probably doesn't matter much.

Chris Gammell: Yeah. Yeah. Yeah. Okay. All right, cool. That's great. No, that's okay. So that, so now we're basically building like a, this is kind of like a very coarse adjustment. It feels like, so the wire was too long in your model or whatever, whatever the, as you're trying to like tune in to the, just the frequency range and making sure you have the right, the right frequency for your, your remitter. Okay.

Robert Fennis: Yeah. You can bet that if you have a very low, like a resonance in the sense that the S1, one has a dip down for frequency where you roughly expect it, that that energy is going to be radiated to space. If you build it and you have that 99 of a hundred times, you, you made a good antenna and that's, that's where it stops actually.

Chris Gammell: Got it. Got it. It seems like you're, you're also talking about like the fact that we are talking about antennas, right. As a radiative element here, but maybe quickly as a side note as well, like other things that you have seen people using this for and how, how you think the simulation, when it's not a intentional emitter, like a, like an antenna, where else do you see people really taking, taking to emerge?

Robert Fennis: So there, there are a couple of common. So antennas one, the other one is filters. So if you make, if you want to make a filter that filters at specific frequencies, specifically at high frequencies above one gigahertz, you can make filters on printed circuit boards by just shaping your traces in a way that's convenient, right. Resonant filters. Those don't radiate. If you make a good one and then you want to see if it, if it filters the frequencies that you're interested in, if it's well-tuned. Um,

Chris Gammell: so this would be like SMA port on one side, SMA port on the other side, like comb filter in the middle, make it do something cheaper than exactly. Yeah. The filter sort of thing. Yeah,

Robert Fennis: exactly. Yeah. I think for a lot of lower frequency, you can buy them as a component. Um, a lot of most common software defined radios or like chips that you buy usually don't care much, but in some cases you really don't want to be bothered by frequencies that you're not interested in because they can, you know, confuse your receiver in which case a filter can happen. But I guess probably I haven't looked at a lot of, uh, data sheets in a while, but I guess most chips would probably let you know if they need a filter because then they're sensitive enough to be confused by other signals that may be stronger. Yeah.

Chris Gammell: Well, and it's also thinking about kind of closing the loop in your mental model as well. Like, so I could go and simulate this stuff all day. Maybe if I go in, if I put an inverted F antenna on my board, it's harder to get a, you know, I get a nano VNA and maybe, you know, have an antenna there that's also receiving, but there's other stuff in the middle that might be making that harder to, to like validate. Whereas I guess a filter with like SMAs on either end, it's easier to be like, Oh look, the signal is gone where I want it to be gone. Like that's a nice thing to have actually like to, to validate in the real world as well.

Robert Fennis: As an application for, uh, for, for, for simulation.

Chris Gammell: Yeah. Just some, as a measurement of the, of the output. Right. So like if I go in, if, if all of the things I might use emerge for, right, like an antenna filter, you know, a controlled impedance, it does feel like a filter might be one of the easier ones to actually measure and validate in the real world versus outside the simulation, you know?

Robert Fennis: Exactly. Yeah. You would use it like if you can, if you can order one, but if you can simulate it and get the answer right now, because especially at higher frequencies, details matter. So if you have, if you have this filter, you have some template numbers, but they tend to forget certain parasitics, or maybe they don't take into account a residence in your printed circuit boards, right? Filter strip lines will radiate energy in your substrate and maybe it goes somewhere where you don't expect it. So you can take those risks out even before you order one. And especially if you, you won't often make a filter on FR four, because the, the FR four has a very like the refractive index. The speed of light can vary quite substantially. So you can have a filter that's completely detuned for where you use it. So if you go to more high spec, uh, RF substrates, they're also much more expensive. So you really want to validate these first before you order one. Cause it's a, if you spend $800 and it then doesn't work, then, uh, yeah, it's a waste of money. If you could have just simulated it. So those are ones, another application that's sort of not port related is, uh, RCS simulation. So radar cross section. So just, you have some object, you expose it with a plane wave and you see where does the energy go. And you can see this into, you can for two, for designing a shape that has a very small radar cross section, like stealth fighters. You wouldn't simulate that in merge because that will take forever. It's way too big. Um, or just objects that you're interesting, like a bird or something else, or another object that you're looking at, like what might the radar cross section be? The final element method is quite expensive for that computationally expensive, especially in a large object. So it's usually used different methods for that, but that, that could be an application.

Chris Gammell: So it usually my RC plane to be stealth. And be this, the RC stealth B2 bomber is probably not in my future. Is that what I'm hearing?

Robert Fennis: That's good. It's going to be tricky. Those profilers are a nightmare. Yeah. Right. That's true. So, yeah. So beyond that, almost always it's, it's sometimes port related, right? I have some N number of ports, one port, it's an antenna or four ports, maybe like a power splitter. You have a Wilkinson power divider that takes energy to see if it's well tuned, has the right dimensions, stuff like that. That's usually what you use it for.

Chris Gammell: You also have a crosstalk simulation on the showcase page, which we'll link. And of course, that's another kind of common, common one that would do says comparison data provided by a kind discord member. But like, that feels like something where I'm having cross five problems. It might be nice to have that kind of in the space as well.

Robert Fennis: Yeah. It's that's, that's, that one was specifically, I did that also for the signal integrity conference that I just came for. And I'm not in the world of signal integrity myself, but it's very much about, you know, I have a bit stream that's very fast, like one gigahertz or one gigabits per seconds. And I want to make sure that those bits arrive at my destination intact because they consist, you can look at them in a frequency domain as well. And then those frequencies propagate differently through your wires. And so the bit stream might just look like some smeared out blob after it arrives. So you want to make sure that it doesn't get into ports. You don't want it to get an open and arrives intact. Okay.

Chris Gammell: So, well, and the other reason I wanted to come back to the crosstalk thing again, I'd like to get back to the antenna at some point, but like antenna, it feels like we have these kind of like bulk large scale pieces that might be in the simulation, but specifically for the crosstalk and the filter when there is the substrate involved. Now, does that mean we're also modeling material types and things like as well with like Rogers, the permissivity, like all that stuff. How does that get worked in?

Robert Fennis: Yeah. So the, if you make a PCB like this, the, you can look, for example, in the example files, there's the demo for it's like a patch antenna and you have a coupled line filter. You literally have a flat box, which represents your printed circuit boards. And it's made of that dielectric. In my library, you can do emerge.lib. And then you have a ton of materials that have to be checked if they're correct. Sometimes they behave a bit differently, different frequencies, but the material properties of a lot of them are in there. So those are like good first shots. You can download the data sheets from the manufacturer. Those will give you the best numbers. And then you look at the dielectric constants and the loss tangent. Those two numbers are 99 of a hundred times what you need. For metals, it's also the conductivity if it's a conductor. And otherwise it's the epsilon R and the loss tensions. And yeah, you have to build that and put the trace on top.

Chris Gammell: I see. Okay. So the patch antenna basically, does it have the, the, uh, the emitter materials in there as well for that example? So you said there's like a box that's at the, the FR4 equivalent, and then there's the other pieces that are, um,

Robert Fennis: yeah. So in the, in, in the patch antenna, it's, it's the dielectric box. And then the bottom side, um, is, is that flat plane is, is perfect electric conductor. The patch is on top and there's a lump port that connects the patch to the, to the bottom plane that sort of excites the system with the signal. And that forms the antenna. And there's nothing around it, like an enclosure. I try to keep the demos as simple as possible to really zoom in on that. I'm saying you can add detail as you go. And it's also helpful to just see like which steps it involves going from A to B from like a, just the numbers to the final results.

Chris Gammell: That is nice to have, um, those simple starting points. Yeah. I think that's, that's probably the place I should actually start is like, yeah, don't, don't start from scratch. Start from Robert's examples and just run those. And yeah,

Robert Fennis: yeah. Yeah.

Robert Fennis: there's an inverted F antenna made by someone from the community and they modeled it after, uh, a demo file from, um, TI, I think for Texas instruments, they have some PDF. Um, and there's also one for a patch antenna. So for those two, I don't have one for like wire antennas yet, but those two, there are example files for there. So you can use this like a basis.

Chris Gammell: I mean, so you mentioned the community as well. So where, where, and how do people join the community? Is it discord or something similar?

Robert Fennis: On my, on the website, www.emerge-software.com. There's a, in the contact page, there's a link to a, uh, to a discord channel that people can join. Uh, I am in the, in the, like the central European time, time zone. So for people in the United States, uh, the hours that were awake at the same time are not that much, but I'm like,

Chris Gammell: yeah, yeah.

Robert Fennis: I spent most of my time behind my, most of my days behind my computer and I'm very active on discord. So if I'm awake, chances are that within like half, half an hour, you get your questions, uh, questions answered. And there are a lot of people there, by the way, who also love, you know, helping out and, or sharing files and stuff like that. And I really want to build a larger set of like a separate GitHub repo, which is a ton of just files for all kinds of different applications, like this antenna, this antenna, this antenna for all these designs that you can just take and copy paste.

Chris Gammell: Yeah. The clanker will love that too. That's, that's a, that's a good, a good starting point. Yeah.

Robert Fennis: And, and in, in general, it's not even like, uh, it's, it's not even the, it's literally how anyone learns these tools is always example files. Every software package has them.

Robert Fennis: console. Multiphysics has entire libraries of these. That that's how you learn. You just see how some other ones are set up and you figure it out that way.

Chris Gammell: Tweak the knobs, tweak the knobs, the sliders, see what happens, break something, but the low cost of breaking something is always very much appreciated versus like, Oh, I'm going to go and cut a trace on this board. See what happens.

Robert Fennis: No, a hundred percent. Yeah.

Chris Gammell: Uh, I know 55 minutes into an interview is, uh, you know, really good podcasting, but why did you build this Robert? Uh, what,

Robert Fennis: what, so I come from as a user of these tools first, I, at the university, I used to come some multiphysics. And then in my first job at Dallas, where I built, worked on military radar systems, I used HFSS. Um, and, and so I'm, I'm, I'm a user first, but I was always interested in these methods. And I was also always fascinated by just you typing some generic engine into the computer. And then you give it your situation, press run and like reality emerges basically. And so the first one, like find a difference time domain was the first one I got my hands dirty on. And it was a very fun one to experiment with. Um, but I really wanted to understand the finite element method, but it took me a long time to get through it because it's built on variational calculus, which you don't learn in electrical engineering. It's very much of structural dynamics. You know,

Chris Gammell: he's, uh, he's pulling a large textbook down from the shelf.

Robert Fennis: So this is, this is the Bible.

Chris Gammell: It's a scary looking book.

Robert Fennis: Yeah. It's the Bible. And I'm just going to look up a fun page and it's, it's extremely like symbolically dense mathematics. Let's see if I can find it. You can get, I'm curious about your, your impression. Get pages like these.

Chris Gammell: Oh my God. Okay. No, that's, that's, that's three integral symbols in a row. I, I don't need that much. I mean, this is Maxwell's equations though. Like that's, that's what that is. Right. I mean, that's like, that looks like Maxwell. I see, I see a lot of deltas.

Robert Fennis: Yeah. Yeah. It's, it's a very, it's the variational form of Maxwell's equations.

Chris Gammell: Yeah.

Robert Fennis: Um, so it's just,

Chris Gammell: it's interesting because it always comes back to that too. Right. It's like every, everything. I mean, even spice and all these things, they all come back to Maxwell at some point, right? It's just simplified versions, different versions.

Robert Fennis: Yeah. The Maxwell's equations is, this is something I appreciate very late to my university is that once you go into like more science, uh, level of physics, not the high school level physics, is you look at equations that no longer are like, this is like, you plug in the numbers and you get an answer like Hooke's law or something. There, there are equations that constrain answers. So the Maxwell's equations don't tell you, this is what the electric field does. It says, right. Right. Right. If you have an electric field function, it must abide by these relations, but it doesn't tell you what the answer is. And that's because you can't write it down. If you could, you know, there weren't like an infinite possible orientations or ways. So it's the equations are the fundamental laws of physics are usually constraining equations. They say, whatever the solution is must follow these rules. And then you need what's often called boundary conditions to actually get a single case of an answer of this is what my actual, you know, simulation or what happens in this case. So that's why everything returns to the Maxwell's equation, because they are the four equations that define what electromagnetism does, except for semiconductors, of course.

Chris Gammell: So you, you had to go and then put that into programmatic, like, like basically it's like taking these, these large scale, like, uh, what are they called? The, what are the, the, the upside down delta. What is that thing called? That's a flow. Oh, the,

Robert Fennis: the, the, the upside down delta is the Nabla operator. Yeah. And it's just a vector differential operator. So it's, it's, it's three derivatives in a vector. And then you can, depending on how you multiply them, you can take different combinations of derivatives. So it doesn't matter that much.

Chris Gammell: Well, I mean, that's the thing it does for some people, but not for me. Like I'm only using the simplified version, right? Like I, that's what I think about. It's like, I'm always using like the, the dumbiest dumbed down version of these things, you know, and I'm like, Ooh, Ohm's law. Like I've got that one, but that guess where that comes from too. You know, it's like, Oh, guess what, Chris, you know, that also came from Maxwell.

Robert Fennis: So what I did specifically, and I have to be honest about this. So, so I wrote the, basically the assembler and everything around it. So the, the hardest part of making a finite element solver, the community has to know this by far. And I'm saying literally 98% of the effort roughly has nothing to do with the physics. It's building the computational, the mesh. It's an unstructured mesh consisting of tetrahedrons that defines the volume. That is so enormously complicated. And I'm very lucky that GMSH, the library that I talked about with Christophe, of course, and Jean-Francois made for us that does that. And that's the hardest part of it. Now you have to mesh. And then you have to, for the finite element method, you have to assemble your system matrices. That's where a lot of this math comes in because it defines what you exactly have to calculate. And then at the end, you have some linear algebra expression that you then have to solve. And those are functions, either part D. So for x86 and Intel made this for us. There's an MKL library that is automatically downloaded where they have this very fast solver. Shout out to Olaf Schenk. And for Apple, you have in the accelerate library, they gave it for us. And Dr. Jonathan Hawk made this one and it's insanely fast. And I just talk with it and say solve it. So I did the assembly part. And I wrote it myself. You also have backends that are dedicated that you can use. But because I did it in Python with NUMA as accelerator, it works on every operating system.

Chris Gammell: And just to disambiguate real quick, the assembly, you mean you're assembling these things together. You're not writing assembly, right? You're writing Python.

Robert Fennis: Yeah, yeah.

Chris Gammell: It's the same word.

Robert Fennis: Exactly. It's called, you're assembling a matrix. So what you're building is actually a sparse matrix. So it's a, for example, a million by a million matrix, but it's mostly zeros. So you don't store the zeros. You store all the non-zero elements. They're like less than a percent. Like a map to where they are.

Chris Gammell: Like you have like a coordinate system to where they live in the matrix or something. That sort of thing.

Robert Fennis: Yeah. You use a compressed, a compressed column storage. So it's a, it's, it's, it's a very, it's the most efficient, but very difficult to sort of easily read way of just having the bare minimum information to tell where all these non-zero elements are. So, but what I've basically is what you assemble is, is we call it COO matrix. So it's the column and the row and the number that's in that entry. And then you store those. Those are, it's not the most efficient one, but that's the easiest one to, to, to assemble. So you generate those.

Chris Gammell: And so the tetrahedrons that you are taking and assembling all this, you said tetrahedrons, polygons? I don't remember.

Robert Fennis: Yeah. Tetrahedrons. Yeah. It's like the simplest 3D element. It's like the triangle of 3D, right? It's a triangle plus another point. And then you get a tetrahedron. Yeah. I see. The D4 for the D and D inerts, which I'm. So.

Chris Gammell: Oh, D4. That's the four-sided dice. It's the dice. The four-sided. Exactly. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Yeah. Okay. So you are basically taking input and you're building these matrices based on top of the mechanical, the physical modeling. Right. Is that, that's kind of the conversion piece. Got it.

Robert Fennis: Yeah. Yeah. You take the mesh, like what tetrahedrons are connected, which other ones and which nodes are connected. You have this, this data structure. Where are the nodes? You take the material properties that the users assign and the boundary and you assemble the matrix that when solved gives you the correct answer.

Chris Gammell: I'm not sure you answered the, why did you build this? Because that is still so crazy. There it is. All right. I mean, I just, but for really, like you love, you must love Python and math. Is that also like part of, I mean, it sounds like you're scratching your niche, but also you, you like the getting in there, right? You're, you're like, yeah,

Robert Fennis: it's, it's, yeah, it's, it's hard to, to, to give in like an exact answer. And for people, I'm not that great at math at all. I'm like, I barely get through this. And so it's, it took me a long time. I'm not at all. Like, like I took eight years to, to complete my master's and my bachelor's together. So I'm not, I was never a fast student, but I was just really obsessed. I know there's something to me that like you write some code and you plug in a case and out drops, you know, you get this sign functions. Like I remember the time when I first got the correct answers in 3d. I was like, Oh my God, this is crazy. And it's just this reward after a while, you know, just doing something that's difficult.

Chris Gammell: Right.

Robert Fennis: Yeah. You're like,

Chris Gammell: yeah. Look at this thing I did. And everyone's like, I don't know what you did,

Robert Fennis: but this is going to find me crazy. There was last, last year. I figured this out. Basically it was, I think in May, my wife went to China with her dad. You went there on a business trip. And so I said, I'm going to take that same week off and I'm just going to get 3d to work. That was my assignment.

Chris Gammell: Wow.

Robert Fennis: Wow. And so I just spent a week trying, trying to get it. And it's a, it's a lot of debugging, but it's yeah. After a while, if you just bang your head a lot against a problem, that's very hard to solve and you get it, there's something so rewarding and it's just an addiction. And I just spent like hours and hours trying to figure out all these extra features and additions and get them to work. So, wow. Yeah.

Chris Gammell: That is amazing. Yeah. I'm really, well, first off, I'm really glad you did it because we all benefit, you know, like kind of to go back to kind of the beginning as well. Like I was asking about like how it compares to a lot of these, like kind of closed source, high cost things that were a necessity to hire lots and lots of people to put all these things together and bundle a software. And now kind of you and the folks doing the GMSH library and other things that are like unlocking it as well. It's like amazing. We all benefit. So like, that's, that's really great.

Robert Fennis: A hundred percent. And, and how it compares specifically, I would never claim that my solver is as good as the, as the, the ones that you buy with the license, but they're insanely expensive. So I, I, I say for my solver, I want to be the Ikea or finite element solvers.

Chris Gammell: I love it.

Robert Fennis: I think, I think, I think that, that, that says enough, you know, it doesn't have to be great for most people.

Chris Gammell: It's good enough. Well, and I think, you know, the other thing too, like, you know, I could see like competitive, you know, like I'm sure there's people that grumble about it that are like, Oh, these new open things, but it's, it's a, it's a bigger tent theory, right? It's like bringing more people in that even understand any piece of it. And then they are, you know, if I need the super, super fancy advanced thing, I'm a future customer of these other softwares that are out there. And, and hopefully it's just a rising tide that brings up everyone that understands, more about RF. And that's great.

Robert Fennis: Yeah. I think people sometimes, this is also an engineering. They, they very much underestimate the utility of just making things that aren't perfect, but that are good enough. And I feel like a lot of people, especially if you come from academia, they're willing to do the only work on like either the hardest problem that there is or the most needs application. But with every new invention comes like a million simpler version or implementations of those that are useful to someone. And so some people might think, you know, there's a, an amazing free finite element solver palace, AWS built on like lip ease. It works on supercomputers and like clusters. It's of course it's better and faster, more optimized than what I have, but again, most people don't need it. And emerge. You can call from one Python script. It's very low boiler plates. I say, if a simulation is simple to set up, it should be simple to type. So the simplest simulation is a rectangular wave guides. So the people that those are the, the most low loss transmission lines are just hollow rectangular pipes and have to be big enough to accommodate the wave. So it's just a box with two ports. That one you can set up and get results in 12 lines of code. You don't need more than that. I don't want, I don't want you to type out anything that doesn't do something that describes the simulation. Yeah. Right. There's some necessary evil. There are things that you have to like, go to tell it like, okay, now go to the next step. And it doesn't really do anything other than tell me, go to the next step. But other than that, I've made it to a very little boilerplate. You can start and end everything in the same Python script if you want.

Chris Gammell: That's amazing. Yeah. Especially like in the, the age and era we live in, like any kind of like barriers, you're just going to lose people, right? It's a, it's its own, it's its own fall off function, you know, like, like a, like an RF signal would be right. It's just, you're going to lose more people. And at the end, you know, only the most dedicated are going to do that. So there's going to be fewer people in the space and interested in doing things with it. So,

Robert Fennis: yeah. Yeah. Yeah. Sadly, a lot of the, the, the existing open source tools are mostly developed from like a, a backend or like an academic purpose. So you have like a library that can do general finite element method, but then you have to type out the variational method yourself and all these details, which is fine. And it's great for academics have a platform to do their, you know, their science on, but I wanted to basically build the, the, the coding version of. Yeah. A simulation program. And then have it do even more things that sometimes you have to manually do an HFSS that you don't have to do in emerge because it does it. It has some automatic default that should do the trick in most cases. That's awesome. So yeah, just let it rip.

Chris Gammell: Yeah. When do you find that, uh, where are some like practical limitations? So like, so now you're talking to someone and you're like, Hey, you're using emerge. I'd be careful or be, have more considerations around this use case, this, you know, this level of this number of things you include. That sort of thing.

Robert Fennis: Great question. I love this because this is hopefully going to make my, uh, my inbox a little bit more clear. So importing PCBs is a nightmare. PCB in general, a nightmare to work with. A lot of people that have like a large PCB and they just want to simulate the entire PCB. I'm working on it. I'm five coding that stuff because it's computational geometry is extremely difficult to do. I think maybe the most complicated thing to do with programming, difficult problems to solve. I'm doing just a 2d version to import ODB plus plus files. It's, I don't care too much about it. It's not my application, use of application. So I'm saying like, let the, let the AI do it for me. I'm getting close to getting at the rip, but yeah, traces in general, if you have a lot of long traces, traces require quite a lot of detail to model accurately. So if you have a very large PCB with a lot of Vias, especially if it's like multiple layers that are all filled with a lot of signal traces, most of that will just add complexity. And even if the simulation wouldn't care about it, just meshing it alone is takes a long time because it's a lot of geometric detail. Keep your simulation, just, just simulate what you need. Like your entire PCB with all the chips is just a copper plate. That's all it is.

Chris Gammell: Got it. It's that antenna. Are there guidances around like, so you talked about like the Vias, you know, having large impacts and stuff like that, but like, you know, sometimes when I'm doing like an RF section, I'll VF fence around something. Right. And like, just treating that as like a, Oh, this is a sea of Vias that are like grounding everything. Can I just treat all that as like a big copper plate then? Is that, is that kind of like the, and then I could have the specialized area. That's not VF fence.

Robert Fennis: Yeah. So VF fence, if it's, if they're much closer to get it in a wavelength, like a 10th or less, you can just model them as a straight wall, like a thick wall in the ODB parser that I'm building. I'm adding, but it can break of course, very easily, but I'm, I'm trying to, I'm in the process of adding a feature that will automatically connect close Vias. So that it will just create this wall for you. But there's of course the risk that maybe some Vias are closed, but shouldn't be connected. And now it's connecting those. And then it's breaking everything. And how do you tell it, which ones to connect and don't, that's a very difficult problem to solve in general, if possible, just really try to like take the, the, just the design of the, the antenna launch it as far away from the other structures that you don't care about, unless you really need to take them into account, like the feed line.

Chris Gammell: Yeah.

Robert Fennis: If you can remove as much as possible and keep it as simple as possible.

Chris Gammell: That's a great guidance. Yeah. Yeah. And I'm sure that is the people listening to like, I'm waiting for this. I'm like, Oh yeah, how do I bring my PC and that sort of thing? But so like, and ODB too as well, like versus like a, like a step file export, I guess, cause you need, in certain cases, you need to know material types and stuff like that and traces. Yeah.

Robert Fennis: Yeah. So I guess a bit trick. So step files are actually great from key cuts can export step files. Yeah. The hard part is that they model the, the traces with a physical thickness, which you technically don't need to. You can model them as just flat, infinitely flat planes and then emerge at the boundary condition to treat them as a thickness, but it's fine. So the problem that I see with step cells sometimes is that you might have a round component inside a hole. And if those three 3d volumes don't exactly fit together, it will just never get through the meshing process because it's, it's like a floating point rounding error or something like that. That's what makes it difficult. So step files are the most stable. Probably I'm working on ODB. It's not released. I have a Gerber importer, but it's likely it will just break on you.

Chris Gammell: Got it.

Robert Fennis: Do you know how Gerber files store the data? It's a,

Chris Gammell: it's an aperture and a movement, right? That's how they, isn't that how they do it?

Robert Fennis: Exactly. I had someone in the discord once and I had one that, that, and it's understand because it comes like photocopying, but they had like a crashing model. And what was it? It was a circle, a larger circle. And to make it larger circle, they took an aperture that was half the radius. And then they did like a yin yang. They did like one half of the circle and then the other one. And then you add those two together, you have a bigger, but because I approximate circles with inside of polygons, you would have like minuscule gaps where they just perfectly. And it would just break. And I was like, Oh God,

Chris Gammell: this is, you know, there's nobody ever writes about this in like sci-fi novels, but like, I want like, you know, Neil Stevenson to be like, and in a thousand years in the future, Gerber's were still breaking shit. You know what I mean? It's just like this thing that we're going to drag in this along with us for the rest of history. Just like that one format. Yep. Yeah. Oh yeah.

Robert Fennis: It's hard. But even, even an ODB is there, but that's what I'm, that's the, it's the hard part in general with computation geometry, like Boolean additions of a shape plus another shape. That's such a difficult problem to solve. Um, so I'm letting Claude do it because there's a lot of information on there that I don't know about. And it's probably much better than I do. It just has to work, but I can't guarantee that it will not break. And you're, you're specific princess circuit boards. No guarantee.

Chris Gammell: I just wonder if, if it's like, uh, so just kind of thinking back to that, that the offense idea, like almost like, so if I have a key cat file, which I have many of, uh, if I have the via fence thing, adding like some like metadata in my, my, um, in my layout that just said, or my, I guess just in the component storage, it says, Hey, you don't care about this component. And then when it doesn't export, it says ignore everything except for the, I care about components. And then that's what gets exported into emerge, that sort of thing. If that is,

Robert Fennis: yeah, that would be great. It would be great if they have a standard like that, but I actually advise, this might be useful to say is, um, is to just really try to build it yourself without a printed circuit board. And I have a PCB design class that uses a method chaining philosophy. I don't know if you've heard of the term method chaining or the building pattern in programming. So basically if you have an object, which is an object oriented programs, like a, a data structure that has a lot of intelligence in it, go to, and you can talk to it by calling a function on it. You would, so you would say like this object dot, and then a function, like do something for me. Okay. Then that could be it. And then you have to new line. And then you call another function, but what you can do is you can have those functions return the object itself. And then immediately after that function, you can call another function. So you chain your function calls. So I have a PCB routing, which you can do is you can, you can, you'll see this in some examples, PCB dot new, and then you start a new trace and you do dot straight function. And then a distance dot turn, right. Dot straight. Dot skip.

Chris Gammell: Okay.

Robert Fennis: And you can like a instruction set. You can make it trace or draw out a route as you want it. So you don't have to like think about exactly which distances add together. And you can make it like, it's like a little bit.

Chris Gammell: It's a physical phenomenon, basically like a Pearl, like a Pearl script.

Robert Fennis: Yeah. Yeah. Sort of. And you just call the functions on each other. So it's almost like language. It literally reads like an instruction of like how you would go to the grocery store, like go straight, go take a right turn, go straight, et cetera, change with. So as much as, and they will have all the tools like to automatically generate the printed circuit boards and the airbox above it. So if you can try to model it yourself, because that really gives you like, it also, because you're so lazy, it really enforces you to, you automatically have the part where you want to ignore all the detail because you don't feel like building it in, which is a good intuition to have. Like what do I need to add? Because I don't feel like typing out anymore. That's a good, good intuition to have.

Chris Gammell: Yeah. Yeah. I mean, I know I keep bringing it back to my, my spice thing, but it does feel like importing the entire design into spice versus like the, no, no, no, just the things you care about there. There is that kind of the tension there of like, you need to, I can, you still need to know what matters, but it sounds like as like a guiding light for beginners is like, okay, go to the examples, see what Robert's built and the community's built to see what mattered in those, pull those out and like emulate in your own designs, replicate that sort of thing, and then make it additive, not subtractive. That sort of idea.

Robert Fennis: A hundred percent. And this is also not just from like the learning experience, but also from a generic engineering purpose. A lot of people tend to add a lot of detail. If it doesn't work, you have no clue why it doesn't work because you added 10 details. That's why you start from the simplest one. A patch is a rectangle. That's excited. And maybe you have an inset feed or a probe feed. You pick whichever one you pick. And then people have like, Oh, you can add like this U slot in there and it will add another resonance. And you have like 10 dimension, put another patch on top of it with the distance. And now you have 10 parameters to change and you don't know which one to dial to make it better. You start with the simplest one. You understand how that works. And then you add another one. You see, okay, what happened? And then you go from there. So that's why you have to keep things simple. It doesn't matter if my patch has round corners. First, make it a square, round them off, see the difference, but start from the simplest one.

Chris Gammell: Right. Right. So that'll help you to build that mental model as well. Yeah.

Robert Fennis: Yeah. Hmm.

Chris Gammell: I got to fight my instinct on that. Cause I'm like, you know, like, you know, young Chris lives within me. He's like, you, you have the whole design, just import it, just YOLO. And it's like, that's going to have its own disastrous.

Robert Fennis: A lot of it is also maybe now that we have good computers, you can do it more than you could do in the back in the days. Sure. I have stories from the people that taught me the trade and that computers that were so slow that you had, you were forced to cut antennas up in parts that really cannot be cut in parts because, you know, it's, it's a coupled system, but they had to. So you have to figure out somewhere, how do I now translate this information from one simulation to the next? Yeah. Because otherwise it's just, you know, they couldn't do it in one piece. And so people from back in the time who luckily I got to learn a trade of shout outs to Pierre Teunissen. It forces you to keep it simple because what's usually what's simple is also fast to simulate and has the least amount of detail. And then as you add more detail, it gets slower. So yeah, there are many reasons why you want to start from simple,

Chris Gammell: go slow to go fast. That sort of thing.

Robert Fennis: Exactly.

Chris Gammell: Yeah. Robert, where can people find you, find more about the software, find more about your work, your, your consulting and similar.

Robert Fennis: So the website for the open source project is www.emerge-software.com. So that's the main website there. You, I think there's a services page on there or consultancy page that will form or to my company. I always like, I always want to make the, the inform people that the company is not what's making the software. So I don't give any warranties. If you make a design and you waste a couple thousand by with the wrong simulation, there's no warranty. It's open. It's open source. Got it. I do use it myself, of course, for my own consulting, but you know, that, that aside, so it's emerge software.com. It will, it's free and it will remain free forever because it also has to be free. Um, and there's a link, there should be the link to the discord as well. And, and also a link to the GitHub, which is a bit more difficult to find, but I'll, I'll put the link on there. So it's easier to find. Great. And the GitHub is where you can find the latest version of the example files, which in case people, and there's a user manual and there's also a cheat sheet, which has like clickable PDF that will take you to different functions and what they do.

Chris Gammell: And then on the consulting side as well, you, uh, you do design for people. That is the part you do use your, you use the software, but you also do bespoke design for folks, that sort of thing.

Robert Fennis: Yeah. Yeah. So it's either I give trainings to people to use my software, because what I really like is that if I, if I make a design for an antenna for some customer and I don't, it's not like I've had many, I've had two or three, no three. Now, um, I just started this year. Um, is that I can give them the file as well and give them the ability to take it to the next stage, which is very bad for my income, but it's, I like to build a company on trust or to, instead of like having, having them pay me to make design iteration to teaching them instead, how to do it themselves. If it's possible. Sometimes it's really hard. You know, you need a consultant for like the difficult questions, but as much as possible, it's usually more useful to, you know, as a company, you could also come to just say, can you just make a simulation model for this antenna design? And I can just fidget with it and change the designs. And I can also do that, you know?

Chris Gammell: Yeah. I mean, most people want to hire a consultant so they can just ignore their advice at some point. So they can also do that. Exactly. Exactly. Can you tell I've been a consultant before? That's great. Yeah. Very cool. All right. Well, thank you for being here. Thanks for being so open with this stuff. Thank you for the software and all of your interest in, uh, the, sorry, the book was FEM for electromagnetics, right? That's the, that's the tone. Yeah.

Robert Fennis: The Fine and Animal Methods in Electromagnetics by,

Chris Gammell: yeah, that thing.

Robert Fennis: And I cannot pronounce it, John Ming Jin. And that's probably a very bad pronunciation of his name. That's the sort of Bible. If people want an easier one, um, you can also, there's, um, oh God, David Davidson has a book on electromagnetics. And then there's also a book with, by Matthew M. Sadiku, who has like computational electrodynamics in MATLAB, I think something like that. There's also a link to it on my webpage. And that's really even a step before that. He just does some basic stuff. You want to learn how to make this software there, but it, it is a much more accessible route through it. And you can just replace all the MATLAB function with Python functions or the, what's the open source version of that? Um,

Chris Gammell: that is octave.

Robert Fennis: Octave. Yeah, that's it. You could probably do a lot of that stuff in octave.

Chris Gammell: All right, great. Well, thanks so much for being here. And, uh, yeah.

Robert Fennis: Yeah. Thank you for having me. Fun talking. Talk to you soon.

Speaker ?: Bye.

Topics

RFSimulationEmergePythonFEMSolverMatriciesMaxwell's Equations

Keep current

Every episode, plus the occasional job post, in your inbox.