Closed rmfranz13 closed 2 years ago
Ah. Just realized there's a wiki. I should probably give that a read.
Hi Ryan, thanks for your feedback and yes, this is a good forum for answering your questions.
Yes, everyone is welcome to use GUNNS and Trick for free under the NASA open source license.
Unfortunately, the 'sim bus' code that generates the thread_safe_bus folder is not included in GUNNS and is not released, nor do we have plans to release it. Several of the sims in gunns/sims depend on it. SIM_test does not depend on it, so you should be able to build that sim, and it is a convenient sim to drop new models into.
More about the dependency in our wiki here: https://github.com/nasa/gunns/wiki/Introduction#limitations--dependencies More about the sim bus to give you an idea of what it's doing, in case you want to try to replicate it on your own: https://github.com/nasa/gunns/wiki/Sim_Bus_Users_Guide_for_GUNNS https://github.com/nasa/gunns/wiki/Fluid_Aspect_Course_3_1
The lack of the sim bus means you can't integrate networks together without adding your own 'glue code' to take its place. Lacking sim bus or a replacement, you can still run single networks, such as your tank/feedline system fluid network, in isolation.
I realize that not providing the sim bus really torpedos GUNNS' usefulness to outside users. I'd like to replace it with an improved system released in GUNNS someday, but I have no firm plans or timeframe on that.
Thanks for the quick and very helpful response!
I am indeed able to build and run SIM_test/RUN_test, which gets my foot in the door.
I'm hoping the fact I can build and run SIM_test is somehow indicative that the underlying physical domains represented in the Test.sm are working on some level. Looks like it's modeling 3 separate physical networks: fluid, electrical, and thermal. My surface-level understanding of the sim bus is that, due to my lack of sim bus, these 3 networks are operating in isolation from one another, although each network itself is properly working in it's own little "universe"?
That scenario would likely be sufficient for our needs. We have an existing modeled tank system, but we're hoping GUNNS can provide a modeled "fluid network" representing the physics of our tank system, running along side our existing models, from which we can get/set pressure and temperature (if possible) readings. So the fluid network couldn't be totally isolated, but from reading the wiki link you sent, seems like that won't be the case. We'd be fine in setting up our own references/pointers.
I will be digging into the SIM_test on my own, but as I'm deciphering the code, I'm wondering what minimum models from GUNNS I'd need to set up a simple tank/feedline/valve system in a sim. Let's say for simplicity, I just want to model 1 tank that has a single valve that can be opened or closed. Is there a way to set this up purely with the model code, or do I need to utilize the diagram-drawing capability to create this? (very cool capability btw).
Thanks!
Glad to hear that SIM_test builds & runs for you. Yes each of those networks is running in isolation with no communication between them. They're all unrelated to each other and are just there to show that the 3 'flow aspects' are working.
We've built fluid networks for prop systems before, and have fluid properties for some common propellants. Yes you could build a fluid network of your system and get pressure & temperature sensor readings from it, and edit the fluid states in certain locations (the tanks, for example). I recommend going thru the basic & fluid tutorials to learn more about how to set up networks and interface to them here: https://github.com/nasa/gunns/wiki/Training_Courses. Also check out the link help pages here: https://github.com/nasa/gunns/wiki/Link_Help_Pages and for fluid: https://github.com/nasa/gunns/wiki/GunnsDraw-Fluid-Shapes-Library.
Here's a picture of about the simplest fluid network you could have for a liquid propellant. Use 'accumulator' links for liquid/ullage tanks, and GunnsFluidTank links for all gas tanks. I'm omitting some other necessary network stuff like the fluid config and initial states objects -- see the tutorial and fluid link help pages for more info:
You can write networks by hand, and you can see examples of what network C++ code looks like in gunns/sims/networks/fluid/test/TestFluidNetwork (this is auto-generated when you build SIM_test). But it's much easier to just do a GunnsDraw drawing for it, which then auto-generates the network code. That's covered in the tutorials, and more info about the Draw.io stuff here: https://github.com/nasa/gunns/wiki/GunnsDraw_Wiki_Start. I recommend taking a little extra time to install Draw.io and read up on how we use it, will save you a lot of time in the long run.
Hey Jason, I really appreciate your help. We have a few more questions.
As a test, I was able to get the diagram you have above drawn and compiling with my sim (with added helium gas and cryogenic oxygen). I have a workflow now for working with the diagrams and getting them compiled. Given our example, I have member variables in my sim, such as myTestGunnsObject.myFluidNetwork.liquidPropUllageTank
, which are accessible through the input file, and the sim runs without error while "myFluidNetwork" is updating. So off to a good start I think.
I showed my progress thus far to my team, and they had some questions I wasn't able to clearly answer for them. Hoping you can fill me in:
getPressure()
, but all such methods return "0" for me.mMalfBellowsRupturePressRate
. We'd like to know more about malfunction modeling in general in gunns, as it could save us work down the road.Thanks again
Not a question, just figured you deserve an update. GUNNS is very well made and has so far met or exceeded all our expectations. Thanks for all the work you put into it.
Thanks, I'm glad it is useful to you! Just curious, are you in a NASA CLPS contract? Feel free to contact me at my NASA email if you have more questions -- see the Contact Info wiki page. I'm going to close this issue now.
Thanks, will do. And yes, NOVA-C is being developed on a CLPS contract by Intuitive Machines. GUNNS at least on the surface appears to be something of a jackpot. It checks all the boxes we needed and more: It was written for Trick, it gives us the prop system modeling we were seeking, seemingly to the fidelity we need, it potentially gives us electric and thermal circuit modelling we may need in the future, and it's certainly easier to dive into than our production sim... I'll say that much... and it's all for free. Win, win, win, win.
TLDR; I'm missing a file called "thread_safe_bus/thread_map.sm".
Hello, and apologies if this is the wrong forum for this type of question. I'm mostly just trying to get the attention of someone who knows what they're doing.
I'm working on a Trick project which suddenly found the need for simulating a complex fuel tank / feedline system (the NOVA-C). One of our ex-NASA folks suggested this project as a possible alternative to implementing our own, and I'm tasked with understanding whether we can use it and whether it meets our needs.
I'm hoping I'm free to use this, given it's released under the same license as Trick.
It'd be ideal if I could get a sim working to learn from, which ideally sets up and propagates some aspects of a tank system. Tracking pressures and mass flow rates is most important, and thermodynamic properties of gasses involved would also be nice but not essential.
My initial attempt was simply to set the GUNNS_HOME environment variable, and just trick-CP from anything under the "sims" folder. It looks like I'm missing a file called "thread_safe_bus/thread_map.sm"?
I also tried compiling from within the "gunns loaded and unloaed" docker containers, assuming they'd have the environment set up right, but I get the same error.
Thanks in advance for any guidance.