General > General Technical Chat
EM solver, FDTD vs FEM
<< < (4/4)
niconiconi:

--- Quote from: metebalci on February 26, 2024, 12:07:03 pm ---
--- Quote from: switchabl on February 26, 2024, 12:46:36 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.

--- End quote ---
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.

--- End quote ---

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.


--- Quote from: metebalci on February 26, 2024, 01:16:21 pm ---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

--- End quote ---

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.


--- Quote from: metebalci on February 26, 2024, 01:16:21 pm ---
--- Quote from: niconiconi on February 25, 2024, 11:14:33 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.

--- End quote ---

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

--- End quote ---

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...
metebalci:
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).
switchabl:
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.
metebalci:

--- Quote from: switchabl on March 03, 2024, 01:53:41 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).

--- End quote ---

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


--- Quote from: switchabl on March 03, 2024, 01:53:41 pm ---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.

--- End quote ---

Yes, I am slowly putting the pieces together but far from seeing the whole picture yet.
rhb:
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
Navigation
Message Index
Previous page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod