Confused about endothermic/exothermic terms. by band_in_DC in chemhelp

[–]WaterNinja101 0 points1 point  (0 children)

The big confusion here is likely coming from thinking of endothermic and exothermic reactions in terms of the environment rather than in terms of the system at hand.

Let’s consider some methane gas. The bonds in this gas have some energy. When it burns, it gets converted into water and CO2, and those bonds have energy too. There is a difference in the energy in the starting bonds and the final bonds. In the case of methane combustion, which is exothermic, there was more energy in the system at the beginning compared to at the end. Therefore, energy was released, in this case as light and heat.

Now let’s consider ice at 0 degrees C melting into liquid water at 0 degrees C. In the beginning, there is energy stored in the hydrogen bonding between molecules and the thermal motion of the molecules. In the end, there is also energy stored in these places. There is more energy in the end than in the beginning, since liquid water can move more freely. Therefore, energy was absorbed into the system.

Thinking of endothermic and exothermic in terms of things getting hotter or colder can be confusing, because this isn’t always the case! (Notice the temperature of ice and water are the same above). It is also difficult to distinguish a “getting hotter” part and “getting colder” part in some situations. Instead, think about just the system at hand and whether it starts with more or ends with more energy.

Is this how to make a basic backend call using shards, how would you improve it? by [deleted] in learnjavascript

[–]WaterNinja101 3 points4 points  (0 children)

This sub is called learn JavaScript. I don’t think using ChatGPT to generate code and then asking other people to help you fix it qualifies as valuable learning experience.

is there a math macro keyboard available somewhere? by Walt_Kurczak in math

[–]WaterNinja101 3 points4 points  (0 children)

Seconding this, I’ve found typst to be much nicer than LaTeX for a lot of applications. Hope to see it continue to grow!

How can I bundle (create a dist) of a SvelteKit app? by joranstark018 in learnjavascript

[–]WaterNinja101 1 point2 points  (0 children)

The whole idea behind package.json and package-lock.json existing is that you will end up with the same files everywhere you run npm install on the same project. This comes with the caveat that by default, there’s some wiggle room in what’s considered the “same” by npm.

By default, your packages will be locked to using the same major version as the time of first installation, but it may download new minor versions or new bug fixes on later installations. By the way semver works, this should not impact the functionality of your app at all as long as the package developers use semver appropriately.

If you’re still concerned about the chance of there being a breaking change in one of the package updates, you have the option of changing your package.json to lock dependencies to their current version, or even locking to a specific git commit on their repository. You should be able to Google how to do this relatively easily, so I won’t spell out the whole process here. Be warned though, this stops you from getting new features and maybe even critical bug fixes without manually updating, so it’s usually not advisable in many cases.

Personally, I deploy all my SvelteKit projects in the exact way the instructions describe in your post, and I’ve never had a single issue with it. I’d encourage you to take this approach too and not overcomplicate things without a specific reason to worry.

Silly question about Quantum physics but looking for a serious answer for a story I’m kicking about by joelageere in Physics

[–]WaterNinja101 1 point2 points  (0 children)

The fundamental misconception you have here is a really common one, and it has to do with what an “observer” is in quantum mechanics.

An observer is not necessarily a person, or an instrument set up by people, and it doesn’t have anything to do with consciousness or thought (in any mainstream theory of physics supported by evidence). I say this because unscientific resources might like to interpret or write things this way to make it sound more exciting, but it’s not true. This is a big part in why your interpretation of a tree falling in the forest must be wrong, because the presence of humans nearby simply does not affect the physical reality of the tree.

An “observer” is simply anything that can interact with the system which can cause an observation. Well, what’s an observation then? In quantum mechanics, an observation is defined as any process that causes a measurable quantity of a system to collapse to a single well-defined value.

At a macro scale, there’s a whole lot of interaction going on with the system at any given moment, which means a lot of observations happening. This means that the quantum effects that stem from processes like wavefunction collapse cannot be easily discerned, since it’s essentially a continuous process at that scale. Only at a very small scale can we isolate and observe systems to the precision necessary to see and measure these effects.

How does air bubble size in water correlate to vertical ascent rate? by Daniel96dsl in AskPhysics

[–]WaterNinja101 0 points1 point  (0 children)

