FC Coding is
One step from 1st Principles to Solution!

Home

User's Maxwell's Equation

Maxwell's Equation
_________

Wikipedia comments: "Maxwell's equations are a set of partial differential equations that, together with the Lorentz force law, form the foundation of classical electrodynamics, classical optics, and electric circuits. These fields in turn underlie modern electrical and communications technologies. Maxwell's equations describe how electric and magnetic fields are generated and altered by each other and by charges and currents. They are named after the Scottish physicist and mathematician James Clerk Maxwell who published an early form of those equations between 1861 and 1862."

Differential form in a vacuum:

I. Gauss' law for electricity

∇ ⋅ E = 0

II. Gauss' law for magnetism

∇ ⋅ B = 0

III. Faraday's law of induction
∇ x E = - ∂B/∂t
IV. Ampere's law

∇ x B = ε0 μ0i ∂E/∂t ∫ E ⋅ dA

Have a Maxwell's equation to solve? Or any other math equations? For the next few months of 2014, we are willing to help you solve them using Calculus-level programming. To start, copy and modify the source code below in a file we'll call it {abc}{123}.fc where {abc} = your initials and {123} = any number or id; 8 characters max. for filename. Edit your {abc}{123}.fc file, especially lines starting with a "!" character. E-mail us your {abc}{123}.fc file. We will compile & execute it and send you the output file. Try compiling you own code with our FC-Compiler program. Download and install FC-Compiler with more [~60] example problems to choose from. Learn how easy it works.

All "!" characters in columns 1 or 2 must be deleted before compiling. These "!" were added in order to point out areas needing work.

Next, you may modify a copy of this web page and send it to us for viewing. If accepted, we will post your webpage showing your problem with solution. If you want people to be able to contact you, please include your e-mail address on this web page.

Please mention our goal-driven.net website to others. Thanks!


User's Maxwell's Equation Source Code:



For 1-dimensional (1D) Maxwell's Equation:



      global all
      problem MaxwellsPDE
C ------------------------------------------------------------------------
C --- Calculus Programming example: Maxwell's 1D Equation; a PDE Initial
C --- Value Problem solved using Method of Lines.
C ------------------------------------------------------------------------
        dynamic U, Ut, Ut0
C
C User parameters ...
        e0 = 8.854187817e-12 ! F/m or A2 s4 kg-1m−3 permittivity of free space
        pi = 4*atan(1)
        u0 = 4*pi*e-7	      ! N·A−2 ... permeability of free space
!       ipoints = 101         ! grid pts. over x-axis
!       tFinal =  1           ! final time
C
C x-parameter initial settings: x ==> i
!        xFinal =  1:    ip = ipoints:   dx= xFinal/(ipoints-1)
C
C t-parameter initial settings: t ==> m
        pi = 4*atan(1):     tPrint = tFinal/20
        allot U(ip), Ut(ip), Ut0(ip)
C
        call tAxis      !
      end               ! Stmt.s not necessary in IVP, but used in BVP versions
      model tAxis       !
C ... Integrate over t-axis
C
        t= 0:    tPrt = tPrint:      dt = tPrt/10
        Initiate janis;  for PDE;
     ~       equations Ut/U;  of t;  step dt;  to tPrt
        do while (t .lt. tFinal)
          Integrate PDE;  by janis
          if( t .ge. tPrt) then
            print 79, t, (U(ij), ij = 1, ip)
            tPrt = tPrt + tPrint
          end if
        end do
 79     format( 1x, f8.4, 1x, 20(g14.5, 1x))
      end
      model PDE                         ! Partial Differential Equation
C                                       ! Method of Lines
!        U(1)=U0(x):    Ux(1)=0:   Uxx(1)=0    ! Initial Conditions
        do 20 ij = 2, ipoints-1         ! System of ODEs
          Ux = (U(ij)-U(ij-1))/dx 	! approx. partial of U w.r.t. x
          Uxx = (U(ij+1) - 2*U(ij) + U(ij-1))/dx**2
!         Uxx(ij)= ... f(x, U(ij), Ux(ij), Ut)
!         Ut = U
 20     continue
      end
      Fmodel U0(xx)       ! Initial starting values @ t = 0
!       if( xx .lt. 0) then
!         U0 = 0
!       elseif( xx .lt. .5 ) then
!         U0 = (1 - cos( 4 * pi * xx))/2
!       else
!         U0 = 0
!       endif
      end

User's Maxwell's Equation Output:



selected output goes here ...
HTML code for linking to this page:


<a href="http://goal-driven.net/math-problems/maxwell-equation.html"><img style="float:left; width:100px" src="http://goal-driven.net/image/fc-compiler-icon.png"/> <strong>Maxwell's (Partial Differential) Equation</strong> </a>; Simulation to Optimization, Tweak Parameters for Optimal Solution.

Go to top

 
Valid CSS! Calculus (level) Problem-Solving for Engineers & Scientists

Textbooks - Parameter Estimation 4 ODE/PDE - Signal Analysis / Spectral Estimation - Body Plasma - Solar Cell
Increasing Productivity Examples: AC Motor Design - Matched Filters - Pulse Slimming / InterSymbol Interference - Pilot (safe) Ejection - PharmacoKinetics Simulation - Business Strategies & War Gaming - BVP - Implicit Equations