Debug: Database connection successful
You are not logged in.
If u want i could write say, class planet,
and u could tell me what its attributes are:
Radius, mass, density ..
And which member functions it needs to have. Maybe:
get_diameter()
get_surface_area()
..
something like that.
Could be as much about learning as it is about doing the programming.
Last edited by offtherock (Today 04:11:02)
Online
Like button can go here
For offtherock ... Thank you for your interest in converting the Python program to object style!
Everything needed should be available in the existing program. The equations may have to be changed to account for the new style.
At present, the mass of the Earth is stored in the form of a variable that is then employed in the equations as needed.
If object style is used, then the property of mass must be delivered to the question in a compact form.
***
For all... Version 15 is in a development phase. The process to model Flow of thermal energy from hot gas to cold metal is not yet working. Today I'm planning to work with Gemini to improve the flow. My guess is that we do not yet have a material defined for the container wall, so we do not have properties of that material to work with, such as thermal conductivity.
In the course of this investigation I am hoping to learn about thermal energy transfer by direct contact (conduction).
(th)
Offline
Like button can go here
I downloaded the program and ran it.
You can add
###
from modules.planet import Planet
earth = Planet('Earth');
earth.g_constant = 6.67430e-11
earth.mass = 5.972e24
earth.radius = 6.371e6
earth.sea_level_density = 1.225
# Gravitational constant (N * m^2 / kg^2)
# Default units are kg and meters.
###
right beneath the first 3 import lines.
But u need to make a folder called modules.
and in that folder, place file planet.py and put in that file:
class Planet:
def __init__(self, name):
self.name = name
def set_mass(self,new_mass):
self.mass = new_mass
Online
Like button can go here
For offtherock ... re #78
It is good to have someone else taking an interest in this study, and specifically in design of the software.
You are welcome to make the changes you recommend and upload the amended version. Please test it first, to be sure it replicates the performance of the version you are replacing.
My focus is upon solving the physics problems, so that is where I'm working at the moment.
In the quote below, for anyone who might be interested in the physics and engineering of the model, I've captured today's discussion about the current inability to accurately model heat flows between gas and metal in the air capture device. The hypothesis we are pursuing is that cooling the air capture container will allow it to capture more air molecules. However, in the early stages of creating the software model, we have omitted details.
Hi Again! and thanks (again) for staying with me in this quest! In our effort to add a new feature to our program to simulate air capture, we have begun the process of figure out how to transfer thermal energy from hot gas to cold metal. At this point, I think we do not yet have the metal defined. Please confirm that. I think we identified a metal alloy that is at the upper range of temperature tolerance, but that alloy may not yet be encoded in the program? We need to select a metal for the air capture container, and we need to know how well that metal will absorb thermal energy of the hot gas that arrives as the projectile ascends. Attempting to model this process may be difficult for Python. I think it would be difficult for OpenFOAM. Here is a transcript of the latest run, along with a difference listing between Version 14 and 15. Do you think Python can solve this problem? In thinking about the problem, I realized that the surface area of metal exposed to the hot gas makes a big difference. We discussed using pipes of small diameter for the air capture device. Such pipes would be useful in construction of large objects in LEO. By using many such pipes for the air capture device, we maximize the surface area that is available for cooling. Let's use pipe that has ID of 4 cm and OD of 5 cm. This is a strong pipe suitable for on-orbit applications. Here is the transcript:
<< duplicate text removed >>
That's an excellent question, and thank you for the feedback. The results from Version 15 are definitely a problem, but they confirm we're still grappling with how to properly model the heat transfer. Let's address your points directly.
1. Python and the Thermal Problem ?
Yes, Python can solve this problem. While the previous attempts were flawed, it wasn't a limitation of the language itself, but rather the physical model being implemented. The current approach is more sophisticated than the "instantaneous equilibrium" model of Version 14, but it still seems to be missing a key piece of the physics.The issue is that our current model assumes a perfect, instantaneous heat exchange between the incoming air and the entire mass of the pipe. In reality, heat transfer is governed by rates. The heat must first transfer from the hot gas to the surface of the cold pipe, and then conduct inward. We can't model this fully with our current approach, but we can do a better job with an improved, simplified model.
2. A Corrected Thermal Model (The Next Step) ?️
The core problem in the Version 15 code (based on the diff report) is that heat_transferred_to_pipe is calculated using an energy balance that still seems to lead to an over-estimation of the thermal energy exchange, causing the temperature to rise to an absurd level. The massive temperature jump from 1535 K to 214,939 K is a clear sign that the model is still broken.The physics that needs to be modeled is more like this:
Work of Compression: For each time step, the incoming air's kinetic energy is converted into a corresponding rise in the gas's internal energy and pressure.
Heat Transfer: Heat then flows from the hot gas to the cold pipe's inner surface. The rate of this transfer depends on the surface area, the temperature difference, and the thermal properties of the gas and pipe.
Our current model is still skipping these crucial steps. It's essentially calculating a "final state" temperature, but that final state is physically impossible because it ignores the dynamics of the system.
3. Material Selection and Surface Area
You've made a brilliant point about the surface area. The design using many small-diameter pipes is a perfect engineering solution for this problem. Maximizing the surface area is the most effective way to improve the rate of heat transfer. Our current model uses a single pipe_mass_kg parameter but doesn't account for the surface area that mass represents.Here's how we'll fix this in the next version:
Define Pipe Properties: We'll define the specific properties of the pipes you suggested:
Inner Diameter (pipe_ID_m): 4 cm (0.04 m)
Outer Diameter (pipe_OD_m): 5 cm (0.05 m)
Calculate Number of Pipes: We can then calculate the volume and mass of a single pipe, and from the total pipe_mass_kg, determine the number of pipes required.
Calculate Total Surface Area: Using the number of pipes and the inner diameter, we can get the total internal surface area available for cooling.
Incorporate Heat Transfer Coefficient: We'll use a simplified heat transfer coefficient (h) to model the rate of heat flow from the gas to the pipe. This coefficient depends on the gas flow conditions and the material properties. While we don't have a specific metal defined yet, we can start with a general assumption and then add a material_properties dictionary to the code in the future. We've used a specific heat for steel so far, so let's stick with that for now.
The next version will include these changes to create a much more realistic thermal model that accounts for the physics of heat transfer over time and with surface area.
Summary of Next Steps
Model the new pipe geometry to calculate total cooling surface area.Implement a heat transfer coefficient to model the rate of heat flow from the air to the pipe.
Correct the thermal energy balance to properly calculate the temperatures of the air and the pipe in each time step.
I'm confident we can create a model that provides a more realistic and useful simulation of the system's performance. The "doors" are a problem for a later time; for now, let's focus on getting the physics of the core process correct. I am ready to implement these changes.
****
Thank you for your enlightening discussion of the problem at hand. I've decided to publish today's conversation because we have a couple of engineers in the group, and they may find the analysis interesting, and they might even have suggestions. Please do proceed to Version 16. I'm confident we will learn something, and the program will probably work better as we make adjustments.
***Thank you. It's great that you're sharing this with the wider group; their input will be invaluable. I'm ready to proceed with Version 16, which incorporates a more realistic thermal model based on heat transfer principles.
The Program (Version 16)
This version corrects the thermal model by incorporating your suggestion to use a collection of small pipes, which increases the cooling surface area. We'll now calculate the number of pipes required to hold the pipe_mass_kg and pipe_volume_m3 and use that to determine the total surface area available for cooling.The new approach for the thermal model is as follows:
Incoming Air Temperature: For each time step, the incoming air's temperature is calculated based on the work done to compress it.
Heat Transfer: The heat energy is then transferred from the air to the pipe based on a simplified heat transfer equation. The rate of heat transfer depends on the surface area, the temperature difference between the air and the pipe, and a heat transfer coefficient.
Pipe and Air Temperature Update: The energy transferred is used to update both the air's temperature (it cools down) and the pipe's temperature (it heats up).
This new model is a more accurate representation of the physics and should provide a much more realistic simulation of the cooling effect.
After rereading the discussion above, I realized that the temperature of the air capture equipment will rise as thermal energy flows in from the hot gas. I wonder if Gemini is taking that into account. If Gemini is assuming the metal is always 100 K, then the computed energy absorption will be greater than reality.
Version 15 was stored in another topic so that this post has a longer lifetime in the Active list.
(th)
Offline
Like button can go here