nasa / gunns Goto Github PK
View Code? Open in Web Editor NEWThe NASA General-Use Nodal Network Solver (GUNNS) software
License: Other
The NASA General-Use Nodal Network Solver (GUNNS) software
License: Other
Gunns class needs to let an external model drive its mSlavePotentialVector so it can be used in slave mode. Looks like we assumed sim bus would be the mechanism for driving mSlavePotentialVector, but we also need to be able to set it with a call directly to the solver.
Get CI working like we had in ESGL GitLab. Other projects that might have good examples are Trick and TrickHLA.
The gas diffusion model in GunnsFluidHatch works by sending an inflow to the nodes that has a mix of signs in the mass fractions of the gas components, so that the compounds flow in opposite directions to equalize their partial pressures across both sides. The GunnsFluidDistributedIf was not designed to support this 'cross flow', or diffusion in general. It can't handle the negative mass fractions coming from the hatch.
The output of the draw/supexport.py script is a Trick input file that sets up the super-network in a Trick sim. This needs a comment at the top that this file is auto-generated, so that people won't try to edit it by hand. Similar to the comments in the C++ generated by netexport.py.
Add an optional duty cycle function to GunnsElectUserLoad and derived (the user load spotters), whereby it automatically cycles on/off based on an elapsed time in a given duty cycle period, with on time given by a duty cycle fraction. This feature should default to off so it doesn't interfere with user loads whose state are already driven from other models.
Demonstrate integration between the thermal & electrical aspects of a solar array. Later, when the radiation aspect is released, we'll integrate it with the thermal & electrical aspects. Because the interaction with the external environment will be modeled with the pending radiation aspect, we'll omit modeling it in the thermal aspect now, so omit the thermal radiation & absorption links.
Conductive flow paths in real-world systems are sometimes best fitted with a flow curve exponent that differs from our standard 1/2 (from Bernoulli's equation) flow equation. Linear curves often happen for laminar flow, which the existing GunnsFluidConductor can't do. Some systems have a mix of laminar & turbulent flows and are best fitted with an exponent between 1/2 and 1.
Add a config data to GunnsFluidConductor that can override the default exponent on the fluid curve (default is 1/2). This will allow us to more easily make linear conductors (value of 1) or tune to other values as needed.
I haven't decided whether we should put this in the GunnsDraw shape data, because this would affect all conductors and derived link shapes, and impose a big drawing config data update for all users. We could just sneak this into the GunnsFluidConductorConfigData and let users manually set it via other means (Trick input file, etc.) when needed.
Improve GunnsElectConverterOutput to handle more off-nominal cases in the current and power output regulation modes:
The endless quest for better adsorber models continues! Import the Toth isotherm-based GunnsFluidCdraAsborber link into the repo and make it more generic.
The "GUNNS trickified lib is NOT being included because..." info output by S_gunns.mk is confusing to users. It leads users to wrongly conclude that this is the culprit when a sim build fails. Get rid of these "NOT" comment outputs, and instead quietly let Trick do its thing. We can keep the "is being included..." comment for the lib inclusion case.
GunnsElectBattery needs a public interface to get the effective voltage of its cells.
Issue #30 added a new interface in GunnsFluidNode to receive trace compounds (TC) by themselves, separate from bulk flow into or out of the node. This can greatly simplify links that had to embed their TC-only flow in a fake bulk flow.
Collin Blake wrote a helper script to generate the simbus ICD file lines for heat exchangers and regenerative heat exchangers. Add it to the repo.
If you ever hit enter when typing a link name in a shape, draw.io adds some xml tags to the field, which are invisible when rendering in Draw.io, but show up in the link name in the xml file and then it gets copied as the link variable name in the exported network, which fails to compile.
In columns DA-DB in aspects/fluid/tuning/Gunns_Pump_Fan_Tuning_Helper.xlsx, we attempt to estimate the maximum flow rate of the reference performance curve. The method doesn't work in all cases because it's not a proper root-finding method, like we use in runtime.
The core code was written during TS21 before we could get the herd of cats under control. Many code standards and styles were harmed.
A project needs to model either LH2 or very high pressure (non-real gas) H2 for a fuel cell application.
I left out the packages needed to run the unit tests: cppunit-devel, lcov, valgrind.
GunnsElectConverterInput should allow you to disable both of its trips (IUV & IOV) by setting their trip limits to zero, without failing the init check that requires the IOV limit to be > IUV limit.
An HLA packer class needs access to the mInData and mOutData in GunnsFluidDistributedIf.
When GunnsElectConverterInput leads the interface with its -Output counterpart link, and the Output link rejects the network solution because it is changing bias (activating or deactivating output voltage regulation, for example), it returns a zero input power to the Input link. However, the Input link interprets this as a valid power value when it is not - it came from the Input link on a minor step that that Input link was rejecting the solution. This can cause the network to converge on the next minor step with Input link having zero input power, while the output link has re-calculated a non-zero input power. This causes the output side of the circuit to be supplied power, but no power is drawn from the input side.
Add a help page for the GunnsElectIps link to the wiki.
We normally model the pressure head of a fluid column under acceleration with a GunnsFluidPotential link, or in the bellows force in a GunnsFluidAccum link. But these require the user to provide the pressure value. We'd like to automate this calculation in GUNNS so the user doesn't have to calculate the pressure.
We could use a new Spotter class, designed to receive the acceleration vector, and output the resulting pressure to a connected GunnsFluidPotential or GunnsFluidAccum link. The spotter would be configured with the column height as a vector in some reference frame, and an optional frame transformation between the column's frame and the acceleration vector's frame, if needed. The spotter will get the fluid density from the connected link and then calculate the pressure as rhogh.
We'll do this as a separate spotter instead of building it into GunnsFluidPotential or GunnsFluidAccum or derived versions, since we want to avoid cluttering them with a feature that isn't used very often.
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.
Update the CI and DockerFiles to install zip. Latest Trick can't build sims without it.
Many electrical aspect links were written as prototypes and never completed the entire GunnsBasicLink interface. Complete all links so that they drive the following in the GunnsBasicLink interface where applicable, similar to fluid & thermal aspect links:
We need to be able to more easily model a fuse in series with a user load. Right now we have to use an extra switch link for each fuse, which adds a lot of nodes and links to a network.
Develop a new variant of GunnsFluidConductor that converts fluid types that flow through it, between different port 0 and 1 types. For instance, port 0 may have GUNNS_O2, and port 1 may have GUNNS_O2_REAL_GAS. Flows from 0 to 1 would get the O2 converted to O2_REAL_GAS, and vice-versa. Support any number of conversions.
draw/netexport.py uses the base64 package's decodestring function, which has been deprecated and is now gone in python 3.9. We should be using decodebytes instead.
We have a problem where netexport.py fails to write the output .hh file, with this error:
UnicodeEncodeError: 'ascii' codec can't encode character '\xa0' in position 275: ordinal not in range(128)
The python version is 3.6.8, but this error is only happening in our CI. A regular linux workstation running python 3.6.8 can export the same drawing file with no problems.
I don't understand why it isn't repeatable, but anyway we should protect for this kind of thing by creating safe versions of the string for writing to the output file with the string.encode('ascii', 'ignore').decode('ascii') trick, described here:
Enhance the integration test framework (gunns/test/utils/intTester) to be able to do Trick data logging of model terms, and make test assertions agains the log data.
This is migrated from GitLab issue 11
Nitrogen Tetroxide ("NTO", chemical formula: N2O4) and Monomethyl Hydrazine ("MMH", chemical formula: CH6N2) are common rocket propellants that are likely to be needed in GUNNS propulsion networks in the future. Add these fluids types in the liquid phase.
Add a few things to complete modeling the thermal state of batteries:
This will be a simple open-loop model, where the temperature doesn't feed back into battery performance. Likewise, the thermal runaway malf will only look like a positive feedback loop with temperature, but not use the actual temperature.
We're finding that super-network drawings are not very scalable. Since we have to draw a super-port connecting every link between sub-networks, the drawing gets very large and sluggish when there are a lot of sub-networks and super-ports. We need an optional alternate method to draw the interfaces between sub-networks in a super-network drawing.
Here's the idea, but it may change:
It will look something like the attached picture. Normally the interface boxes will be collapsed, but you can open them up to see the nodes and check for node-compatible interfaces.
Normally when we save changes from draw.io, draw.io compresses the file; then our netexport and supexport scripts can uncompress and read those files just fine. However if you save a file as File > Export as XML, and un-check the compressed box, draw.io adds some extra XML elements to the front of the file that neither of our scripts can handle. The original <mxgraph> element our scripts are looking for are embedded in <mxfile> and <document> elements.
netexport.py and supexport.py already handle the compressed, and uncompressed-after-they-run file format.
Some Trick sims are getting linker errors:
Linking S_main_Linux_4.8.exe
.../gunns/aspects/electrical/Switch/GunnsElectUserLoadSwitch.o: In function `GunnsElectUserLoadSwitch::confirmSolutionAcceptable(int, int)':
.../gunns/aspects/electrical/Switch/GunnsElectUserLoadSwitch.cpp:302: undefined reference to `UserLoadBase::updateFuse(double)'
GunnsElectUserLoadSwitch.cpp calls UserLoadBase::getLoad, but doesn't tell Trick about that dependency. Adding UserLoadBase.o to the library dependencies will fix.
Release minor version 19.3:
We've had more than one recent bug about missing Trick library dependencies in our code. Our test automation doesn't check for this -- by design the unit tests do not use Trick, and we don't have a test Trick sim that rigorously covers this for the whole code base.
Every code body should have a library dependency statement for every .o that it depends on. Then every class, built in isolation in a Trick sim, gets Trick to compile and link in all other code that it depends on. However if a code body is missing some of its dependencies, this problem is hidden when there is other code in the sim that does declare those same dependencies. The problem won't reveal itself until later, when some other sim has a different combination of code that never includes those dependencies.
Update GunnsFluidSimpleH2Redox to output the heat of reaction. Positive values for exothermic fuel cell reaction, negative for endothermic electrolysis reaction.
GunnsFluidDistributedIf sizes its bulk fluid and trace compound mixture arrays dynamically to match the size of the fluid network. However, some distributed interfaces (such as HLA) may have fixed-size arrays that don't match the size of the fluid network arrays, and need target arrays in the GunnsFluidDistributedIf that match their size.
As mentioned in the title, when will the gunns project show you the compilation and installation instructions
and the introduction to the project
The limits on the gSys calcualtion in GunnsGasFan::computePressureSource are arbitrary, with inconsistent units, and can cause mSourceQ to diverge from mVolFlowRate when inlet density drops. Need smarter limits on gSys.
Fluid nodes that have no outflows have their mOutflow fluid properties zeroed, which throws off the average density, molecular weight, and delta-pressure for the calculation of linearized admittance in fluid conductors.
It's too easy to insert some basic links in fluid networks, and vice-versa. GunnsBasicLink and GunnsFluidLink are easy to confuse with each other because they have the same looking shape.
Update netexport to error out if it detects fluid links in a basic network or vice-versa.
There is a problem with Trick ICG in RHEL8 that breaks Trick View's and TrickHLA's interface with some attributes of the GunnsFluidDistributedIfData class. Trick has the wrong address offsets for the variables. Trick team thinks it may be an incompatibility between ICG and the llvm version on RHEL8.
This was the Trick issue: nasa/trick#1308, and has since been fixed in Trick release 19.4. See comments below about the range of Trick commits that had the problem.
As a workaround, we can make Trick fall back to its 'compat15' function to correctly determine the class variable offsets, by including these lines in GunnsFluidDistributedIf.hh:
#ifdef TRICK_ICG
#endif
The ICG problem may affect other code as well.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.