Jump to content
Dustloop Forums

West Coast Canada IV: "Ah yes, 'Guilty Gear' - we have already dismissed that game!"


Recommended Posts

Posted

well, i would've thought that the way the divergence of a matrix would work is just like ordinary matrix multiplication of a 1x3 row vector with a 3x3 matrix:


[d/dx d/dy d/dz] [p*u_1*u_1 p*u_1*u_2 p*u_1*u_3]

                 [p*u_2*u_1 p*u_2*u_2 p*u_2*u_3]

                 [p*u_3*u_1 p*u_3*u_2 p*u_3*u_3]

But I can tell that you're not looking for a 1x3 row vector as output, so I'm not really sure (except to take the transpose afterwards). How does it work, Gabe?

  • Replies 5.3k
  • Created
  • Last Reply

Top Posters In This Topic

Posted

So in the continuous case it is as you've described, provided that we have functions describing the components of the u vector.

The problem is that in the discrete setting, we have no such functions; we just have an interesting grid that stores the velocities at the grid faces, and the density at the grid center (it's called the MAC grid... look up semi-Lagrangian fluid simulation and you'll find out more about it). So the vector resulting from that multiplication contains terms that look like:

d/dx(p*u_1*u_1) + d/dy(p*u_1*u_2) + d/dz(p*u_1*u_3)

... which I don't really know how to compute properly. At a particular cell, I could tell you what the u_1 velocity is, and I could tell you what the derivative of it is (it would be u_1 of the next cell minus u_1 of this cell divided by the cell edge length), but I don't know what the correct answer to the partial derivative of a product of two vector components is in this setting (e.g. evaluating d/dy(p*u_1*u_2)). I have a few guesses that sound kind of plausible, but I don't know if they're correct.

The best guess I have is this:

Say we're evaluating d/dy(p*u_1*u_2), and due to lousy forum text limitations, that "d/dy" is actually the partial derivative and not the... regular derivative.

p is a constant

u_1 is an orthogonal component, so we do not take the derivative of it and just take its value in the current cell (i.e. treating it like a constant, as we do in partial derivatives)

u_2 is a component in an axis that d/dy actually operates on, so we take the difference of its value at the next grid cell and the current grid cell, divided by the cell edge length

West Coast Canada: your forum thread for graduate studies in applied mathematics.

Posted (edited)

enough math, let's talk algorithms, back me up here clarence

explain to me the master theorem again please i still don't really get it, in specific your definitions of open form and closed forms

in specific looking at example 1 at http://en.wikipedia.org/wiki/Master_theorem#Example i don't quite understand why they take the log in the first step at the end there, is that just to simplify things?

Edited by geogaddi
Posted
So in the continuous case it is as you've described, provided that we have functions describing the components of the u vector.

The problem is that in the discrete setting, we have no such functions; we just have an interesting grid that stores the velocities at the grid faces, and the density at the grid center (it's called the MAC grid... look up semi-Lagrangian fluid simulation and you'll find out more about it). So the vector resulting from that multiplication contains terms that look like:

d/dx(p*u_1*u_1) + d/dy(p*u_1*u_2) + d/dz(p*u_1*u_3)

... which I don't really know how to compute properly. At a particular cell, I could tell you what the u_1 velocity is, and I could tell you what the derivative of it is (it would be u_1 of the next cell minus u_1 of this cell divided by the cell edge length), but I don't know what the correct answer to the partial derivative of a product of two vector components is in this setting (e.g. evaluating d/dy(p*u_1*u_2)). I have a few guesses that sound kind of plausible, but I don't know if they're correct.

The best guess I have is this:

Say we're evaluating d/dy(p*u_1*u_2), and due to lousy forum text limitations, that "d/dy" is actually the partial derivative and not the... regular derivative.

p is a constant

u_1 is an orthogonal component, so we do not take the derivative of it and just take its value in the current cell (i.e. treating it like a constant, as we do in partial derivatives)

u_2 is a component in an axis that d/dy actually operates on, so we take the difference of its value at the next grid cell and the current grid cell, divided by the cell edge length

West Coast Canada: your forum thread for graduate studies in applied mathematics.

what does velocity u depend on? (aside from t) because what you're saying is not correct if we assume that u = ( u_1(x,y,z), u_2(x,y,z), u_3(x,y,z) ). What you're saying implies that u = (u_1(x), u_2(y), u_3(z) ).

Shouldn't you be implementing the product rule:

d/dx(p*u_i*u_j) = p*( du_i/dx*u_j + u_i*du_j/dx)

?

Posted

Hmmm you do have a point there. It doesn't make sense for the components of the velocities of the velocity field to only make use of a single coordinate. Me "not applying" the product rule was a result of thinking that (for example) whatever u_j is a function of, if it isn't also a function of x, then taking the partial derivative on u_i*u_j would see u_j treated as a constant term.

