Mathematica as an Engineering tool

FET Diagram

This notebook is a modification of Paul Wellin's EngineeringDemo.nb

Code by Alfy Riddle
 Macalan Consulting
 Author of: Nodal2.0: A package for circuit analysis in Mathematica

By combining a few of Mathematica's built-in drawing commands, an engineer can build a precise representation of any system.

Here is an example from electrical engineering using some Mathematica programming developed by Alfy Riddle.

Code

Riddle's function produces a diagram of a FET using the programming structures of Mathematica.  The function is made up of a series of Mathematica commands wrapped in Block, a Mathematica function that sets up an environment in which the values of variables can be changed temporarily.  After executing the block of commands, the original values of all symbols used are restored.

fetDiagram[] := 
      Block[{Rgs, Rds, Cgs, Cgd, Cds, gm, tau}, 
        Show[Graphics[{Line[{{1, 0}, {- .3, 
                    0}, {- .3,  .1}, {- .3, - .1}}], 
              Line[{{-1, 0}, {- .4, 
                    0}, {- .4,  .1}, {- .4, - .1}}], 
              Line[{{ .8, 
                    0}, { .8, - .2}, { .7, - .2}, { .9, - .2}}], 
              Line[{{ .5, - .5}, { .5, 0}}], 
              Line[{{0, - .5}, { .8, - .5}, { .8, - .3}, { .7, - .3}, { .9, - .3}}], 
              Line[{{- .8, 
                    0}, {- .8, - .2}, {- .7, - .2}, {- .9, - .2}}], 
              Line[{{- .8, - .5}, {- .8, - .3}, {- .7, - .3}, {- .9, - .3}}], 
              Line[{{- .8, - .5}, {0, - .5}, {0, - .65}}], 
              Line[{{ .1, - .45}, {0, - .25}, { .1, - .05}, { .2, - .25}, { .1, - .45}}], Line[{{ .1, - .5}, { .1, 0}}], 
              Polygon[{{ .1, - .4}, { .07, - .3}, { .135, - .3}}], Text[1, {- .95,  .05}], Text[2, { .1, - .65}], 
              Text[3, { .95,  .05}], Text[Rgs, {- .5, -0.38}], 
              Text[Rds, {0.35, - .37}], 
              Text[Cgs, {- .93, - .37}], 
              Text[Cgd, {- .15,  .05}], Text[Cds, { .95, - .37}], 
              Text[gm, {- .1, - .17}], 
              Text[tau, {- .1, - .37}], GrayLevel[ .5], 
              Rectangle[{- .7, - .45}, {- .3, - .55}], 
              Rectangle[{ .45, - .1}, { .55, - .4}]}], 
          AspectRatio -> Automatic]]

Graphic

Now call on the function to produce the FET diagram.

fetDiagram[]