Electron Distribution
{ elec.mpl }
{ GAMS Model Library, http://www.gams.com/modlib/libhtml/elec.htm }
{ Distribution of electrons on a sphere, NLP, Size: 25x75 }
TITLE
Elec;
OPTIONS
ModelType=Nonlinear
ParserType=Extended
INDEX
i := 1..25;
j := i;
ut[i,j] WHERE (j > i);
DATA
!not allowed Theta[i] := 2*pi;!*UNIFORM(0,1);
A := 2*pi;
B[i] := UNIFORM(0,1);
Theta[i] := A*B;
Phi[i] := pi*B;
XInit[i] := cos(Theta)*sin(Phi);
YInit[i] := sin(Theta)*sin(Phi);
ZInit[i] := cos(Phi);
VARIABLES
X[i] INITIAL XInit;
Y[i] INITIAL YInit;
Z[i] INITIAL ZInit;
MODEL
MIN Potential = SUM(i,j IN ut: 1/((X[i]-X[i:=j])^2
+ (Y[i]-Y[i:=j])^2
+ (Z[i]-Z[i:=j])^2)^0.5);
SUBJECT TO
Ball[i]: X^2 + Y^2 + Z^2 = 1;
BOUNDS
-1 <= X <= 1;
-1 <= Y <= 1;
-1 <= Z <= 1;
END
Back To Top
|
Maximal Home Page
|
List of Models |
Previous Page
|
Next Page