Of course, I'm still not sure how to do d/dx(u_j) in my discrete environment.

Posted (edited)

hmm, well, wouldn't it be the same idea, just along a different axis?

btw let's define D_x, D_y, D_z to be our x, y, z finite difference operations. if it's not too confusing, i'll write u_i{k,l,m} for the i-th component of velocity u at cell {k,l,m}. (i'm just assuming that your cells are indexed by three dummy variables: k <-> x-axis; l <-> y-axis; m <-> z-axis; but if that's wrong let me know.)

so like you said:

D_x(u_1{k,l,m}) = ( u_1{k+1,l,m} - u_1{k,l,m} )/cell_length

so then similarly, i was thinking that:

D_y(u_1{k,l,m}) = ( u_1{k,l+1,m} - u_1{k,l,m} )/cell_length

and

D_z(u_1{k,l,m}) = ( u_1{k,l,m+1} - u_1{k,l,m} )/cell_length

Edited by rtl42
Posted

Man fuck math. Why can't any of you be in Bio so that we can discuss the significance of the Krebs Cycle and it's applications with regards to increasing VO2 Max and aerobic endurance.

Posted

M7.1 just happened 10 minutes, i'm at university now and it was shaking for about 2 or 3 minutes. there are some aftershocks now, i think, cuz the building keeps shaking once every couple of minutes or so.

Posted
Man fuck math. Why can't any of you be in Bio so that we can discuss the significance of the Krebs Cycle and it's applications with regards to increasing VO2 Max and aerobic endurance.

Yes, if ONLY SOME OF US WERE IN BIOLOGY.

Posted

I met the daughter of Krebs at a science fair in 2001. Since she was a judge at the science fair, I asked her straight up, "Are you related to the man who discovered the Krebs Cycle".

Posted
M7.1 just happened 10 minutes, i'm at university now and it was shaking for about 2 or 3 minutes. there are some aftershocks now, i think, cuz the building keeps shaking once every couple of minutes or so.

good to hear that you're ok!

How many more quakes are projected to happen over this month? It sounds like crazy times over there.

Posted

N-hit combo

Might and Magic Clash of Heroes is this really great NDS game that's.... really great. It's a puzzle combat game that features really interesting units and sides (though the elves seem a little too good...), makes good use of the DS, and features incredibly charming sprite work. In fact, you should give it a spin and see for yourselves why things like the reviving item is crap for every faction except the elves where it is total BS.

This week, the HD version of it is getting released on PSN and XBLA, and it will contain the entire original game with HD'd sprites/UI, online play, rebalancing and new stuff, etc.

The problem for me is that the non-HD sprites are terribly terribly charming, and some of the HD sprites just look weak in comparison.

HD:

http://bulk.destructoid.com/ul/197667-preview-might-magic-clash-of-heroes-hd/MMCH_XBLA_Haven_Battle1-620x.jpg

See the dude with the big sword raised? That's the sword master.

DS-D:

http://www.spriters-resource.com/ds/mightandmagicclashofheroes/units.png

The bigass armored knight on the 5th row of the rightmost columns is the sword master on the DS.

The 2D work on the menus and everything is excellent, though there are definitely places where it'd be good to be able to get more information (which the HD version fixes).

But since it will feature all kinds of new tweaks and things, I may have to play it anyway.

Posted
enough math, let's talk algorithms, back me up here clarence

explain to me the master theorem again please i still don't really get it, in specific your definitions of open form and closed forms

in specific looking at example 1 at http://en.wikipedia.org/wiki/Master_theorem#Example i don't quite understand why they take the log in the first step at the end there, is that just to simplify things?

The Master theorem lets you figure out the runtime Big-O of a given algorithm that is recursive in nature, without having to figure out the strictly closed form of the algorithm's runtime. Here's a long-winded breakdown.

For example, let's say you're sorting N items in a list. A lot of sorts will break the big list into two lists, and sort those two smaller lists by breaking them into two further lists first, etc. etc. This is an example of a recursive sort.

That means that the time it takes to sort N items is (roughly) equivalent to the time it takes to sort two smaller lists of (N/2) items (since you break the list into two recursively).

Therefore, if T(n) is the function that calculates how long it takes to sort N items, then

T(n) = 2 * (T(n/2)) + some extra work combining the smaller lists

Generally, recursive algos are divide-and-conquer; they break the problem into a number of smaller problems and re-calculate everything at the end. Intuitively then, these recursive algos can be expressed in recursive (open?) form as

T(n) = A * T(n/B) + C

Where B represents the number of smaller sub-problems (dividing by B), and A and C are the "extra work" that goes on on the side.

