Author Topic: EM solver, FDTD vs FEM  (Read 1059 times)

0 Members and 1 Guest are viewing this topic.

Offline metebalciTopic starter

  • Frequent Contributor
  • **
  • Posts: 451
  • Country: ch
EM solver, FDTD vs FEM
« on: February 25, 2024, 09:13:06 am »
I think Sonnet uses MoM and Ansys uses FEM and/or MoM for electronics (but FDTD for photonics in Lumerical). Recent Ansys blog post (https://www.ansys.com/blog/what-is-fdtd) says also FEM and MoM are "the predominant gold standard" in electronics. Why is FDTD not used in EM simulations in electronics ?
 

Online selcuk

  • Regular Contributor
  • *
  • Posts: 123
  • Country: tr
Re: EM solver, FDTD vs FEM
« Reply #1 on: February 25, 2024, 10:55:19 am »
Those are commercial products and companies usually advertise that their method is the best one.

FDTD is being used in EM simulations. There is an open source tool for solving electromagnetic fields using the FDTD method.

https://www.openems.de

I'm using this one as well. It is not as user friendly or advanced as the commercial tools but does most of the job.
 
The following users thanked this post: boB

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6264
  • Country: fi
    • My home page and email address
Re: EM solver, FDTD vs FEM
« Reply #2 on: February 25, 2024, 12:09:24 pm »
The computational electromagnetics article at Wikipedia provides a concise summary:

"An eigenvalue problem formulation of computational electromagnetics (CEM) allows us to calculate steady state normal modes in a structure. Transient response and impulse field effects are more accurately modeled by CEM in time domain by FDTD. Curved geometrical objects are treated more accurately as finite elements FEM, or non-orthogonal grids. Beam propagation method (BPM) can solve for the power flow in waveguides. CEM is application specific, even if different techniques converge to the same field and power distributions in the modeled domain."

If we created a graph of all the possible methods and approaches and transforms, you'd see they are all connected.  The differences are exactly in their relative weaknesses and strengths, especially when computational complexity (wrt. memory and number of calculations needed) and accuracy in specific cases (like surfaces, shock waves, discontinuities in general) is considered.

Combining different methods in a single simulation is also very, very hard to do efficiently/effectively.  It is much easier to use a specific approach in the entire simulation, because then all the data structures and algorithms can be implemented and optimized for that specific approach.  It is definitely not just changing a function call or two per time step; everything tends to change with the approach, if you care about computational efficiency.
 

Offline niconiconi

  • Frequent Contributor
  • **
  • Posts: 350
  • Country: cn
Re: EM solver, FDTD vs FEM
« Reply #3 on: February 25, 2024, 01:07:39 pm »
Quote
Recent Ansys blog post says also FEM and MoM are "the predominant gold standard" in electronics. [...] Why is FDTD not used in EM simulations in electronics?

It's better to ask "what" before asking "why". If the question itself is flawed, the answer is meaningless. As a matter of fact, FDTD has many applications in EM simulations for electronics. The theoretical foundation of FDTD itself is also no less valid than FEM/MoM, since it literally simulates Maxwell's equations directly. Given the appropriate inputs, the robustness of the method has already been demonstrated by thousands of peer-reviewed papers published in the last 30 years. Commercial products based on FDTD also exist for electronics design, such as EMPIRE.

So the real question is: Why is FDTD not commercially used as widely as FEM/MoM in electronics design? What are the tradeoffs? Here are some reasons that I can think of.

First, FDTD is a time-domain, general-purpose method. Given the correct inputs, it often can compute your solution from Maxwell's equations directly by brute-force, very little math analysis is needed. The simulation results also show the propagation of E&M field step by step, making it very straightforward. Meanwhile, to use FEM/MoM successfully, often, you need to do some math analysis about your problem first (often involves Green's function) before you can program a field solver. As a result, a basic FDTD solver is both more general-purpose and much more easier to program than a basic FEM/MoM solver. For large-scale problems, FDTD is also the method of choice since its computational complexity is O(n), where n is the number of cells in the simulation box. Meanwhile, FEM/MoM needs linear algebra and matrix multiplication inversion, which has a complexity around O(n^3) (for the basic textbook algorithm). However, on the other hand, it also means that if you have a very particular problem and the problem is not large, you can save a lot of work by doing some math first, then you can design a very specialized and efficient FEM/MoM algorithm for a particular problem, which is more efficient than FDTD. It's also why FEM/MoM was historically used first because practical FDTD was not feasible until computers have enough memory. For example, NEC can solve wire antenna problems within minutes because it's a very narrow problem - FDTD will be much slower. Meanwhile, if you want to simulate the specific absorption ratio of radio waves of a human head from a mobile phone, or to find the radar cross-section of an aircraft using a full-scale model, FDTD is the right choice.