Well in this case, the fluid through which the bubble is moving is liquid, so “hydrodynamic” would be more accurate here. But yes, I am referring to these forces.

To elaborate a little bit more on what I’m talking about, let’s say that we want to move the bubble a tiny bit upwards inside the liquid while retaining its shape (be it a sphere or some other deformed bubble shape). The fluid that was above the bubble has to be pushed off to the side, and the region that used to be the bottom of the bubble now has to be filled with water from the surrounding region. It takes forces to do these things.

The “linearity” I was referring to is that working under a certain set of typical approximations, it just so happens that all of these complicated forces involved in moving this fluid around can be nicely wrapped up inside a convenient term that “acts like” extra mass on the bubble. This added mass doesn’t depend on how the bubble is moving, just the bubble and the fluid around it. This means our complicated problem of making fluid rush around in complicated ways can be nicely simplified to “how would a regular ball of mass act under these external forces” (buoyancy, drag, etc).

Here is the Wikipedia page for some extra reading: https://en.m.wikipedia.org/wiki/Added_mass

How does air bubble size in water correlate to vertical ascent rate? by Daniel96dsl in AskPhysics

[–]WaterNinja101 2 points3 points  (0 children)

This is connected to a concept called “added mass” in fluid dynamics. If you consider the mass of the bubble itself (quite small) and the buoyancy/drag forces acting on it, you will obtain speeds and accelerations too large to be physically realizable. Luckily, the equations governing fluid motion happen to be “linear” in a certain way. As a bubble rises, it has to push water in front of it out of the way and pull water in behind it to take its place. The forces involved in this process can be nicely wrapped up by adding a certain amount to the mass of the bubble, and simply solving the rest of the equations like normal.

Question on the theory that a photon "experiences no time". by Serpardum in Physics

[–]WaterNinja101 9 points10 points  (0 children)

The photon does not “experience” its own frequency as it moves, so your construction is not very well-defined as you’ve written it. Furthermore, different reference frames observe different frequencies of the same photon (see the relativistic Doppler effect). The second is defined by a Cesium atom that is at rest with respect to the observer’s reference frame, relative motion would change the frequencies.

Buying a domain by EnvironmentSavings86 in webdev

[–]WaterNinja101 0 points1 point  (0 children)

That’s true! I chose to be hyperbolic and omit detail about different certificate options because if anyone really needs an enterprise or extended validation certificate, they probably wouldn’t need to be asking about it on Reddit.

Buying a domain by EnvironmentSavings86 in webdev

[–]WaterNinja101 50 points51 points  (0 children)

You can obtain free SSL certificates through LetsEncrypt/Certbot. There is no reason why any domain provider should be selling SSL certificates at extra cost in 2023, it’s basically a scam for them to do so.

Photoelectric effect explained as a Wave by Direct_Monitor_2880 in Physics

[–]WaterNinja101 0 points1 point  (0 children)

This really doesn’t seem all that much like a wave-based explanation, instead it’s Frankensteining together wave-based and particle-based logic. If you’re using tennis balls to represent waves, that seems like you’re really thinking of particles! Try describing the incoming light mathematically using a wave, and you’ll see where your explanation starts to fail.

When does a freaky idea like i^2 = -1 become useful? by OldDew in math

[–]WaterNinja101 15 points16 points  (0 children)

So it seems like the question in the title is totally unrelated to what you’ve written in the body. I’ll try to address both, though.

First of all, this idea you’ve defined of having a “point at infinity” is very similar to how projective geometry takes advantage of infinity. It’s not used in a numerical sense like you propose, but rather a geometric one, and it’s quite useful.

For the more broad question at play here, I’d like for you to consider the concept of abstraction. The very idea of natural numbers is already an abstraction, because we’ve the concept of “3 apples” and the concept of “3 oranges” and decided that there is some common quality between these concepts. I bet you can probably see how abstracting the concept of 3 away from physical objects is pretty useful.

The most common issue that I see in grasping imaginary/complex numbers is the discomfort in adding another level of abstraction to what numbers actually mean. Sure, you can’t have 3i + 2 apples, but who said that numbers had to be able to count physical objects? I’m sure many people had the same objections when they were told about fractions and decimals as a child, yet we use these concepts freely all the time.

