Monthly Archives: April 2010

Non-Equilibrium Statistical Mechanics talk

Today I attended a seminar on a Variational approach to Non-Equilibrium Statistical mechanics. (Maximum Caliber) It was quite a popular presentation. The speaker was talking about his new method for calculating small number problems, which are like when you are trying to find an average, so you look at the first case, and see it is one answer. So for that first case all you know is that the first case is one answer.

He briefly gave an example of a single cell about to evolve and choose the left path or the right path. It’s only a little length of the path, but the decision to go left or right makes a very big deal.

It touched on Risk Analysis for stocks too, just like the Barra system I’ve been using at work. If you think of your stocks as a horse race, at first all of the horses are in the gate, then the gate opens and the horses take off running. Some are a little behind and some are a little ahead.

It reminded me of the book I read about Evolution (well really it was on economics, but it was on the evolution of economic systems… I need to find the book again)

There was also talk of Maxwell’s Demon’s.

I was pondering why I seem to be writing more handwritten notes and why the difference between learning by hand and by machine. I tend to not need to think the speech in my head but as I write by hand but by keyboard the words are clearly visible. This same feature exists for writing in code and for writing by hand. But at times when writing by code on keyboards the thought are no longer in English. This is why when I write code by hand it is hard and sometimes when I write physics by computer it is harder. Because for code it goes to pure code when I am translating through a keyboard and for physics it goes to pure symbol when writing by hand.  And as always with any type of writing eventually it is no longer speech and I can transition to pure symbolic calculations. That’s when I’ve learned to do things “In my head”.

Leave a Comment

Filed under Events

Structures

Statics vars allow a var to retain value for multiple declarations, does not reinitialize each time.

Static & extern are auto initialized to 0

Structures (Structure Type)

possible to aggregate components into a single named variables

IE: Bank Account – Account #, balance, interest, name, address

Structure is user defined. You can declare an array of structures

struct account {
long number;
float balance;
float interestRate;
} accnt2, myAccounts[3];
struct account myAccount;

Members can be accessed using structure member operator “.”

myAccount.number = 1248609385;
myAccount.balance = 1004.005;
myAccount.interestRate = 0.18237672;

Can declare a structure and then declare the variables

struct fruit {
char name[15];
int calories;
}
typedef struct fruit fruits;
struct fruit lunch = {“plum”,150}; // order is important
fruits dinner = {.calories=150,.name=”peach”}; // order not important

you can copy structs of the same type to each other dinner = lunch

Leave a Comment

Filed under CSE 130

L’Hospitals Rule – Calculating Limits using Derivatives.

Use this for solving problem cases, where the limit on the right side exists or is +-infinity. These are problem Cases.

This is L’Hospital rule, used for the problem cases above.

This is how to rearrange your limits so you can use L’Hospital’s rule and still find the limit even though it has an indeterminate form. The situations are: Indeterminate quotient, Indeterminate product, Indeterminate difference and indeterminate powers.

Also, a note on derivatives and the chain rule. This is what you do with constants. Including e, which is a constant.

Leave a Comment

Filed under MAT 131

Enumeration Types & Storage Class

Enumeration Types

  • Int Float and double have a large range.
  • Chars are stored using their Interger ASCII values 0 to 255. This only takes up one int byte.
  • Data type specifies a range of values
  • A variable of a specified type can have any value form this range or set.
  • What if values are from a set of non numeric values? IE Days in the week
  • Enumeration means to describe or list or name the values, one by one.
  • Used to name a finite set

enum color {red,blue,green,yellow}

color is the tag name
“enum color” is the type
You can give variables this type, and assign them values from the set you described

enum color c1,c2;
c1 = green

That just declared two variables of type enum color. Say you get bored of typing on enum color all the time. You can define the type using typedef.

typedef int newIntType

That just created a new type of interger variable type called newIntType. Enum stores things as intergers. For example, in the color example, red corresponds to 0, blue to 1 and so on…

enum day{sun,mon,tues,wednes,thurs,fri,sat};
typedef enum day days;
days today = fri;
switch (today) {
case fri:
//And so on….
}

Enums are good for switch cases!

Storage class
Variables have two attributes, type and storage class. Storage class in how and where memory is allocated. There are four types in C. auto(matic), extern, register, static.

Auto – Used for local variables, kept on the stack
Extern – global variables, present until the program stops running, not kept in Stack.
Register – defaults to auto if necessary, kept on the processor chip. Very special and used to improve execution speed, treated as advice only.

Leave a Comment

Filed under CSE 130

Collisions and Inertia

Collisions
Imagine two balls. One elastic and one inelastic. The balls move towards a mass and the elastic one pushes it over. The inelastic ball is unable to push over the mass of wood. This is because it is an inelastic collision and the change in mechanical energy is not conserved. With the elastic collision, energy is conserved and returned to the bouncy ball.

Torque
Torque is Force * Radius. The larger the radius the more force needed to move an object over a distance. m and R are constants. RF (Force times radius) is torque. It is a force that goes in a circle. Torque is a measure of rotational inertia. The Movement of inertia is I=mR2.


  1. Radial Force equals mass times radius times acceleration, using angular acceleration Radial Force equals mass times radius squared times angular acceleration (which is equal to acceleration tangential over Radius)
  2. Magnitude of Torque equals magnitude of radius times magnitude of Force
  3. Torque equals mass times radius squared
  4. Inertia equals torque ie Mass times radius squared.
  5. Angular acceleration equals Torque over mass times radius squared.

    Now if we look at this in terms of Kinetic Energy, and imagine we have a bunch of masses rotating around a center of mass. Changing the center point will change the inertia of the system.

    1. Kinetic energy equals one half inertia times angular velocity squared.
    2. Inertia total equals sum of masses times Radius squared

    Moment of Inertia of a thin stick of length L and a total mass M, rotated about one end.

    So if we take a little mass from the thin stick, and call this little mass dm, which is x distance from the origin and we need to express dm as the running variable, x. We use a ratio of total length to total mass to do this, and then substitute it back into the derivative of dI. So The total inertia when the thin stick is rotated about one end is the sum of all those little dI’s, which is the integral of dI.

    Leave a Comment

    Filed under PHY 125