Do Newtonian mechanics and thermodynamics have different definitions of internal energy? This question comes out of a discussion under one of my answers here on PSE. My original understanding of internal energy went something like this:

The internal energy of a system of particles is the total kinetic energy of all particles relative to the center of mass of the system (i.e. it doesn't take into account the entire movement of the system itself relative to some other frame) plus the total potential energy due to the interactions between particles within the system.

And I thought this held true for any system. For example, a system of non-interacting gas molecules would have its internal energy only described by the kinetic energies of the molecules. Adding to this, if I considered my system to be a collection of non-interacting gas molecules as well as the entire Earth, then the internal energy would include the kinetic energies of all of the gas molecules and the Earth as well as the gravitational potential energy between the gas molecules and the Earth.
However, this latter case caused some confusion, and a user said to me in the discussion:

You are looking at internal energy from a Newtonian mechanics perspective. I am looking at internal energy from a thermodynamics perspective, and in thermodynamics internal energy is a physical property of a substance. The languages are different.
... In thermodynamics $U$ specifically refers to internal energy of a substance or object at the microscopic level and does not include gravitational potential energy.

This seems odd to me. Why would the definition of internal energy depend on Newtonian mechanics vs. thermodynamics? I would think depending on the former or the latter you would modify how you define your system to analyze it in the best way possible, but I had never heard of the modifying the definition of internal energy as well. In other words, just because thermodynamics focuses on the "microscopic", why does this mean that the definition of internal energy changes rather than the way we decide to define our system? Do we actually have different definitions of internal energy, or just different system definitions where the same internal energy definition is applied accordingly?
To explain my understanding more explicitly, in the gas-Earth example what we can do is split up the internal energy into gas molecule kinetic energy, Earth kinetic energy, and gas-Earth interactions such that $U=\text{KE}_\text{gas}+\text{KE}_\text{Earth}+\text{PE}_\text{gas-Earth}$, but in "thermodynamics language" we really just want $U=\text{KE}_\text{gas}$. Therefore, in thermodynamics we don't actually change the definition of internal energy, really we just consider the gas system and not the gas-Earth system so that $U=\text{KE}_\text{gas}$. Then the effects of $\text{PE}_\text{gas-Earth}$ are just taken into account in terms of the work done by gravity $\Delta\text{PE}_\text{gas-Earth}=-W_\text{grav}$ that changes the overall (external) kinetic energy of the gas system if needed.
Is the above application of internal energy standard? Or does the definition of internal energy change with the field rather than with the system?
 A: Maybe the crux of the issue is what the word "internal" should include, rather than on "thermodynamic" versus "Newtonian."
If we're considering a gas in a container sitting in a lab on the surface of the earth, we might choose to consider the earth's gravity as an "external" influence (because the earth itself is "external" to the system of interest), and then we would not include gravitational potential energy in the "internal" energy of the gas. 
On the other hand, if we're considering a gas whose "atoms" are stars in a cluster of astronomic proportions, then we would consider their mutual gravitational interactions as "internal" to the system, and therefore we would include the gravitational potential energy. By the way, this is an interesting example in thermodynamics, because this system has a negative heat capacity: adding energy makes it colder. (This is related to the prediction that an evaporating black hole gets hotter as it gets smaller.)
Whatever language we use, the key point is that we separate all the stuff in the scenario into two categories: one category is the stuff whose behavior we're interested in, and the other category is all the other stuff that might influence the behavior of the stuff that we're interested in. The words "internal" and "external" are sometimes (but not always) used to distinguish between these two categories.  Sometimes the word "system" includes both categories, and sometimes it only includes the first one.
A: I don't think that thermodynamics considers only microscopic interactions.
When we say that $U=K_{gas}$ it means that our system is only gas but as you are saying that $U=\text{KE}_\text{gas}+\text{KE}_\text{Earth}+\text{PE}_\text{gas-Earth}$.
The above equation is only valid for earth-gas system.
Conclusion: The definition of internal energy in newtonian mechanics is valid in thermodynamics as well and internal energy totally depends upon the system we choose.
A: In Newtonian mechanics you can certainly refer to the total energy of an earth-object system as the "internal energy" of the system if you wish. My concern is for the use of $U$ to represent the internal mechanical energy of the system  as a whole may lead to confusion to thermodynamicists where $U$ is generally reserved for only the energy contained within the object, as discussed further below.
As I understand it, in mechanics the total mechanical energy of the earth-object system would be generally be written
$E_{tot}=KE_{object}+PE_{object-Earth}$
or, for a non-isolated earth-object system
$\Delta E_{tot}=\Delta KE_{object}+\Delta PE_{object-Earth}=W_{ext}$
This is depicted in FIG 1 below. 
The $W_{ext}$ in the Newtonian equation does not account for external work that expands or contracts the boundary of the object, called $pdV$ work, and other types of work that cross the boundary of the object itself, since the object is typically described as a "rigid body" in Newtonian mechanics. $W_{ext}$ generally only accounts for the effect of external work on the kinetic and potential energies of the rigid body as a whole. 
Nor does the right side of the equation account for the possible effects of energy transfer by heat $Q$ to or from the object-earth system, which is to potentially change the internal energy of the object. 
Those aspects missing in the Newtonian equation are included in the general expression for the first law of thermodynamics for a closed system (no mass transfer between system and surroundings) which is :
$\Delta E_{tot}=\Delta U_{object}+\Delta KE_{object}+\Delta PE_{object-Earth}=Q-W$
This is depicted in FIG 2 below. Note that FIG 2 encompasses everything in FIG 1 but also includes those aspects of the conservation of energy missing in FIG 1 related to the energy internal to the object. Moreover, $W$ in this equation includes not only work that effects the mechanical energy of the system ($W_{ext}$) in FIG 1, but other types of work transfer that crosses the external boundaries of the object.
Hope this helps.


A: I think it can be seen both ways, depending on the focus of the discussion.
Same
Internal energy is the energy not accounted for by the Newton's equations of motion. Thus, if we are talking about a reservoir with gas, its motion as a whole will be described by the Newton's laws, whereas the energy of the molecules (kinetic and the energy of their interaction with each other) will constitute the internal energy of the gas. From this angle the Newtonian mechanics and statistical physics agree.
Not the same
However, if we discuss movement of a single molecule, the Newtonian mechanics would focus on describing its trajectory, whereas statistical mechanics would characterize the molecule by some average parameters. This is the important distinction that forms the basis (and even the reason d'être) of the statistical mechanical worldview. 
Conclusion
As it often happens in physics, there is no really disagreement of definitions, but one has to be careful about where and how they are applied.
