MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Mathematica and RC circuits

  • To: mathgroup at smc.vnet.net
  • Subject: [mg56919] Re: Mathematica and RC circuits
  • From: dh <dh at metrohm.ch>
  • Date: Tue, 10 May 2005 03:42:22 -0400 (EDT)
  • References: <d5hu1r$jtc$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,
your "question" is not exactly very clear, but I try my best. If you 
want a good answer, you should put some effort into putting a good 
question. See below
Sincerely, Daniel

1s1kjake wrote:
> I am trying to use Mathematica 5.1.1 to solve an RC circuit, and I am
> having problems. When ever I use I or i for the current the program
> keeps running untill it close down.
I is used as the imaginary unit and can not be used as a variable name. 
As for i, there is no problem using it as a variable name.
   Then other problem, how do I set
> up Mathematica to solve this equation for dvdt,  i = v/r + c dv/dr.

Guessing from your equation I think you have a parallel circuit of an 
resitor and a capacitor. But then the term dv/dr should read dv/dt. A 
sensible question is to ask for the voltage, given the current. As you 
have a first order DG you also need a starting value, say v[0]==0.
Well, this gives the following equations:
eq={i[t]==v[t]/r+c v'[t], v[0]==0};

Lets make an example by choosing:

i[t_]=1; r=1; c=1;

this is solved for the time {0,1} by:

sol= v/. NDSolve[eq,v,{t,0,1}][[1]];

and plotted:

Plot[sol[xt],{t,0,1}]

> Then I want to plot this equation based on diferent current imputs.
> thanks
> 


  • Prev by Date: Re: Partitioning a list from an index
  • Next by Date: Re: meaning of a "*" in search string?
  • Previous by thread: Mathematica and RC circuits
  • Next by thread: NSum: badly missed Option