MMTL, the Multilayer Multiconductor Transmission Line 2-D and 2.5-D electromagnetic modeling tool suite, and its graphical front-end TNT.

Yifeng Li 7bf8b707b5 README.md: change wording. 1 gadu atpakaļ
bem 9b29185d2a Makefile: enable LTO. 1 gadu atpakaļ
calcCAP 676d51b751 NetBSD patch patches/patch-ak 1 gadu atpakaļ
calcRL ba834f0a73 Import upstream 1.2.2. 1 gadu atpakaļ
csdl ba834f0a73 Import upstream 1.2.2. 1 gadu atpakaļ
doc c1e852b38d NetBSD patch patches/patch-ah 1 gadu atpakaļ
examples ba834f0a73 Import upstream 1.2.2. 1 gadu atpakaļ
gui 6158020259 NetBSD patch patches/patch-aj 1 gadu atpakaļ
sppdgTcllib fc024fb51d tkcon.tcl: disable Tk version check. 1 gadu atpakaļ
units ba834f0a73 Import upstream 1.2.2. 1 gadu atpakaļ
AUTHORS ba834f0a73 Import upstream 1.2.2. 1 gadu atpakaļ
COPYING ba834f0a73 Import upstream 1.2.2. 1 gadu atpakaļ
ChangeLog ba834f0a73 Import upstream 1.2.2. 1 gadu atpakaļ
INSTALL ba834f0a73 Import upstream 1.2.2. 1 gadu atpakaļ
Makefile.am 610c177f2e NetBSD patch patches/patch-ae 1 gadu atpakaļ
Makefile.in 081bc77b39 NetBSD patch patches/patch-af 1 gadu atpakaļ
NEWS ba834f0a73 Import upstream 1.2.2. 1 gadu atpakaļ
PrFile32.exe ba834f0a73 Import upstream 1.2.2. 1 gadu atpakaļ
README.md 7bf8b707b5 README.md: change wording. 1 gadu atpakaļ
README.upstream e0c1af5eca README: rename to README.upstream 1 gadu atpakaļ
THANKS ba834f0a73 Import upstream 1.2.2. 1 gadu atpakaļ
aclocal.m4 ba834f0a73 Import upstream 1.2.2. 1 gadu atpakaļ
bootstrap ba834f0a73 Import upstream 1.2.2. 1 gadu atpakaļ
conductivity.list ba834f0a73 Import upstream 1.2.2. 1 gadu atpakaļ
config.guess ba834f0a73 Import upstream 1.2.2. 1 gadu atpakaļ
config.sub ba834f0a73 Import upstream 1.2.2. 1 gadu atpakaļ
configure e831690d7d NetBSD patch patches/patch-ao 1 gadu atpakaļ
configure.ac 7a9ac26153 NetBSD patch patches/patch-an 1 gadu atpakaļ
inno-setup.iss ba834f0a73 Import upstream 1.2.2. 1 gadu atpakaļ
install-sh ba834f0a73 Import upstream 1.2.2. 1 gadu atpakaļ
missing ba834f0a73 Import upstream 1.2.2. 1 gadu atpakaļ
mkinstalldirs ba834f0a73 Import upstream 1.2.2. 1 gadu atpakaļ
printfile215-32.zip ba834f0a73 Import upstream 1.2.2. 1 gadu atpakaļ
tnt ba834f0a73 Import upstream 1.2.2. 1 gadu atpakaļ
tnt.tcl ba834f0a73 Import upstream 1.2.2. 1 gadu atpakaļ

README.md

TNT-MMTL

with patches and port to WebAssembly.

In radio and high-speed digital electronics design, calculating the characteristic impedance of a transmission line on a printed circuit board is of critical importance. For simple problems, they can be solved either analytically or approximately using highly-accurate closed-form formulas (e.g. using the calculator TransCalc in KiCad and Qucs). However, if multiple dielectric layers are involved, an electromagnetic field solver must be used.

MMTL (Multilayer Multiconductor Transmission Line tool), is a 2D electromagnetic field solver developed by Mayo Clinic's Special Purpose Processor Development Group (SPPDG) from the 1980s to the 1990s. It solves transmission lines with an arbitrary circuit board layer stackup using the Boundary Element Method (a.k.a. Method of Moments) according to the laws of electrostatics.

In the early 2000s, it was released as free software under the GPLv2+ license. Development was then discontinued, and the project fell into obscurity and is mostly forgotten. In spite of its limitations, it's still a powerful tool in the free and open source world. Thus, bringing TNT-MMTL to the Web would be an interesting idea. Although it doesn't have as many features (or even generate the correct solution for some structures) as Si8000 or Si9000 by Polar Instruments - the industry-standard proprietary solver - still, for the simple cases, the results are comparable within a percent or two.

TNT is the graphical front end of MMTL, written in Tcl/Tk, and requires Tcl, Tk, Incr Tcl, IWidgets, and BWidget packages.

This repository is a fork that includes patches to restore TNT-MMTL back into working order again. It also includes two additional Makefile to enable cross-compiling to WebAssembly, allowing it to be used inside a Web browser.

Limitations

  1. Loss and attenuation are not supported, characteristic impedance is calculated with only L and C, without R and G. R and G can be generated but it only considers DC resistance.

  2. Occasionally, some inputs can generate ill-formed matrices that can't be solved with a LU decomposition error. To work around the issue, slightly change the dimensions.

  3. Crosstalk calculation looks strange.

Code Organization

MMTL has three field solvers: BEM, calcCAP, and calcRL. Currently, only BEM is supported by this fork.

BEM is the main solver that uses Boundary Element Method (a.k.a Method of Moments), it's written in C++, and uses a small subset of the FORTRAN library, Naval Surface Warfare Center Mathematical Library (NSWC), as its linear algebra kernel, it’s an old version written in FORTRAN 77, including some subroutines from the original LINPACK release from 1978.

calcCAP and calcRL are full-wave solver based on the Finite Element Method with support of loss and attenuation. Unfortunately, they have never been developed beyond prototypes. For example, stripline is not unsupported, the simulation result would be incorrect. They're currently disabled due to build problems.

Build WebAssembly

This fork includes additional Makefile to enable cross-compiling to WebAssembly, allowing it to be used inside a Web browser.

Toolchain

LLVM 15, flang 15, the LLVM linker lld 15, Emscripten, and Binaryen must be used to build this project. On Debian Sid, they can be installed via:

sudo apt install llvm-15
sudo apt install flang-new-15
sudo apt install lld-15
sudo apt install emscripten
sudo apt install binaryen

And add LLVM 15 to your search path:

export PATH="/usr/lib/llvm-15/bin:${PATH}"

For more information, see the blog post:

Build

First, switch to the webassembly branch of the project:

git checkout webassembly

Build the FORTRAN source via:

cd ./bem/build-wasm/build-fortran/
make

Next, copy the object code nswc.a from build-fortran to build-cpp:

cp nswc.a ../build-cpp

build the C++ source via:

cd ../build-cpp
make

Two files are generated, bem.js and bem.wasm, which can be used in a Web browser.

Upstream

TNT and MMTL field solver programs and their user manuals are available on the web. See:

http://mmtl.sourceforge.net/


Copyright (C) Mayo Foundation 2002-2004.

TNT is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with TNT; see the file COPYING. If not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA