New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

Be part of our community, it's free to join!

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here


by: Humberto Romaguera II


Marketplace > University of Central Florida > Physics 2 > PHZ 3151 > COMPUTER METHODS IN PHYSICS
Humberto Romaguera II
University of Central Florida
GPA 3.65


Almost Ready


These notes were just uploaded, and will be ready to view shortly.

Purchase these notes here, or revisit this page.

Either way, we'll remind you when they're ready :)

Preview These Notes for FREE

Get a free preview of these Notes, just enter your email below.

Unlock Preview
Unlock Preview

Preview these materials now for free

Why put in your email? Get access to more of this material and other relevant free materials for your school

View Preview

About this Document

Class Notes
25 ?




Popular in Course

Popular in Physics 2

This 12 page Class Notes was uploaded by Humberto Romaguera II on Thursday October 22, 2015. The Class Notes belongs to PHZ 3151 at University of Central Florida taught by Staff in Fall. Since its upload, it has received 15 views. For similar materials see /class/227504/phz-3151-university-of-central-florida in Physics 2 at University of Central Florida.

Similar to PHZ 3151 at University of Central Florida

Popular in Physics 2




Report this Material


What is Karma?


Karma is the currency of StudySoup.

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 10/22/15
x2 Fortran 90 a little more concise approach for arrays IMPLICIT NONE INTEGER PARAMETER PreC14SELECTEDREALKND14 INTEGER jnt INTEGER PARAMETER jmax1000 ntmax1000 COMPLEXKNDPrec14 DIMENSIONOjmaX1 abCChi COMPLEXKNDPrec14 DIMENSIONOjmaX1 psi COMPLEXKNDPrec14 arai REALKINDPrec14 PARAMETER REALKINDPrec14 PARAMETER REALKINDPrec14 PARAMETER REALKINDPrec14 PARAMETER REALKINDPrec14 PARAMETER REALKINDPrec14 xsspipi L2000d0sigma30d0 x0L60d0k01414213562 dxLjmax dt01d0 alphadtldx2 For convenience define ar1 aii ai00d010d0 isqrt1 imaginary ar10d000d0 1 real Then to get complex arrays populated we can take the real part ar and the imaginary part ai Some useful things then if psij is complex psir realpsij Real part of psij psii imagpsij Imaginary part of psij mag conjgpsijpsij conjg give complex conjugate Here psir psii are real variables and mag is complex However mag should in fact have zero imaginary component Tridag solves the linear equations does all the hard work call tridagabcpsichijmax abcpsi are the inputs chi is what is returned by tridag after solving equations jmax is the length of the input arrays SUBROUTINE TRIDAGABCRUN From numerical recipes but modified for complex numbers linear equations Tridagf subroutine Solves the matrix equation Aur Here A is a tridiagonal matrix and u and r are column vectors We assume we can find ALU Here L is lower triangular and U is upper triangular So we solve LUur or Lyr where yUu Good description online in Numerical Recipes I M quot quot II 39 HI I i 39I 39II quot quot quot 1 ii 7 I 39 39I Ii I if It I l I in 39 39 I I39I 39l I l 39 39 III II in I n u L L n Forward substitution 339 N l l Backward substitution Assumes 3 1 A final note on declarations precision etc To make a single precision real number we declare REAL X Y Z These are accurate to 7 significant digits usually stored in 32 bits Single precision is the default If we want double precision REAL8 X Y Z DOUBLE PRECISION A B C INTEGER PARAMETER Prec14 SELECTEDREALKND14 REALKND Prec14 D E F Each of these gives 14 digit precision in 64 bits What physics to check We should have that the magnitude squared of the wave function Integrated over are space 1 at all times probability conservatior We can check this numerically 39339 I Enidquotiian39f IicltiT 1 l 3939 Also we can estimate the group velocity of the wave packet and compare with our calculation next time Remember it is critical that we check the physics that we know must apply eg conservation laws to verify that our code is obeying at least the minimal physical requirements Prnhahxlxly The probability is conserved Spreadingre ecting of packet amplitude Initial wave packet real and imaginary parts Spreadingre ecting of packet Rpltd Final packet real and imaginary parts while re ecting 1000 steps with dt01 what is group velocity Group velocity used k0 sqrt20 Different from project In units we are using s k0 So in 100 time units the center of the wave packet should move 100sqrt20 or 141 Just guessing from figure it starts and L6 and is at about L with L200 in final frame so this is about s167 I could be more accurate for shorter times packet spreading and reflecting makes it hard to be accurate Final packet real and imaginary parts while reflecting 1000 steps with dt01 what is group velocity


Buy Material

Are you sure you want to buy this material for

25 Karma

Buy Material

BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.


You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Steve Martinelli UC Los Angeles

"There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

Janice Dongeun University of Washington

"I used the money I made selling my notes & study guides to pay for spring break in Olympia, Washington...which was Sweet!"

Bentley McCaw University of Florida

"I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"

Parker Thompson 500 Startups

"It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

Become an Elite Notetaker and start selling your notes online!

Refund Policy


All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email


StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here:

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.