The time vs. frequency domain between FDTD and FEM/MoM is also a consideration. FDTD is great for ultra-wideband simulations since it works in the time domain and simulates a large number of frequencies simultaneously, making it very efficient under the right conditions. But it turned out to be a double-edged sword. The biggest limitation of basic FDTD is that the timestep size must be both small enough to resolve the smallest frequency, and to resolve the smallest physical object. It works great for most microwave components, but can be very problematic if you have an electrically-small object. This would require an impractical number of timesteps. Want to simulate an SMD capacitor at 1 MHz instead of 600 MHz? Want to directly simulate the 30 micrometer solder mask on a 1.6 mm circuit board without using any simplification? Good luck... There are some modifications to FDTD that would better handle these situations, but so far they haven't seen widespread use to my best knowledge. Another problem is that material and device characteristics are often frequency-dependent and are given in the frequency domain, such as permittivity or S-parameters, rather than in time domain. If you use frequency-domain methods, they can be accepted directly. But for time-domain methods modeling it would be a headache because you would need to develop an equivalent wideband time-domain model, or find a way to do frequency-domain operations in time-domain such as by using convolution. For example, for modeling permittivity, frequency-domain methods can simulate the material separately at several frequencies, but FDTD needs to find a numerical fit using the Drude/Lorentz material model.

Yet another aspect is meshing. FDTD is generally done on a structured mesh, in particular the Cartesian mesh, because the formulation of FDTD itself involves the use of an staggered grid of E and H field. There are some variants that use other grid shapes with limited use. Meanwhile, FEM/MoM uses unstructured grid so it's more flexible on modeling irregular objects without suffering from the staircase effect.

So in summary.

FDTD:
+General-purpose, simulates Maxwell's equations from first principles.
+Simple to program, little math analysis.
+Wideband solution in a single simulation run.
+Show the evolution of E&M field in time.
+No linear algebra, scale directly to very large problems.
-Often slow and overkill for small-scale problems, or problems with specialized solutions.
-Extremely slow or impractical at low frequency, for electrically-small object, or both. Improvements exist but not widely implemented.
-Modeling frequency-dependent material or circuit properties is not straightforward.
-Use structured mesh and often Cartesian mesh, which is less flexible than unstructured ones. To work around the problem of irregular shapes, "conformal FDTD" exists, but to my best knowledge are used for one-off research projects, and not widely implemented.

FEM/MoM:
+Already Invented and used before FDTD (from an era when computers had little memory)
+Fast and efficient for problems with specialized solutions.
+Straightforward modeling of frequency-dependent material or circuit properties.
+Use unstructured mesh, which is more flexible for irregular shapes.
-Difficult to program, need math analysis.
-Solvers are often designed for special-purpose applications, new math analysis may be needed for each new application.
-Need linear algebra explicitly, scale to large-scale problems can be difficult.
-Wideband solution needs multiple simulation runs.

For some reasons, the EDA industry has chosen FEM/MoM as the preferred solution.

Disclaimer: I don't really understand any of the underlying E&M involved, take these claims with a grain of salt. However, this is based on my literature reading during my attempt to improve the speed of openEMS's FDTD engine (this work is still ongoing, stay tuned for doubled and even tripled simulation speed), so I believe my description is generally accurate.
« Last Edit: February 25, 2024, 11:17:40 pm by niconiconi »
 
The following users thanked this post: rhb, metebalci

Offline metebalciTopic starter

  • Frequent Contributor
  • **
  • Posts: 451
  • Country: ch
Re: EM solver, FDTD vs FEM
« Reply #4 on: February 25, 2024, 01:27:53 pm »
If we created a graph of all the possible methods and approaches and transforms, you'd see they are all connected.  The differences are exactly in their relative weaknesses and strengths, especially when computational complexity (wrt. memory and number of calculations needed) and accuracy in specific cases (like surfaces, shock waves, discontinuities in general) is considered.

Is there an application or area specific or common reason to mainly select one of these methods or does it all depend on the problem (and the type of results one looking for) ? For example, in antenna research or radar etc. is one of these methods mainly used ?

The reason I wonder this is, I understand if a company or research group most often develops, uses and promotes only one method, but as far as I understand Ansys has all types of solvers but still either offers or recommends (I only know Ansys a bit from the free version, I dont know if it is possible to use any method for electronics in a commercially licensed version) FDTD for photonics and FEM/MoM for high-freq electronics.
 

Offline metebalciTopic starter

  • Frequent Contributor
  • **
  • Posts: 451
  • Country: ch
Re: EM solver, FDTD vs FEM
« Reply #5 on: February 25, 2024, 01:30:00 pm »
Those are commercial products and companies usually advertise that their method is the best one.

FDTD is being used in EM simulations. There is an open source tool for solving electromagnetic fields using the FDTD method.

https://www.openems.de

I'm using this one as well. It is not as user friendly or advanced as the commercial tools but does most of the job.

I know about openems, another is I think (not tried yet) meep, https://meep.readthedocs.io/en/latest/
 

Offline metebalciTopic starter

  • Frequent Contributor
  • **
  • Posts: 451
  • Country: ch
Re: EM solver, FDTD vs FEM
« Reply #6 on: February 25, 2024, 01:56:27 pm »

I read or heard about most of the major differences but:

The biggest limitation of basic FDTD is that the timestep size must be both small enough to resolve the smallest frequency, and to resolve the smallest physical object. It works great for most microwave components, but can be very problematic if you have an electrically-small object. This would require an impractical number of timesteps. Want to simulate an SMD capacitor at 1 MHz instead of 600 MHz? Want to directly simulate the 30 micrometer solder mask on a 1.6 mm circuit board without using any simplification? Good luck... There are some modifications to FDTD that would better handle these situations, but so far they haven't seen widespread use to my best knowledge.

I did not think this would be the reason of FEM's wide acceptance, because I thought the commercial use is mostly high-freq electronics, am I wrong ? Is it also commonly used for electrically-short cases ?

Another problem is that material and device characteristics are often frequency-dependent and are given in the frequency domain, such as permittivity or S-parameters, rather than in time domain. If you use frequency-domain methods, they can be accepted directly. But for time-domain methods modeling it would be a headache because you would need to develop an equivalent wideband time-domain model, or find a way to do frequency-domain operations in time-domain such as by using convolution. For example, for modeling permittivity, frequency-domain methods can simulate the material separately at several frequencies, but FDTD needs to find a numerical fit using the Drude/Lorentz material model.

I was not aware of this.

FDTD:
-Use structured mesh and often Cartesian mesh, which is less flexible than unstructured ones. To work around the problem of irregular shapes, "conformal FDTD" exists, but to my best knowledge are used for one-off research projects, and not widely implemented.
FEM/MoM:
+Use unstructured mesh, which is more flexible for irregular shapes.

Is this only because a finer mesh is needed with FDTD (and this will cause an increase in computational needs) or FEM's unstructured mesh provides a better (more accurate) result independent of FDTD's finer mesh ? (I know a bit about FDTD, not much about FEM)

... It's also why FEM/MoM was historically used first because practical FDTD was not feasible until computers have enough memory.
FEM/MoM:
+Already Invented and used before FDTD (from an era when computers had little memory)

I didnt know the comparative history of the methods, thanks for the explanation, very helpful.
 

Offline niconiconi

  • Frequent Contributor
  • **
  • Posts: 350
  • Country: cn
Re: EM solver, FDTD vs FEM
« Reply #7 on: February 25, 2024, 11:14:33 pm »

I read or heard about most of the major differences but:

The biggest limitation of basic FDTD is that the timestep size must be both small enough to resolve the smallest frequency, and to resolve the smallest physical object. It works great for most microwave components, but can be very problematic if you have an electrically-small object. This would require an impractical number of timesteps. Want to simulate an SMD capacitor at 1 MHz instead of 600 MHz? Want to directly simulate the 30 micrometer solder mask on a 1.6 mm circuit board without using any simplification? Good luck... There are some modifications to FDTD that would better handle these situations, but so far they haven't seen widespread use to my best knowledge.

I did not think this would be the reason of FEM's wide acceptance, because I thought the commercial use is mostly high-freq electronics, am I wrong ? Is it also commonly used for electrically-short cases ?

I believe low-frequency simulation is needed at least for some applications. For example, inductors and transformers for power electronics like wireless charging or switched-mode power supplies. Also, do you remember those "current density on the reference plane at different frequencies" visualization images from EMC books? The near-DC case needs a simulation under 1 MHz. Unmodified textbook FDTD can't do those.

Also, "the electrically-small object" problem exists whenever you have an object with very small details, this is really common in even many basic problems. For starter, a 1.6 mm PCB has 35-micrometer thick traces. If you model the traces as-is for a PCB populated with components, an FDTD simulation would probably run forever (but you can analyze empty boards by brute-force if you only want to study the microstrip itself). Instead, practical FDTD solvers use simplified behavioral-models like zero-thickness conducting sheets instead of applying the actual Maxwell's equations. On the other hand, as far as I know, a 2D transmission line solver based on FEM/MoM can usually handle those without major problems.  But you're right, the low-frequency / small-detail problem can't be the full story, it cannot completely explain the preference of FEM/MoM for commercial applications. According to an old Agilent application note [1], MoM is advantageous for planar structures, so that can also be a reason,

Quote
Among all techniques to solve EM problems, the method of moments (MoM) is one of the hardest to implement because it involves careful evaluation of Green’s functions and EM coupling integrals. Maxwell’s equations are transformed into integral equations which upon discretization yield the coupling matrix equation of the structure.

The advantage of this transform is that the current distributions on the metal surfaces emerge as the core unknowns. This is in contrast to other techniques which typically have the electric and/or magnetic fields (present everywhere in the solution space) as the core unknowns. Only the surfaces of the metals, where the currents flow, need to be taken into account in the meshing (Figure 1). Hence the number of unknowns (or the size of the matrix) is much smaller. This results in a very efficient simulation technique, able to handle very complex structures.

This benefit comes with a price as the integral equations are not applicable for general 3D structures. The key is the availability of the Green’s functions. Computation of the Green’s functions is only available for free space or for structures that fit in a layered stack up. These so-called 3D planar structures can have any shape in the plane of the layered stack, but can only have vertical geometry features (via’s) in the normal direction. Many practical RF or microwave structures fall into this category. Hence the method of moments is a very wide-spread technique and commonly used for the simulation of printed antenna’s, MMIC’s, RF boards, SiPs, RFIC, SI structures and RF modules.

---

Quote
FDTD:
-Use structured mesh and often Cartesian mesh, which is less flexible than unstructured ones. To work around the problem of irregular shapes, "conformal FDTD" exists, but to my best knowledge are used for one-off research projects, and not widely implemented.
FEM/MoM:
+Use unstructured mesh, which is more flexible for irregular shapes.

Is this only because a finer mesh is needed with FDTD (and this will cause an increase in computational needs) or FEM's unstructured mesh provides a better (more accurate) result independent of FDTD's finer mesh ? (I know a bit about FDTD, not much about FEM)

I think it's both, in a sense. For irregular shapes, given a sufficiently fine Cartesian mesh, the results will gradually approximate the ideal results, but an unstructured mesh can do the same at a cost similar to regular shapes.

Quote
Is this only because a finer mesh is needed with FDTD (and this will cause an increase in computational needs) or FEM's unstructured mesh provides a better (more accurate) result independent of FDTD's finer mesh ? (I know a bit about FDTD, not much about FEM)

Same. I have a working knowledge of FDTD but not FEM/MoM. We need a FEM/MoM expert to solve the missing puzzle.

Quote
... It's also why FEM/MoM was historically used first because practical FDTD was not feasible until computers have enough memory.
FEM/MoM:
+Already Invented and used before FDTD (from an era when computers had little memory)

I didnt know the comparative history of the methods, thanks for the explanation, very helpful.

