Group Abstract Group Abstract

Message Boards Message Boards

0
|
10.2K Views
|
7 Replies
|
0 Total Likes
View groups...
Share
Share this post:

solve for highly nonlinear double variable, decoupled equation

Posted 11 years ago
In[29]= h = 6.626*10^-34;    
    q = 1.6*10^-19;    
    k = 1.38*10^-23;   
    c = 3*10^8;   
    ts = 6000;   
    fw = 2.18*10^-5;   
    te = 300;   
    ms = (k*ts);     
    me = (k*te);   
    vol2 = (q*v2)/(k*te);   
    vol1 = (q*v1)/(k*te);     
    Eg1 = Input[]       
    Eg2 = Input[]          
    nu1ts = (Eg1*q)/(k*ts);   
    nu2ts = (Eg2*q)/(k*ts);   
    nu1te = (Eg1*q)/(k*te);    
    nu2te = (Eg2*q)/(k*te);    
    qi1te = NIntegrate[(x^2)/(-1 + (Exp[x])), {x, nu1te, Infinity}];           
    qs1te = (qi1te*2*\[Pi]*(me^3))/((h^3)*(c^2))       
    f01 = 2*qs1te;      
    i01 = q*f01;         
    qi2te = NIntegrate[(x^2)/(-1 + (Exp[x])), {x, nu2te, Infinity}];        
    qs2te = (qi2te*2*\[Pi]*(me^3))/((h^3)*(c^2))        
    f02 = 2*qs2te;        
    i02 = q*f02;          
    qi1ts = NIntegrate[(x^2)/(-1 + (Exp[x])), {x, nu1ts, Infinity}];            
    qs1ts = (qi1ts*2*\[Pi]*(ms^3))/((h^3)*(c^2))       
    qi12ts = NIntegrate[(x^2)/(-1 + (Exp[x])), {x, nu2ts, nu1ts}]        
    qs12ts = (qi12ts*2*\[Pi]*(ms^3))/((h^3)*(c^2))          
    (*fs1=(fw*qs1ts)+(qs1te*Exp[vol2])            
    fs2=(fw*qs12ts)+(qs1te*Exp[vol1])*)           
    NSolve[{(1 + vol1)*
         Exp[vol1] - ((((fw*qs1ts) + (qs1te*Exp[vol2]))/f01)) - (.5*vol2*
          Exp[vol1]) == 
       0, (1 + vol2)*
         Exp[vol2] - ((((fw*qs12ts) + (qs1te*Exp[vol1]))/
           f02)) - ((qs1te/qs2te)*.5*vol1*Exp[vol2]) == 0}, {vol1, vol2}]             

    take Eg1=1.7       
    and Eg2=1.12       
    NSolve::ivar: 38.6473 v1 is not a valid variable. >>          
    NSolve[{-225.314 (2.18383*10^21 + 0.00221913 E^(38.6473 v2)) + 
        E^(38.6473 v1) (1 + 38.6473 v1) - 19.3237 E^(38.6473 v1) v2 == 
       0, -9.40801*10^-8 (1.72614*10^21 + 0.00221913 E^(38.6473 v1)) - 
        8.06863*10^-9 E^(38.6473 v2) v1 + 
        E^(38.6473 v2) (1 + 38.6473 v2) == 0}, {38.6473 v1, 38.6473 v2}]            

but does not give any solution for v1 and v2

Attachments:
POSTED BY: Palas Kar
7 Replies
Posted 11 years ago

please find the attachment.... here I explain my problem in detail.............

Attachments:
POSTED BY: Palas Kar
Posted 11 years ago

Usual syntax for using results from Solve, FindRoot, etc. for further calculations.

In[1]:= <<<snip>>>
sol = FindRoot[{(1 + vol1) Exp[vol1] - (fw*qs1ts + qs1te*Exp[vol2])/f01 - .5 vol2 Exp[vol1] == 0,
   (1 + vol2) Exp[vol2] - (fw*qs12ts + qs1te*Exp[vol1])/f02 - qs1te/qs2te .5 vol1*Exp[vol2] == 0}, {{v1, 1000}, {v2, 1000}}]

Out[32]= {v1 -> 4998.29, v2 -> 3300.01}

In[33]:= {q*v1/(k*te), q*v2/(k*te)} /. sol

Out[33]= {3.28446, 2.16849}
POSTED BY: Bill Simpson
Posted 11 years ago

Perhaps he was looking for vol1 and vol2 from the calculated values of v1 and v2. Those are much closer to his estimates.

POSTED BY: Bill Simpson
Posted 11 years ago

what is the value of vol1 and vol2?

POSTED BY: Palas Kar
Posted 11 years ago
POSTED BY: Jim Baldwin
Posted 11 years ago

Many changes in this and you must verify that all those are correct and why each character was changed.

In[1]:= h = 6.62610^-34;
q = 1.610^-19;
k = 1.3810^-23;
c = 310^8;
ts = 6000;
fw = 2.1810^-5;
te = 300;
ms = k*ts;
me = k*te;
vol2 = q*v2/(k*te);
vol1 = q*v1/(k*te);
Eg1 = Input[];
Eg2 = Input[];
nu1ts = Eg1*q/(k*ts);
nu2ts = Eg2*q/(k*ts);
nu1te = Eg1*q/(k*te);
nu2te = Eg2*q/(k*te);
qi1te = NIntegrate[x^2/(-1 + Exp[x]), {x, nu1te, Infinity}];
qs1te = qi1te 2 \[Pi] me^3/(h^3 c^2);
f01 = 2 qs1te;
i01 = q*f01;
qi2te = NIntegrate[x^2/(-1 + Exp[x]), {x, nu2te, Infinity}];
qs2te = qi2te 2 \[Pi] me^3/(h^3 c^2);
f02 = 2 qs2te;
i02 = q*f02;
qi1ts = NIntegrate[x^2/(-1 + Exp[x]), {x, nu1ts, Infinity}];
qs1ts = qi1ts 2 \[Pi] ms^3/(h^3 c^2);
qi12ts = NIntegrate[x^2/(-1 + Exp[x]), {x, nu2ts, nu1ts}];
qs12ts = qi12ts 2 \[Pi] ms^3/(h^3 c^2);
fs1 = fw*qs1ts + qs1te*Exp[vol2];
 fs2 = fw*qs12ts + qs1te*Exp[vol1];
FindRoot[{(1 + vol1) Exp[vol1] - (fw*qs1ts + qs1te*Exp[vol2])/f01 - .5 vol2 Exp[vol1] == 0,
   (1 + vol2) Exp[vol2] - (fw*qs12ts + qs1te*Exp[vol1])/f02 - qs1te/qs2te .5 vol1*Exp[vol2] == 0},
   {{v1, 1000}, {v2, 1000}}]    

Out[32]= {v1 -> 4998.29, v2 -> 3300.01}
POSTED BY: Bill Simpson
Posted 11 years ago

Expected v1 in the range of 1 to 3 volt. And v2 0.1 to 1.5 volt. the error message is " FindRoot::cvmit: Failed to converge to the requested accuracy or precision within 100 iterations. >> "

POSTED BY: Palas Kar
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard