-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nrlmsise update #28
Nrlmsise update #28
Conversation
Find Cmake added folders
Add molar gas constant Added mean free path + speed of sound + molar mass + Gas properties datastructure Changed altitude input to meters and radians + Added mean molar mass + speed of sound + mean free path etc. Added stream output for nrlmsise input data structure
Hi Rene, I've had a look at the code, and I think this will be an excellent (and long overdue) addition to Tudat. I'm not entirely sure about the use of the many new functions in the base class, though (returning NaN, instead of using pure virtual functions). I think it would be better to have default implementations (with some default values for gas constant, ratio of specific heats, etc.) in the derived classes (i.e. StandardAtmosphere). On a more specific note, I think the getNumberDensities function should return a map (with the specie as key) to be more modular (i.e. applicable to non-terrestrial atmospheres). I'd be happy to make the modifications, but before I start changing stuff, let's discuss in person this or next week, Cheers, Dominic |
Hi René, To address the questions from your original post:
|
As we discussed, I will update the gas properties class with two maps that contain the molar mass and the collision diameter. Enums will be used in a find function to get the molar mass of a specific specie. I will move the constants to the tudat physical constants section. I will further add the NRLMSISE input function. Then, the final code checks can be performed and it can be added to Tudat. |
Based on the discussion we had before, I have done the following:
The only thing that remains:
I also recommend to make an atmosphere folder and move the atmosphere code over there. But I think it is better to do this after it is merged, because this pull request is far behind the current version. |
I made some minor changes to the code, and added an interface to the SimulationSetup folder. BY using AtmosphereSettings( nrlmsise00 ) with the createBodies interface, the atmosphere model and associated files are automatically loaded/created. Thanks a lot for all the effort you put into this Rene, this piece of code will go a long way to making Tudat more robust for accurate Earth orbit simulation/data analysis. |
Feature/windows test fixes
I updated the NRLMSISE atmosphere model:
Input variables to: meters and radians (instead of km and deg) . This is consistent with the US atmosphere model.
I added the calculation of the speed of sound, mean molar mass and mean free path.
The weighted average collision diameter is also calculated, but not tested. I cannot find data to test this value except for an old thesis of A. Ronse.
I added a data structure called: GasComponentProperties in Atmospheremodel.h
This datastructure includes the molar mass of the components and the collision diameter (which is needed for the calculation of the mean free path). The default constructor, constructs the datastructure with default values that I obtained from the sources that are provided in the comments.
I added tests to the unit test:
The sources are provided in the comments.
The specific heat ratio is set to 1.4 and not calculated. This can be implemented easily if data is obtained of the cp of all the gasses. The number densities can directly be used to calculate the specific heat ratio. (Thermodynamics an Engineering Approach, Michael A. Boles)
I added several virtual functions to the Atmospheremodel.h
I know that the code of this pull request is not complete, but I would like some opinions so I can finalize it:
Any other comments on the implementation?
I also have an NRLMSISE input function that uses a solarActivityData data structure and the time in seconds since the J2000 epoch to set all the input values of the NRLMSISE model. I will add this later.
One additional comment: I performed these changes already in an earlier version of Tudat. Therefore, I made a new branch with the newest version of Tudat and merged the specific commits into that branch. As a result, I had to solve some conflicts, so these conflicts can also arise when merging to Tudat.