Diamondoid heat pump system
Also Thermomechanical energy converter.
With advanced APM heat pumps systems for reaching liquid nitrogen or helium temperatures can probably be easily created. They could be made into desktop scale devices with nothing more than a power connection or more importantly integrated into nanofactories to gain more reliable mechanosynthetic operation with lower error rates.
[correction: the correct cycle is probably similar to the reverse otto cycle aka constant volume cycle]
Table of thermodynamic cycles: 
The air refrigeration cycle also known as Bell Coleman cycle or reverse Brayton cycle (see: heat pumps in general and "gas cycle diagram" ) is nice for diamondoid AP systems since high compression ratios are easily archivable and liquid nitrogen temperatures can be archived just by using ambient air
An easy to implement (but not optimal) gas cycle is like follows:
- compress gas in thermal contact to the heat radiator to fluid densities (around ~1000bar)
- let the generated compression heat dissipate into the environment
- transport compressed gas inside through the thermal isolation layer while exchanging heat with out going gas (capsules)
- expand gas in thermal contact to the isolated volume
- let the now absent expansion heat be filled from the chamber (suck it cold)
- transport expanded gas throug isolation layer while exchanging heat with the ingoing gas (capsules)
- repeat the cycle
To reach liquid hydrogen or helium temperatures the compressed hydrogen/helium must be cooled below its inversion point or else the gas will heat up instead of cooling down when expanded. A two stage design with good thermal contact is then needed.
Gasses can be handled safely (without explosion hazard) in small small DMME capsules with lockable pistons. When oxid-ceramic diamondoid materials are used dry air instead of pure nitrogen should be safely usable.
To keep the capsules small in spite of the high compression ratios the capsules could employ three consecutively acutated pistons each compressing the enclosed gas by a factor of ten.
Since the capsules must be moved between two locations seperated by macroscopic distance the design (and the process steps) will be spread over multiple microcomponents.
The most difficult part is the thermal thermal isolation layer since diamond is pretty much the worst thermal isolator conceivable. If SiO2 structures can be mechanosyntesized AP aereogel might be usable.
Cooling systems must be heterogenous makrosystems since thermal isolation worsens with shrinking system size.
Thermo-mechanical energy conversion with such diamondoid heat pump systems can be near reversible.
In todays (2018) way we convert energy energy the "evil" step (that is: the thermodynamically irreversible step) is the burning hydrocarbon fuel (especially at low temperature). This is what devaluates energy and leads to a low Carnaugh-efficiency.
(See: Global scale energy management)
Possible application in a nanofactory: The cooling sandwich
In the lowest convergent assembly steps where mechanosynthesis happens cooling can drastically decrease error rates. Since it seems easy to do it it will likely be done. The special thing is though that thermal isolation doesn't work properly at the nanoscale. Thus the whole stack of bottom layers of a nanofactory (mechanosynthesis, crystolecule assembly and microcomponent assembly) may be packed in a sanwich of two macroscopic layers. The first one is there to cool down the raw molecular feedstock once it enters into machine phase from the bottom and the second one is there to recuperate the thermal energy when the assembled microcomponents come out the top. These sandwich layers need to be connected at some points to send energy from the top to the bottom energy. The energy conversion steps may be: thermochemical conversion then chemical transport then chemothermal conversion. This process can be highly reversible and will - once cooled down only - only need to remove waste heat from mechanosynthesis.
In an ideal gas were it is assumed that particles neither attract nor repulse each other expansion or compression of this gas under "perfect" thermal isolation (adiabatic process) does not change the temperature.
Taking the weak long range Van der Waals forces into account (that is using the Van der Waals gas equation instead of the ideal gas equation) expansion or compression will change the temperature.
The Joule-Thomson effect.
- gas particles attract each other (at greater distances)
- => they need to spend work to increase their mutual distance
- => The particles loose speed
- => the gas cools down
- gas particles repulse each other (at smaller distances)
- => they gain energy when increasing their mutual distance
- => the particles get accelerated
- => the gas heats up
The ratio between the two effects depends on the kind of gas, the temperature, and the pressure. The dominating effect determines the sign.
Quantitatively the process is characterized by: "how the temperature changes when only the pressure changes and the enthalpy is kept constant" which is the Joule-Thomson coefficient.
For a specific gas cooling can only be archived below the inversion temperature (which can be quite low for light gases like hydrogen and helium - thus they need pre-cooling via a different gas with higher inversion temperature like e.g. nitrogen from air). And the pressure window for a cooling cycle starts to open up at a specific pressure (which can be quite high - which is not much of an issue for advanced APM systems).
Relation to quantum effects
Note that albeit quantum effects can lead to forces (like e.g. degeneracy pressure, exchange interaction, thawing of DOFs) the Joule-Thomson effect most is predominately not related to these quantum effects. (Excluding VdW forces here which is strictly speaking also a quantum effect.)
It might be interesting to investigate if artificial cooling systems can be constructed that are dominated by these quantum based forces and can be put to practical use. (This well may have been done in some way in the course of ultra low temperature research (TODO: investigate this further))
Relation to machine phase
Warning! you are moving into more speculative areas.
When removing motion constraints on crystolecules, that is e.g.
- letting a bearing thermally freewheel at least part of the full 360° or
- letting a slider thermally "freereciprocate" some distance
- widening or narrowing the freewheel angle and
- extending or reducing the freereciprocate length
should slightly change the temperature depending on how repulsive or attractive the motion limiters are.
Each wheel or slider has many atoms and is thus quite massive but still gets only one statistical thermal energy packet (equipartition theorem). Thus a Joule-Thomson like effect may be hard to establish due a the difficulty of perfectly balancing out the the VdW forces (which become quite strong when cumulated from all the many atoms). And if the effect can be established it will likely be rather small. Each relatively big crystolecule providing the effect of just one relatively small gas molecule.
Sidenote: Note the strong resemblance (in fact pretty much identicallity) of this freewheel/freeslide setup to the setup used to estimate to which degree nanomachanics is influenced by qquantum mechanics.
The difficulty to get macro style machinery at the nanoscale to interact with thermal motion effects which are much stronger than mechanical quantum effects at room temperature should make it even more clear that quantum mechanics does not pose not a problem for such machinery.
Strongly related to the Joule-Thompson effect is entropic cooling effect in rubber elasticity (an entropic force). This effect can be used to store large amounts of energy in a very safe way, where instead of violently exploding in case of an accident the storage just freezes and thwarts its own self-destruction.