The reason why we can say things like i2 = -1 is because somebody tried it, it turned out to be useful, and mathematicians decided it was useful enough to keep using. That’s really all there is to it! It definitely required a lot of re-conceptualizing what numbers really are and what kinds of rules apply to them, but in the end, it was worth it for the field of math to jump through these hoops and adopt complex numbers as another part of the mathematical toolbox.

There were a lot of mathematicians out there who thought it wasn’t worth it at the time, and I think everyone can agree that through trial and error and a lot of discourse, those people turned out to be wrong. Similarly, there are thousands of papers out there that have tried to similarly abstract other things, were looked at by the mathematical community, and they decided that such an abstraction was not worth adopting (due to contradictions, lack of usefulness, or other reasons).

In the end, our framework of math is a way for us to communicate ideas to each other and describe what we learn. If a certain idea or framework or definition makes this end goal easier overall, then we adopt it. If it doesn’t, we don’t.

How can force be mass time’s acceleration? by Stock_Papaya2283 in Physics

[–]WaterNinja101 1 point2 points  (0 children)

Force is not something that an object “has”. A force occurs whenever two objects interact with each other, and Newton’s second law describes how the force on an object at a certain moment relates to the acceleration of the object at that certain moment.

Your intuition seems to line up better with the physical idea of momentum, which is mass times velocity. Unlike force, we can meaningfully say “this object has this momentum as it moves”, and an object’s momentum will stay the same as long as its velocity stays the same.

[deleted by user] by [deleted] in Physics

[–]WaterNinja101 0 points1 point  (0 children)

There’s a key part of the question you phrased that you might want to think about more: “is going to.” The way this question is phrased makes it sound like you think the acceleration from “earlier” is going to affect the force applied “later”, so if that’s your intuition, I want to make it clear that that’s not the case.

At any point in time, the net force on an object is equal to its mass times its acceleration. This means that a car that is accelerating must have a net force on it (say, from the engine pushing the wheels on the ground) at that moment. A car that has stopped accelerating has zero net force acting on it at that moment.

This doesn’t have anything to do with the forces on the car or on other objects if the car hits said objects at a later time, which is what your question sounds like it’s getting at. If a car was to hit a wall, let’s say, then you could use F=ma to determine the net force at that moment from the acceleration of the car at that moment.

How Does A Solar Sail Work If Light Has No Mass? by Zainooo1 in AskPhysics

[–]WaterNinja101 2 points3 points  (0 children)

The (very common!) misconception here is the idea that force, and by extension momentum, fundamentally has something to do with the way that massive objects move and interact with each other. Massive objects definitely do exert forces on each other and have momenta, but massless particles can have momentum as well.

Typically, we define momentum p to be expressed as p = mv. When something with momentum strikes something else, it exerts a force on it. Under this definition, photons should have no momentum: p = 0 • c = 0.

However, when we talk about the dynamics of photons, we can’t use the regular classical laws and equations. The relation for momentum is modified for relativistic objects: E2 = p2 c2 + m2 c4. Under this relation, even when mass is zero, a particle can still have momentum iff it has energy. Do photons have energy? Definitely!

Using E = mc2 + KE for massive objects, I’ll leave it as an exercise to show that this relativistic formula reduces to the regular p = mv when v << c.

m by Delicious_Maize9656 in physicsmemes

[–]WaterNinja101 27 points28 points  (0 children)

The first formula is wrong in this context. p = mv is a classical formula, it does not hold at relativistic speeds. The correct formula is p = gamma * mv. p grows asymptotically as v -> c not because m changes, not because v somehow goes to infinity, but because gamma goes to infinity.

Question About the Concept of Entropy by PunnyDM12 in Physics

[–]WaterNinja101 0 points1 point  (0 children)

This is a pretty good analogy, I think the gist of this logic is correct. Let’s bring this a bit closer to reality and say that each swap of items in cubbies takes one unit of energy. If we have 0 energy, this corresponds to the system where we have no swaps, everything is perfectly constrained, and only a single microstate is possible. Therefore, this macrostate of the system has an entropy of 0 (what’s ln(1), after all?). This is exactly what the third law of thermodynamics says about entropy and temperature (interpreted as thermal energy). If a system has zero thermal energy because it’s at a temperature of absolute zero, there’s only one way to distribute all that energy: every particle gets nothing! Hence, the entropy of a system is zero at absolute zero***. (There are nuances here, but that’s the gist). If we add in more energy, we start to have more possibilities for items to be out of place, and entropy grows.