FDTD is great for large 3D problems, but often overkill if you have a very specialized problem that can be made to work within MoM. FDTD was proposed in the 1960s, but only began to see significant real-world uses in the 1980s on supercomputers, and it became a standard method after the 1990s after computers have enough memory. Meanwhile, MININEC could run on 32 kB Apple II computers to solve wire antenna problems - and only wire antenna problems.

Allen Taflove says [1],

Quote
Yee’s paper published in May 1966 represented a complete paradigm shift in how to solve Maxwell’s equations. Essentially all previous solution techniques were based on Fourier-domain concepts in the broadest sense. By this, I mean an a priori assumption of one or more of the following: a time-harmonic (sinusoidal steady-state) variation of all field quantities; a particular set of spatial modes; a particular geometry-appropriate Green’s function; a particular integral equation projected to a particular abstract function space; and perhaps a particular short-wavelength asymptotic field behaviour.

[...]

During most of the twentieth century, the engineering electromagnetics community was wedded to Fourier-domain concepts in the broadest sense, as mentioned earlier. FDTD was ignored, and at times even ridiculed. One such episode remains burned into my memory. In 1986, an internationally known professor actually laughed at me in an open meeting that had been called to consider the future of computational electromagnetics, because of my use of supercomputers. Pointing directly at me, he joked: “Look at Taflove over there. When he wakes up in the morning, he gets down on his knees, bows his head, and says, ‘And now, let us Cray’.” I was speechless and terrified — not yet being tenured at Northwestern University.

[1] http://web.archive.org/web/20220701194537/https://xdevs.com/doc/HP/pub/5990-3225EN.pdf

[2] Pile, David. "Numerical solution: Interview with Allen Taflove". Nature Photonics. 9: 5–6. doi:10.1038/nphoton.2014.305.
« Last Edit: February 25, 2024, 11:16:32 pm by niconiconi »
 
The following users thanked this post: metebalci

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14481
  • Country: fr
Re: EM solver, FDTD vs FEM
« Reply #8 on: February 26, 2024, 12:45:30 am »
I'm going to evaluate Elmer FEM btw: http://www.elmerfem.org/blog/
It does more than just EM simulation though, and there is some learning curve. I'm curious to see what we're able to get with it.
 

Offline switchabl

  • Frequent Contributor
  • **
  • Posts: 440
  • Country: de
Re: EM solver, FDTD vs FEM
« Reply #9 on: February 26, 2024, 12:46:36 am »
The problem with large(-ish) FDTD simulations is that you run out of memory really fast. This is true for all volume methods to some degree but having to refine the cartesian grid around small/curved structures makes it worse.

It is also not particularly well suited for resonant structures (think filters, antennas). If the quality factor is high, the simulation time required for the source energy to decay can become very long.

MoM can be very efficient if you can decompose your problem into multiple regions of homogeneous material because you only need to discretize the surfaces separating them and not the volume itself. You also get radiation boundary conditions basically for free. There is no need to simulate the sorrounding space and no need for PMLs. That makes it very attractive for things like antenna design and EMC simulations.

You do end up with a dense matrix in principle but it is still possible to solve it in O(n) using the fast multipole method (FMM). It is not exactly trivial to implement this. Building a MoM code with FMM from scratch is much, much harder than an FDTD code.

FDTD is much more flexible though. It is reasonably easy to include inhomogeneous, anisotropic and even non-linear materials. That is a big reason why it is so popular in the photonics space.
« Last Edit: February 26, 2024, 01:37:11 am by switchabl »
 
The following users thanked this post: Someone, niconiconi, metebalci

Offline niconiconi

  • Frequent Contributor
  • **
  • Posts: 350
  • Country: cn
Re: EM solver, FDTD vs FEM
« Reply #10 on: February 26, 2024, 02:42:30 am »
It is also not particularly well suited for resonant structures (think filters, antennas). If the quality factor is high, the simulation time required for the source energy to decay can become very long.

Great point. I completely forgot to mention it. Yeah, waiting for the energy to decay takes almost forever in an FDTD simulation when you have a resonator...  |O |O |O
 

Online selcuk

  • Regular Contributor
  • *
  • Posts: 123
  • Country: tr
Re: EM solver, FDTD vs FEM
« Reply #11 on: February 26, 2024, 07:15:16 am »

I know about openems, another is I think (not tried yet) meep, https://meep.readthedocs.io/en/latest/

Thank you for the recommendation for another open source tool.

There is a detailed book chapter about the topic. It compares different solver tools tested on planar antennas.

A Practical Guide to 3D Electromagnetic Software Tools (Guy A. E. Vandenbosch and Alexander Vasylchenko)
 
The following users thanked this post: metebalci

Offline metebalciTopic starter

  • Frequent Contributor
  • **
  • Posts: 451
  • Country: ch
Re: EM solver, FDTD vs FEM
« Reply #12 on: February 26, 2024, 12:07:03 pm »
The problem with large(-ish) FDTD simulations is that you run out of memory really fast. This is true for all volume methods to some degree but having to refine the cartesian grid around small/curved structures makes it worse.

It seems the optimization Ansys (in Lumerical FDTD) has is to change the mesh in different materials based on the refractive index and also using a much finer mesh when there is a high contrast interface.

It is also not particularly well suited for resonant structures (think filters, antennas). If the quality factor is high, the simulation time required for the source energy to decay can become very long.

Yes, I am aware of this, in general I guess if the energy does not leave the grid quickly, then there is this issue, when to stop the simulation. I dont know if it is correct to say this, but on the other hand, this is probably the result one is looking for in the transient response, so maybe it is expected or natural.

MoM can be very efficient if you can decompose your problem into multiple regions of homogeneous material because you only need to discretize the surfaces separating them and not the volume itself. You also get radiation boundary conditions basically for free. There is no need to simulate the sorrounding space and no need for PMLs. That makes it very attractive for things like antenna design and EMC simulations.

You do end up with a dense matrix in principle but it is still possible to solve it in O(n) using the fast multipole method (FMM). It is not exactly trivial to implement this. Building a MoM code with FMM from scratch is much, much harder than an FDTD code.

I didnt know MoM discretizes only the boundary, I should read more about it. I thought it is similar to FEM but other than being in frequency domain it sounds they are pretty different.

FDTD is much more flexible though. It is reasonably easy to include inhomogeneous, anisotropic and even non-linear materials. That is a big reason why it is so popular in the photonics space.

I know nothing about photonics but what you said sounds very relevant. I saw Ansys also mentions this, nonlinear materials and anisotropy in Lumerical product pages. Is this a need for electronics ? I dont remember I saw something about these for signal integrity in PCBs but I dont know much about RF and Microwave.
 

Offline metebalciTopic starter

  • Frequent Contributor
  • **
  • Posts: 451
  • Country: ch
Re: EM solver, FDTD vs FEM
« Reply #13 on: February 26, 2024, 01:16:21 pm »
Also, do you remember those "current density on the reference plane at different frequencies" visualization images from EMC books? The near-DC case needs a simulation under 1 MHz. Unmodified textbook FDTD can't do those.

This was actually the first thing I wondered, if they are created using FDTD, or if not if they can be created using FDTD.

Thanks for sharing the link to the Agilent white paper, it is a very short but a good summary, what I was looking for with specific applications. It also answers my question why at least the large companies (Ansys, Agilent etc.) do not provide all solver types for electronics. I thought Agilent only has FEM (and maybe MoM), I read they also have an FDTD solver.

In the interview with Taflove, I like the part: "Not many people know that Kane Yee was simply learning how to program in Fortran, as he told me 20 years later. He chose Maxwell’s time-dependent curl equations as the basis of his self-study because he wanted an initial-value problem that had both time and space derivatives.". I will give the example if someone asks me how to start learning a new programming language.

Also I read somewhere (Edit: quoting a paper [1], using 1/100 lambda grid, it has a solution within +- 1.5dB of the exact solution) that the numerical dispersion in FDTD can be an issue, in the sense that its error increases with time and it can reach an unacceptable level comparing to FEM or MoM. I dont know to what extent this is true but this made me wonder if the issue with simulating resonant structures is also because of this. Maybe the time it takes is half of the problem, and the other half is the increasing error with increasing simulation time.

