NTNUJAVA Virtual Physics Laboratory
Enjoy the fun of physics with simulations!
Backup site http://enjoy.phy.ntnu.edu.tw/ntnujava/
October 23, 2017, 06:04:19 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
There is a better way to do it; find it. ..."Thomas Edison(1847-1931, American inventor, 1093 patients)"
Google Bookmarks Yahoo My Web MSN Live Netscape Del.icio.us FURL Stumble Upon Delirious Ask FaceBook

Pages: [1]   Go Down
  Print  
Author Topic: divergence modeling  (Read 5783 times)
0 Members and 1 Guest are viewing this topic. Click to toggle author information(expand message area).
computer
Newbie
*
Offline Offline

Posts: 0

«
Embed this message
on: October 17, 2009, 03:05:21 am » posted from:Buenos Aires,Distrito Federal,Argentina

Hi,people.
My question is about finite difference modeling of EM fields.
Exist some methods to force numeric divergence be zero,
not changing too much the overall field picture?
Like [E(x+dx,y,z) - E(x-dx,y,z)] / dx + [E(x,y+dy,z) - E(x,y-dy,z)] / dy + [E(x,y,z+dz) - E(x,y,z-dz)] / dz = 0.
Theoretically Maxwell equations maintain divergence stable,
but numeric errors accumulate.Or it maybe necessary setting initial field state.
Thanks in advance.
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3080



WWW
«
Embed this message
Reply #1 on: October 17, 2009, 10:25:25 am » posted from:Taipei,T\'ai-pei,Taiwan

The equestion you wrote is first order Euler's method for no free charge case.
You can modify it to second order differential method (use potential V)
\frac{\partial^2 V}{\partial x^2}+\frac{\partial^2 V}{\partial y^2}+\frac{\partial^2 V}{\partial z^2}=0
and use relazation method (change to boundary value problem) to find the solution for V. Then calculate Ex,Ey,Ez from V.
Logged
computer
Newbie
*
Offline Offline

Posts: 0

«
Embed this message
Reply #2 on: October 21, 2009, 06:33:12 pm » posted from:Buenos Aires,Distrito Federal,Argentina

As I'd understood,you propose convert vector field into scalar (easy to smooth),and vice versa.
But from no charge electric field we can not restore potentials unequivocally.It can be closed,circular.
Logged
Fu-Kwun Hwang
Administrator
Hero Member
*****
Offline Offline

Posts: 3080



WWW
«
Embed this message
Reply #3 on: October 21, 2009, 08:26:11 pm » posted from:Taipei,T\'ai-pei,Taiwan

I will try to help if you can describe your problem in more detail (all the background information).
Otherwise, I do not know how to help.
Logged
computer
Newbie
*
Offline Offline

Posts: 0

«
Embed this message
Reply #4 on: October 22, 2009, 08:55:25 pm » posted from:Buenos Aires,Distrito Federal,Argentina

I use model for dynamic field visualization,so calculations must be fast,
not like solution of equations system.Field represented as structure of double-precision values,
three for electric vector Ex,Ey,Ez,and three for magnetic Hx,Hy,Hz.
Time step (dt) is equal to distance step (dl) divided by velocity of light (c).
Rectangular block of points.Finite-difference like algorithm calculates new vector values
after time step,like Ex += [dt * K] * [[Hz(x,y+dy,z) - Hz(x,y-dy,z)] / [2 * dy]
- [Hy(x,y,z+dz) - Hy(x,y,z-dz)] / [2 * dz]] with some factor K following from Maxwell equations
(background equation dEx/dt = K * [dHz/dy - dHy/dz]).The main problem arises
trying to zero divergence,as in real-world fields.For example,setting initial conditions
we wish to connect two regions described by different analytic functions.
It is difficult do it "manually" for each case.I seek an universal algorithm.
Seems I need rather some programming trick then deep scientific explanation.
Scalar fields are smoothed easily,but voluntary electric field we can not represent as some gradient.
« Last Edit: October 22, 2009, 09:03:36 pm by computer » Logged
Pages: [1]   Go Up
  Print  
There is a better way to do it; find it. ..."Thomas Edison(1847-1931, American inventor, 1093 patients)"
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
Tracker Free Video Analysis & Modeling Tool by Douglas Brown
Collaborative Community of EJS
lookang 21 60890 Last post May 05, 2017, 03:56:24 pm
by mxffiles
Tracker: image and video analysis package and modeling tool
Physics related resources
Fu-Kwun Hwang 2 11278 Last post November 15, 2010, 03:57:54 pm
by casualz
An Instruction Model for Modeling with simulations
Information and Download
lookang 1 3822 Last post April 17, 2010, 06:45:46 pm
by Fu-Kwun Hwang
Tracker Modeling in Pendulum: Video By Lim Jit Ning
Collaborative Community of EJS
lookang 6 7394 Last post July 06, 2012, 08:21:13 am
by lookang
Tracker Modeling in Wooden Rod rolling down a slope
Collaborative Community of EJS
lookang 0 4065 Last post July 13, 2012, 07:53:32 am
by lookang
Powered by MySQL Powered by PHP Powered by SMF 1.1.13 | SMF © 2006-2011, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 0.129 seconds with 23 queries.since 2011/06/15