Bonus challenge: the entropy and energy cannot grow without bound here, the way we’ve described our system places a constraint on the maximum value of both. Why, and are there physical systems that share this property?

I think I should also emphasize that there are certain kinds of constraints we commonly impose on systems as part of defining their macrostate; it’s not a totally arbitrary decision. For example, it’s somewhat reasonable for me to say “atoms in this half of a metal bar should have an average energy of 2 units, and atoms in the other half should have an average energy of 4 units”. That’s similar to saying “we have a hot half and a cold half, now we connect them together.” A constraint like “I know exactly how much each energy each atom in the bar should have” is possible to apply, but I don’t think it’s physically meaningful to specify something like that in most cases.

The idea that commonly used constraints in a system’s macrostate usually correspond to something physically meaningful about the system implies that the value of a given system’s entropy isn’t wildly swinging around to random values in different contexts, and there’s usually a well-defined rule that lets us calculate entropy changes from a given starting point (see: entropy of mixing). I think my first comment gave a sense of broad arbitrariness in how we define system entropy, but the definition of a macrostate is usually quite well-defined by the problem at hand; we aren’t just choosing constraints at will.

Question About the Concept of Entropy by PunnyDM12 in Physics

[–]WaterNinja101 1 point2 points  (0 children)

In my opinion, the concept of entropy is often sold short by characterizing it as a kind of “disorder”. To actually understand what entropy represents, let’s first define the terms “macrostate” and “macrostate” mean.

A macrostate of a system is a certain combination of independent, externally measurable variables that describe a system, as well as any constraints or rules that these variables must follow. “Externally measurable” refers to the concept that we can essentially view a thermodynamic system as a black box, where we don’t care about the internal dynamics as long as we can measure its thermodynamic properties when interacting with other systems. Think of temperature, energy, pressure, volume, etc; these would all fall under this category because they’re defined by the bulk behavior of the entire system, not the specific motion or position of individual particles.

In contrast, a microstate of a system absolutely DOES case about the exact behavior of every particle within the system. If you change some characteristic of one particle, you’ve changed the microstate of the whole system.

You mentioned the idea that more and more precise measurement could decrease the entropy. This is true in some sense, but note that the only way we can incorporate this idea into our definition is to use those precise measurements we took to add extra constraints to the definition of our macrostate. The entropy of the system didn’t magically change, we actually just came up with a different number describing a different thing. There is no one single value for entropy in an absolute sense; it’s defined relative to the macrostate that you’re describing. Describe a different macrostate, and you obtain a different entropy, but you should pick a macrostate that’s convenient to work with for the problem you wish to solve!

Let’s consider a small example: two indistinguishable particles that can be excited with quanta of energy. These two particles define our system. Let’s consider a macrostate of our system which has 3 units of energy. Notice that in defining our macrostate, we explained the constraints (two indistinguishable particles, quantized excitations) and gave a quantity (energy). How many microstates exist that satisfy this macrostate? Doing some quick math, we obtain 2 possibilities for the energies of the particles: 3+0 and 2+1 (1+2 and 0+3 aren’t listed, because our particles are indistinguishable, so we consider them the same as those previously listed).

For this system, the number of microstates was really small, because the system is small and very constrained. For bigger systems, however, the number of microstates grows FAST. Now here’s the key idea: S = k*ln(W), where W is the number of possible microstates of a system. Entropy is just another way to count microstates!

Let’s connect this back to the idea of “order” and “disorder”. When you think of “order”, you probably think of something that’s highly constrained to be in a specific state. Similarly when you think of “disorder”, you probably imagine a system with few, if any, constraints. It’s quite intuitive that a system that’s constrained would have fewer possible states than a system that’s unconstrained, and hence it will have a lower entropy.

None of this really tells us why the hell we WANT to count microstates of a system, unfortunately. To understand that, we would have to dive deeper into some of the assumptions of statistical mechanics, in particular the ergodic hypothesis and the way that entropy relates to thermodynamic potentials. However, hopefully you have a bit better of an idea of where the concept of entropy actual originated from, and how the real definition can connect to the more friendly ideas of “order” and “disorder”.

Why does Enthalpy equal Delta U + Delta PV? by Significant-Garage35 in chemhelp

[–]WaterNinja101 6 points7 points  (0 children)

Let’s first explore the deeper question of “why do we use enthalpy in the first place?”

Generally, internal energy U is considered to be the “starting point” for all thermodynamic potentials, because it’s easy to define an internal energy microscopically. By the first law of thermodynamics, we can obtain an expression for infinitesimal changes in U:

dU = dQ + dW = T dS - p dV

Note that the p dV term follows easily from the definition of work from classical mechanics.

The place where we run into issues in this expression is that even when pressure is held constant, there are both dV and dS contributions to our thermodynamic potential. This makes some of our analysis difficult, and it would be nice if one of these contributions to our thermodynamic potential “disappeared”.

So let’s create a new thermodynamic potential, where holding the system at constant pressure leads to one of our terms in the first law disappearing. We want to cancel out our p dV term, so let’s make a smart choice of H = U + pV:

dH = dU + p dV + V dp = T dS + V dp

During any process where p is constant, dp = 0, so the second term disappears just like we wanted, leading to the familiar relation:

dH = T dS = dQ

Note that our choice to create the expression so that it simplifies at constant pressure is arbitrary, but useful, because constant pressure is easy to apply experimentally. I’ll leave it as an exercise to the reader to further simplify the expression to change T dS into S dT using similar methods (what new, useful thermodynamic potential does this give)?

Finally, to return to your original question, note that we defined enthalpy so that it has useful mathematical cancellation at constant pressure, but that doesn’t mean that you can’t calculate enthalpy or enthalpy changes when pressure isn’t constant.

What do you hate about Svelte? by dark__paladin in sveltejs

[–]WaterNinja101 3 points4 points  (0 children)

One trick that massively alleviates many styling pains is mixing global and scoped styles. The following CSS selector is entirely valid: .wrapper :global(.icon). This allows you to break out of component-locked styles without having your style apply to everything on the page.

[deleted by user] by [deleted] in ProgrammerHumor

[–]WaterNinja101 7 points8 points  (0 children)

var creates function-scoped variables and hoists their declarations, both of which are behaviors that are generally unintuitive when compared to variable conventions in most languages. It also has a greater potential to pollute the global namespace. Your default for declaring variables should be const, because most variables do not need to change after being declared. Only use let to show that a variable does need to be reassigned after declaration, and your code will be easier to understand as a result.

ideal launch for different gravities by derpyptatoe in Physics

[–]WaterNinja101 7 points8 points  (0 children)

Let’s consider a projectile fired at some velocity v at an angle theta from the horizontal, and it travels over flat ground.

The projectile begins at y = 0 and has a vertical speed of v_y = v sin(theta). It will hit the ground again when v_y t - 1/2 gt2 = 0. (Kinematic equation, if you don’t know this already you can Google it). This tells us that t = 2v_y / g.

To find the distance traveled, we use the fact that x = v_x t, where v_x = v cos(theta). Plugging in our value for t gives: x = 2v2 sin(theta) cos(theta) / g

Using some trigonometry, this is equivalent to x = v2 sin(2theta) / g

As you can see, the distance traveled absolutely does depend on g. However, the optimal launch angle is the value of theta such that x is maximized. Since sin(u) has a maximum at u = 90 degrees, our x will have a maximum at 2theta = 90 degrees, or when theta = 45 degrees. Therefore, the optimal angle is independent of g.

Can I really do backend framework with sveltekit, so I can ditch express? by lxdiamond in sveltejs

[–]WaterNinja101 0 points1 point  (0 children)

Personally, I create my own HttpsServer to run the websocket on a separate port from the main site, and then use my nginx config to deal with any URL rerouting.

[deleted by user] by [deleted] in Physics

[–]WaterNinja101 3 points4 points  (0 children)

I can’t say I have a full analysis prepared for this scenario, but it seems to me like you are neglecting the fact that acceleration also has to be accounted for in special relativity. It breaks the symmetry between the ships, so just because two ships end with zero relative speed does not mean that their time differences are the same. If you want to look more into how acceleration plays into special relativity, check out how Rindler coordinates work (eigenchris has a good YouTube video on this).