Note that in the above equation, there is a T(x) term on both sides of the equation. This is a recursive way of expressing the equation, meaning that its definition is essentially self-referential. Just by looking at it, you can't get a clear big-O because it's not clear how much runtime the self-referential T(n/B) term on the right takes.

Expressing T(n) in a non-self-referential form is known as finding the "closed" form of the formula.

For example, consider recursion in the formula T(n) = 1 + 2 + 3 + 4 .. + n

Its recursive form is T(n) = T(n-1) + n [in other words, add N to the sum of the first N-1 terms in the sequence]

But its closed form (without a T(x) on the right) is T(n) = n(n+1)/2

Note that calculating the recursive form's Big-O isn't clear at all, but if you look at the closed form, the Big-O is obviously n^2.

Now if you could put any recursive function into a closed form like that you could pretty easily determine its Big-O. But a lot of recursive functions aren't easily expressible in closed form, so it's hard to calculate their Big-O. So look again at

T(n) = A * T(n/B) + C

What the master theorem tells you is that if you can express a recursive formula like the above formula, then you can calculate the Big-O without needing to get the closed form. The Master Theorem has a couple of specific cases, such as the logarithm / n^2 case you mentioned above. This means that the n/B, C and A terms all have to be expressed in the proper format (such as the C term having an N^2, and the final big-O answer being expressed in terms of a log of the other terms).

Posted

yeah i'm still ok, although there've been aftershocks all day, fairly often. even though there was a bigger earthquake (M7.1 according to Japanese Meteorological Agency, 6.6 elsewhere?) just a few days ago, the one yesterday was closer to Tokyo so it felt bigger here. yesterday evening and today feel the most like 1 month ago, when there was the M9 quake with tons of aftershocks afterwards.

i haven't heard how many more will occur in the next while.

this graph is a bit outdated, but since i can't find any newer/updated versions, it'll have to do:

http://www.rbbtoday.com/imgs/zoom/130421.jpg

<<begin translation>>

Title: Comparative Number of Aftershocks of "Principal" Earthquakes that Occurred in the Ocean (Includes the Original Earthquake)

( > M5.0)

As of 2011/03/23 12:00 [JST, Japanese Standard Time]

[Principal means the "first"/main earthquake in a sequence; this is meant to try to show how many aftershocks result from a given strong earthquake, so it doesn't measure other earthquakes of M5.0+ that are deemed unrelated.]

Y-axis: Total/Cumulative Count [units: absolute number]

X-axis: Number of Days After the Original Earthquake [units: days]

Red: 2011 Northeast Japan Pacific Offing Earthquake (M9.0)

Black: 1994 Hokkaidou East Offing Earthquake (M8.2)

Light blue: 1952 Tookatsu Offing Earthquake (M8.2)

Purple: 1933 Sanriku Earthquake (M8.1)

Dark blue: 2003 Tookatsu Offing Earthquake (M8.2)

Green: 1994 Sanriku Far Offing Earthquake (M7.6)

[Translation note: If "offing" doesn't make sense, just replace it with "coast".]

Inset Table

2011 Northeast Japan Pacific Offing Earthquake Daily Earthquake Count (Excludes Original Earthquake)

[it's a bit blurry but there's no Japanese, so you should be able to read it for yourself.]

Rightmost Column Heading: As of the 12:00 on the 23rd

[Footnotes]

* Includes the original earthquake

* This document is based on values provided for news prompts/flashes, and actual measured values may be updated upon re-examination.

Made by the JMA [Japan Meteorological Agency]

<<end translation>>

Personally, I find it interesting that (relative to measurement reliability/access) the number of aftershocks looks like it can be reliably interpreted as primarily a function of the magnitude of the original earthquake, as I'm not sure that's necessarily true a priori. Regardless, the point I want to make is that it looks consistently logarithmic across several different earthquakes.

Then there's this other image I found on Google images, which is actually from the NIED (National Research Institute for Earth Science and Disaster Prevention):

http://www.bosai.go.jp/e/index.html

Image:

http://www.hinet.bosai.go.jp/about_earthquake/PNG/fig7.2.png

This image deals with measurements of aftershocks from the Great Hanshin Earthquake in 1995, which measured M6.8 on the USGS's moment magnitude scale, and Shindo 7.3 on the JMA's magnitude scale. The image on the left shows Daily Earthquake Count, from 1995/1/17 to 1995/4/30; no cut-off for aftershocks of less than M5.0 is indicated, so the graphs can't be compared directly with the earlier graph I showed. (This is in contrast to the first image I showed, which is a graph of cumulative count; i.e. the blue chart is "# of aftershocks as a function of time", the white chart is "integral of # of aftershocks as a function of time".)

The image on the right, then, "logarithmicizes" both axes, and shows Daily Earthquake Count from 1995/1/17 to 1998/1/17 (3 full years), and we see it behaves roughly linearly.

(cont.)

Posted

so after some more searching, i was led back to the NIED's page and found some very recent info about the earthquake and its aftershocks:

http://www.bosai.go.jp/e/international/110318/110318.html

-> Recent hypocenter distribution of Japan:

http://www.hinet.bosai.go.jp/hypomap/

Map of the Distribution of Earthquake Epicentres in the last 30 days

[The size of the circles corresponds to the quake's shindo, and colour corresponds to the epicentre's depth. See the bottom of the map for the values.]

...I love how basically all of Japan is this giant earthquake zone.

If you're interested/can read Japanese, there is a set of pull-down menus in the top-right corner that allows you to narrow your search to different regions of Japan, as well as restrict the epicentre measurement period to within the past week or past day.

The Japanese version, with more detailed explanation, is here:

http://www.hinet.bosai.go.jp/topics/off-tohoku110311/

I'm still not sure how many there'll be, and how many big ones, but it seems almost certain that this'll continue for at least a few more months, and I would be surprised if we don't get any more big aftershocks like in the past few days.

Posted

hmm, we've had several M5-6 aftershocks today. (there was a M6.3 just a few minutes ago.) i was gonna go to school and then go to the Immigration Branch Office today, but I have to go by train, and with all these aftershocks, i figure it's best not to take the train cuz i might get stuck in the train if they stop for a while.

Posted

Ignatieff loses his temper against Layton... "At least we get into Government. You're always in Opposition."

Posted

Clarence didn't go into the part about the Master Theorem where blonde-haired, blue-eyed algorithms perform better than others.

End of latest Ippo chapter:

"Forecast for the first round: BLOOD"

Haven't had such a hype forecast since Clubber Lang.

I have to wonder: a lot of buildings are built to withstand earthquake magnitude X, but I wonder how they take into account the effect of being hit with a succession of earthquakes given that one of the earthquakes in the succession is powerful enough to significantly compromise the structure. From historical and empirical data, it's evident than any really big earthquake will be followed with aftershock/successor quakes. While this might not be such a big deal for residential buildings (since everybody is going to GTFO), for buildings that need to stay standing for whatever reason (e.g. nuclear power reactors), I wonder how the planning for this could work.

Posted

are you serious, did he actually say that? because that would be hilarious XD

so what's up guys, what's everyone doing these days? you guys were posting like mad about MvC3 not too long ago, and then things seem to have quietened down over there. how are school/work schedules?

gabe, did you end up figuring out how to implement that component of the equation? i'm just curious to hear how that turned out.

Posted
Ignatieff loses his temper against Layton... "At least we get into Government. You're always in Opposition."

If Layton went into debates with a big top hat complete with matching coat, and discovered the truth behind his opponent's lies by solving matchstick puzzles and pointing his finger, maybe he'd be more popular.

Posted
Ignatieff loses his temper against Layton... "At least we get into Government. You're always in Opposition."

"Haha, you mad bro? Why so salty?"

"Fucken conservatives cheapest characters in the game. Fucking gay shit"

Stefan: We're still playing marvel, but we I think everyone has just been busy. Clarence is down in the states a lot. Mike just started his new job. It's exam season for me. It's been going pretty good though. How are things on your end? All these quakes, I don't even know what's up anymore. Also Joe made an amusing comment today while working out. "I don't even need to watch the news anymore for when earthquakes hit, just look at the Nikkei drop like a rock"

Posted

OH shiiiit, I think that FF concert is about the same time as my next weeklong vacation... I'd better double check. If it is, count me in lol

Posted
Nikkei drop like a rock

lolol, ouch. maybe it's surprising to hear, but around where i live, things really haven't changed a whole lot. i mentioned before that my graduation ceremony, as well as my entrance ceremony, got cancelled, but a few days ago, TEPCO announced that they weren't planning any more scheduled blackouts, so school is back on schedule. most of the trains around here are almost back to normal (in terms of capacity and frequency), too.

oh right, so classes started here on Monday (April is the beginning of the school year), but there are only 3 classes this term that PhD students can register for credit, and none of them are related to my interests/research, so i'm not gonna take any classes but i'll do seminars with my "kouhai" (from my supervisor's group of students) instead. one of the other geometry professors and i have been doing a Java-based "geometry visualization" seminar for the past year or so, and we're thinking of continuing that. my supervisor also wants me to turn my master's thesis into a research paper by applying the ideas to some different case studies, so that's basically how things are on my end, in terms of school.

study hard, and good luck on your exams Peter! where are you at with school, by the way?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Upcoming Events

    No upcoming events found
×
×
  • Create New...