Recent content by H Smith 94

  1. H Smith 94

    Verlet algorithm: Why am I getting this output?

    Thank you for all your help everyone! Fig. 4 Complete orbit of the Earth around the Sun in 1 year. I have attached the full code as a .txt file for anyone interested.
  2. H Smith 94

    Verlet algorithm: Why am I getting this output?

    This is a very useful resource! I'm a little wary about implementing half-steps at this point but it has certainly helped me relate the code to the math, thank you. I thought the same thing, too! But I can't seem to find where it would be, unless 1.0 Au counts as a small number for the initial...
  3. H Smith 94

    Verlet algorithm: Why am I getting this output?

    Wow, thank you for your extensive post! Well spotted! I'm a little embarrased I didn't notice that myself. I have now defined [FONT=Courier New]th[n] as [FONT=Courier New]th[n+1] = atan( y[n+1] / x[n+1]), or \theta(t+\Delta t) = \mathrm{arctan}\left(\frac{y(t+\Delta t)}{x(t+\Delta t)}\right)...
  4. H Smith 94

    Verlet algorithm: Why am I getting this output?

    Thank you for your responses! I was aware is had to be small but I didn't know it was that small! I've decreased it to about 1/10th of a day and it has indeed improved the accuracy. I am still getting similarly strange output, as follows. Fig. 2 Output with timestep ##dt = 1/3650##...
  5. H Smith 94

    Verlet algorithm: Why am I getting this output?

    Hi! I am currently trying to write a code in C to simulate the orbit of planets around the Sun in the solar system. I am using the velocity Verlet approach and finding that my code produces no acceleration in the ##y##-direction (aside from for ##t_n = 0##,) and that the planet just flies off...
  6. H Smith 94

    Finding the velocity of a wave

    I didn't want to put people off with too long a post, but you're right, I should provide more information. The textbook is available for free online, and it's equations (1.01) and (1.10-11) that I'm having problems with. I don't understand either how the ##z## co-ordinate comes into play: my...
  7. H Smith 94

    Solve for a constant in an equation

    Perhaps you could make use of $$\tanh(x) = \frac{\sinh(x)}{\cosh(x)} = \frac{e^x - e^{-x} }{ e^x + e^{-x} },$$ or $$\mathrm{arctanh}(x) = \frac{1}{2}\,\ln\left|\frac{1+x}{1-x} \right|.$$ These are all available by Googling "Hyperbolic trig identities". Also, you should probably mention what the...
  8. H Smith 94

    Finding the velocity of a wave

    I am currently studying a course on waves, which has a real ambiguity in the lecture notes. Essentially, I don't know how the professor got from equation \ref{eq:surf_x-y} to equations \ref{eq:vel_u} and \ref{eq:vel_w}. I have tried to work backwards to find a method but am not sure of its...
  9. H Smith 94

    Finding a solution to Laplace's equation

    Solution: For anyone reading this who is interested in the solution: Applying the new homogeneous boundary conditions in ##x##: ##\Delta\phi(0,y) = 0 \implies \boxed{F = 0};## ##\Delta\phi(1,y) = 0 \implies \boxed{\kappa = n \pi}## for ##n\in\mathbb{N}##. means that \begin{equation} \chi(x) =...
  10. H Smith 94

    Finding a solution to Laplace's equation

    Oh yes! I hadn't even noticed that! Thank you for pointing this out. This was a typo on my part -- sorry! I also should have the opposite signs on the ##\kappa## for each ##x## and ##y## solution in order to adequately satisfy the solutions ##\chi## and ##\gamma## I gave. Thank you for all...
  11. H Smith 94

    Finding a solution to Laplace's equation

    Right you are! I had that ##e^{\xi} - e^{-\xi} = 2 \cosh{\xi}##—which would imply the only way ##\chi(1)=0## is if ##E = 0## since ##\cosh{x}\not=0## for any ##x##—when instead, ##e^{\xi} - e^{-\xi} = 2 \sinh{\xi} \implies e^{\kappa x} - e^{-\kappa x} = 2 \sinh{\kappa x}##, so \chi(x) = 2E...
  12. H Smith 94

    Finding a solution to Laplace's equation

    Hi! For this step, I used the boundary conditions ##\Delta\phi(0,y) = \Delta\phi(1,y) = 0##, originating from 1 and 2. Was this incorrect?
  13. H Smith 94

    Finding a solution to Laplace's equation

    So here I have Laplace's equation with non-homogeneous, mixed boundary conditions in both x and y. 1. Homework Statement Solve Laplace's equation \begin{equation}\label{eq:Laplace}\nabla^2\phi(x,y)=0\end{equation} for the following boundary conditions: \phi(0, y)=2; \phi(1, y)=0; \phi(x...
  14. H Smith 94

    Engineering Engineer whose true passion is physics

    Hi there! Admittedly, I have little knowledge of what an engineering course is like and little knowledge of what a physics job is like. I am a physicist working (rather unsuccessfully) in an engineering role. I can tell that my physics knowledge and skills could be useful if I could put it in...
  15. H Smith 94

    What physics job do you do and how do you find it?

    Hi, I'm wondering what jobs there are available in the field of physics, outside of academic research. What job do you do and do you enjoy it? Do you feel it uses your skills as a physicist well? I know there are lots of jobs that involve hefty amounts of engineering (I currently do one!)...
Back
Top