[1] https://opg.optica.org/oe/fulltext.cfm?uri=oe-12-7-1214&id=79442
« Last Edit: February 26, 2024, 01:23:24 pm by metebalci »
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6264
  • Country: fi
    • My home page and email address
Re: EM solver, FDTD vs FEM
« Reply #14 on: February 26, 2024, 11:47:24 pm »
Is there an application or area specific or common reason to mainly select one of these methods or does it all depend on the problem (and the type of results one looking for) ? For example, in antenna research or radar etc. is one of these methods mainly used ?
Properties of the system being investigated dictates mostly which methods are most efficient and produce most useful results.  Some do parallelize/distribute better than others, though.

I don't know these simulations well enough to say exactly what properties are key in selecting the method.

The reason I wonder this is, I understand if a company or research group most often develops, uses and promotes only one method, but as far as I understand Ansys [HFSS] has all types of solvers but still either offers or recommends (I only know Ansys a bit from the free version, I dont know if it is possible to use any method for electronics in a commercially licensed version) FDTD for photonics and FEM/MoM for high-freq electronics.
Perhaps that is because FTDT requires explicit modeling of the EM wave propagation in materials.  (For optics, this is the dispersion stuff, and well known for typical materials.  I imagine the full EM spectrum frequency-dependent behaviour is not fully known for materials used in high-freq electronics.  So, it may not be an issue with the method per se, but simply a consequence of not having the necessary real-world data that the method needs.)

Just a guess, though.
 

Offline niconiconi

  • Frequent Contributor
  • **
  • Posts: 350
  • Country: cn
Re: EM solver, FDTD vs FEM
« Reply #15 on: February 27, 2024, 07:56:12 am »
FDTD is much more flexible though. It is reasonably easy to include inhomogeneous, anisotropic and even non-linear materials. That is a big reason why it is so popular in the photonics space.
I know nothing about photonics but what you said sounds very relevant. I saw Ansys also mentions this, nonlinear materials and anisotropy in Lumerical product pages. Is this a need for electronics ? I dont remember I saw something about these for signal integrity in PCBs but I dont know much about RF and Microwave.

FR-4 is inhomogeneous and anisotropic (e.g. see "fiber weave effect"), so yeah, modeling those is useful for signal integrity research. But for most non-research PCB simulations, the modeling rarely goes to that level of detail (unless you're doing research). Using a standard frequency-dependent lossy/dispersive material model is sufficient.

Also I read somewhere (Edit: quoting a paper [1], using 1/100 lambda grid, it has a solution within +- 1.5dB of the exact solution) that the numerical dispersion in FDTD can be an issue, in the sense that its error increases with time and it can reach an unacceptable level comparing to FEM or MoM. I dont know to what extent this is true but this made me wonder if the issue with simulating resonant structures is also because of this. Maybe the time it takes is half of the problem, and the other half is the increasing error with increasing simulation time.

[1] https://opg.optica.org/oe/fulltext.cfm?uri=oe-12-7-1214&id=79442

Using a 1/100 lambda grid is an extreme decision. In the research paper, they're using it for research and validation, so this decision understandable. For most practical problems, this kind of pathological cases hopefully won't show up, but if you ever find yourself in need of running FDTD at this resolution in an engineering context, FDTD is probably not the correct method to use. If one insists on using FDTD, one should consider using high-order differentiation. Classical FDTD is a second-order, central-difference algorithm, which is simple, fully-analyzed and works okay for practical uses. But if you're pushing for accuracy, 4th-order FDTD should be seriously considered. There are several papers on high-order FDTD for E&M, and also interestingly, room acoustics.

Also, do you remember those "current density on the reference plane at different frequencies" visualization images from EMC books? The near-DC case needs a simulation under 1 MHz. Unmodified textbook FDTD can't do those.

This was actually the first thing I wondered, if they are created using FDTD, or if not if they can be created using FDTD.

For low-frequency simulations, a similar problem is "low-frequency breakdown", if you have an electrically-small structure, numerical stability may eventually start to collapse, so you would find yourself unable to simulate it even with a big computer cluster (which is already a dramatic waste of energy when MoM/FEM would solve it immediately).

There are several modifications to FDTD that may overcome this "many timesteps" problem. Many involve the use of implicit methods, and the most well-known one is ADI-FDTD, which is unconditionally stable and allows one to use large timesteps, which can help too. But the downside of implicit methods is that the update equations are no longer fully iterative and involves linear algebra, albeit relatively lightweight.

All of these modifications such as 4th-order FDTD, ADI-FDTD are not widely implemented, most are in-house research code. This is the peculiar feature of FDTD - the basic algorithm is simple so everyone keeps coming up with their own ideas about how to add something new to make it work better for them...
 

Offline metebalciTopic starter

  • Frequent Contributor
  • **
  • Posts: 451
  • Country: ch
Re: EM solver, FDTD vs FEM
« Reply #16 on: March 03, 2024, 11:11:36 am »
I realized I confuse the discretization method (mesh vs. grid) with the actual (numerical) solver. I thought they are strongly coupled. Because of that and also I saw FEM and steady-state together too often, I thought FEM is for frequency domain solutions, and I thought Ansys HFSS/FEM solver is only working in frequency domain (which seems to be the case until ~2010), but then how transient simulations are done in Ansys. So, learning something new everyday, I saw HFSS also has a transient/time-domain solver(s) and it is either based on discontinuous Galerkin time domain (DGTD) (which seems to be also used in optics) or finite element time difference (FETD) method. They are still using the same HFSS/FEM mesh, hence all is under the name HFSS. HFSS also has other solvers (at least 3 more), as far as I understand, they are for larger structures (not for PCB).
 

Offline switchabl

  • Frequent Contributor
  • **
  • Posts: 440
  • Country: de
Re: EM solver, FDTD vs FEM
« Reply #17 on: March 03, 2024, 01:53:41 pm »
So FEM is basically the swiss army knife of PDE solvers. It can be used with or without time-stepping as well as for non-linear problems. The same solver could be applied to EM, structural analysis, acoustics, thermal analysis, fluid dynamics... potentially at the same time. As a result, there are a lot of FEM codes and the mathematical theory is well-developed.

If you start with full Maxwell's equations, you end up with a time-domain version of FEM that is more or less the weak/integral equivalent of FDTD. On the other hand, it is also possible to develop a finite-difference method from the time-harmonic equations, resulting in the somewhat more obscure FDFD (finite-difference frequency-domain).

The choice between frequency- and time-domain approaches is as much about the nature of your problem as the type of analysis you are ultimately interested in. It may be more efficient to reconstruct transient behaviour from a set of time-harmonic solutions (particularly if the simulation time would otherwise be very long as in the case of the high-Q resonator mentioned above). And of course it is also extremely common to use broadband pulse sources and fourier transform monitors in FDTD for frequency-domain analysis. In many cases, full wave simulation is just an intermediate step anyway where the goal is just to extract s-parameters for use in SPICE/harmonic balance/signal integrity simulations.
« Last Edit: March 04, 2024, 10:34:49 am by switchabl »
 

Offline metebalciTopic starter

  • Frequent Contributor
  • **
  • Posts: 451
  • Country: ch
Re: EM solver, FDTD vs FEM
« Reply #18 on: March 03, 2024, 03:04:01 pm »
The choice between frequency- and time-domain approaches is as much about the nature of your problem as the type of analysis you are ultimately interested in. It may be more efficient to reconstruct transient behaviour from a set of time-harmonic solutions (particularly if the simulation time would otherwise be very long as in the case of the high-Q resonator mentioned above).

I thought it is showing the transient solution with something like that but it seems there is also a time-domain solver.

And of course it is also extremely common to use broadband pulse sources and fourier transform monitors in FDTD for frequency-domain analysis. In many cases, full wave simulation is just an intermediate step anyway where the goal is just to extract s-parameters for use in SPICE/harmonic balance/signal integrity simulations.

Yes, I am slowly putting the pieces together but far from seeing the whole picture yet.
 

Offline rhb

  • Super Contributor
  • ***
  • Posts: 3483
  • Country: us
Re: EM solver, FDTD vs FEM
« Reply #19 on: March 03, 2024, 09:00:06 pm »
Having done a lot of elastic and acoustic simulations by every method *except* FEM I'd like to note that *every* solver has a unique set of artifacts.

Correct choice of method takes the effect of the artifacts into account as well as the problem statement.

Have Fun!
Reg
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf