Giter VIP home page Giter VIP logo

gunns's Introduction

Unit Tests Test Trick Sim Trick Library Dependencies

General-Use Nodal Network Solver (GUNNS)

GUNNS is a set of generic C++ math models that combines nodal circuit analysis algorithms with the hydraulic-thermal-electric analogy to model flow circuits (fluid, thermal, electrical). The models include generic physical components like pumps, valves, resistors & capacitors. These components, called 'links', are connected to 'nodes' and configured with their characteristic values, creating a 'network' (circuit) of links and nodes. The state of the network and its contained models are then propagated in the time domain.

GunnsDraw, the Network Design GUI

Networks can be drawn up with a Draw.io drawing, from which run-time C++ code is auto-generated that can be built into simulations. This is called 'GunnsDraw'. GunnsDraw includes custom Draw.io shapes for the generic physical components and Python scripts to auto-generate the run-time C++ code.

Extensible

GUNNS is designed to be extensible and flexible. It is written with object-oriented polymorphic interfaces between the network solver, links, nodes, and other extensible object types. This allows users to develop new classes to model things that the GUNNS baseline doesn't cover. Users can create custom GunnsDraw shapes by taking advantage of Draw.io shapes' extensible XML schema.

GUNNS can also be extended to model other domains besides the above flow systems, as it can solve systems of the general form [A]{x} = {b} where [A] is a symmetric positive semi-definite matrix. This is demonstrated in an included simple 6-DOF rigid body dynamics equations of motion model.

Simulation Environment and Glue Code Not Included

GUNNS does not provide a complete simulation environment, as it is intended to be run in external environments. GUNNS is optimized for the NASA Trick simulation environment, but can be run in other environments with some additional work.

GUNNS is optimized for the 'thread safe sim bus', which is 'glue code' that integrates separate GUNNS networks together in a Trick sim. However, this sim bus software not included in GUNNS and isn't released. To get the most out of GUNNS, you either need to use the sim bus (as an internal NASA user) or replicate its functions on your own. See information about what the sim bus does in the Wiki.

The Gunnsmiths

GUNNS is managed by the Simulation & Robotics Division, Simulation & Graphics Branch at NASA Johnson Space Center.

GUNNS is developed by CACI International Inc. under contract to NASA. Contact info for our team can be found in the wiki.

ER7 Logo CACI Logo

Wiki

See the wiki for more information including tutorials, user & developer guides.

License

This software is released under the NASA Open Source Agreement Version 1.3 license.

Notices

Copyright © 2023 United States Government as represented by the Administrator of the National Aeronautics and Space Administration. No copyright is claimed in the United States under Title 17, U.S. Code. All Other Rights Reserved.

Disclaimers

No Warranty: THE SUBJECT SOFTWARE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY OF ANY KIND, EITHER EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY THAT THE SUBJECT SOFTWARE WILL CONFORM TO SPECIFICATIONS, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR FREEDOM FROM INFRINGEMENT, ANY WARRANTY THAT THE SUBJECT SOFTWARE WILL BE ERROR FREE, OR ANY WARRANTY THAT DOCUMENTATION, IF PROVIDED, WILL CONFORM TO THE SUBJECT SOFTWARE. THIS AGREEMENT DOES NOT, IN ANY MANNER, CONSTITUTE AN ENDORSEMENT BY GOVERNMENT AGENCY OR ANY PRIOR RECIPIENT OF ANY RESULTS, RESULTING DESIGNS, HARDWARE, SOFTWARE PRODUCTS OR ANY OTHER APPLICATIONS RESULTING FROM USE OF THE SUBJECT SOFTWARE. FURTHER, GOVERNMENT AGENCY DISCLAIMS ALL WARRANTIES AND LIABILITIES REGARDING THIRD-PARTY SOFTWARE, IF PRESENT IN THE ORIGINAL SOFTWARE, AND DISTRIBUTES IT "AS IS."

Waiver and Indemnity: RECIPIENT AGREES TO WAIVE ANY AND ALL CLAIMS AGAINST THE UNITED STATES GOVERNMENT, ITS CONTRACTORS AND SUBCONTRACTORS, AS WELL AS ANY PRIOR RECIPIENT. IF RECIPIENT'S USE OF THE SUBJECT SOFTWARE RESULTS IN ANY LIABILITIES, DEMANDS, DAMAGES, EXPENSES OR LOSSES ARISING FROM SUCH USE, INCLUDING ANY DAMAGES FROM PRODUCTS BASED ON, OR RESULTING FROM, RECIPIENT'S USE OF THE SUBJECT SOFTWARE, RECIPIENT SHALL INDEMNIFY AND HOLD HARMLESS THE UNITED STATES GOVERNMENT, ITS CONTRACTORS AND SUBCONTRACTORS, AS WELL AS ANY PRIOR RECIPIENT, TO THE EXTENT PERMITTED BY LAW. RECIPIENT'S SOLE REMEDY FOR ANY SUCH MATTER SHALL BE THE IMMEDIATE, UNILATERAL TERMINATION OF THIS AGREEMENT.

gunns's People

Contributors

jasonlharvey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

gunns's Issues

GunnsElectIps improvements

The core code was written during TS21 before we could get the herd of cats under control. Many code standards and styles were harmed.

  • clean up the class variables to match naming conventions and style. There are a lot of violations of mCamelBack, etc.
  • fix the malfunction terms to match the GUNNS naming convention, i.e. mMalfFlag, mMalfValue, etc.
  • drive the waste heat output. The class has variables to configure and output the waste heat, but it looks like they aren't driven.
  • clean up the code and comments style to match our conventions.

TRICK ICG workaround for GunnsFluidDistributedIf.hh

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.

  • make this update to clear up the problem with GunnsFluidDistributedIfData for now.
  • leave this issue open to work any other similar problems that come up, and to implement Trick's proper fix to ICG when it's available.

Add duty cycle to user loads

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.

Add NTO & MMH Liquid Propellants

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.

  • Fix negative density in MMH at high pressure and/or low temperature. Density trends downwards with increasing pressure which is wrong.
  • Update wiki with the new fluid types & ranges

Battery thermal updates

Add a few things to complete modeling the thermal state of batteries:

  • calculate waste heat as the battery current times the internal resistance, for output to the thermal aspect. Base class attribute mPower holds the useful electrical power output but doesn't include the waste heat. Add a new attribute to hold the waste heat.
  • add a simple thermal runaway malfunction to GunnsElectBattCell that rapidly discharges the cell and converts its stored energy into heat.
  • the battery's total heat output should include heat from the cells' thermal runaway malfunctions.

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.

More Power Converter Improvements

Improve GunnsElectConverterOutput to handle more off-nominal cases in the current and power output regulation modes:

  • compute and output the estimated downstream total load resistance
  • the output side should over-voltage trip when the output is open-circuited in the current and power control modes.
  • the power control model should control current as I = sqrt(P/R), where R is the estimated downstream total resistance, instead of I = P/V. This can handle cases where V = 0, like during startup, using the last estimate of R as a starting point.

netexport should protect for UnicodeEncodeError: 'ascii' codec can't encode character

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:

https://stackoverflow.com/questions/48347331/python-unicodeencodeerror-ascii-codec-cant-encode-character-in-position-0-o

Public access to GunnsFluidDistributedIf in & out data

An HLA packer class needs access to the mInData and mOutData in GunnsFluidDistributedIf.

  • make them public or add an accessor method
  • add an assignment operator function to GunnsFluidDistributedIfData for easy copying of data between the HLA packing object.
  • [ ]

Tunable exponent for fluid conductor flow curve

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.

Add auto-generated rev line to supexport.py output template

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.

GunnsDraw netexport and supexport should handle drawings exported as uncompressed XML

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.

  • Upgrade them to handle this uncompressed export from draw.io format as well.

GunnsDraw should handle errant &lt;div&gt; xml tags in object names

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.

  • strip out any XML tags from objects (links, spotters, etc.) names during the drawing maintenance phase of netexport.py

Release 19.3

Release minor version 19.3:

  • Review code changes
  • Update GunnsDraw version label & re-export all drawings
  • Final update to compile libs: make sure all new source folders are in the lib makefiles
  • Final update to compile libs: check linux (gcc) and OSX (clang) compilations, clean up all compile warnings
  • Final check all UT’s and test sims
  • Update wiki: Document new features
  • Update wiki: Add new GunnsDraw shape help pages
  • Update wiki: Update release notes
  • Tag final commit
  • Close issues & tag with release milestone
  • Email release news to the mailing list
  • Notify Software Release Coordinator of new release

Fix confusing info output of S_gunns.mk

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.

Release 19.2

  • update the release checklist wiki for our new life in github
  • release version 19.2.

Disabling Input Converter Trip Limit

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.

Add data logging to the integration tests

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.

  • define the Trick data logging setup in the test suite setup: which terms to log, logging rate, etc.
  • for some of test test assertions that are already made by the existing integrated test, repeat these assertions on the logged data.

Super-network drawing scalability improvement

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:

  • Sub-network drawings can have zero or more optional new "Sub-Network Interface" container boxes inside them.
  • Each box defines an interface between the parent subnet and other subnets in a supernet.
  • Each box has 1 or more 'interface nodes' (reference/normal or ground nodes).
  • The subnet's links can connect regular ports to these interface nodes.
  • When creating a supernet diagram, optionally import only these interface boxes and omit the rest of the sub-network contents.
    • This reduces clutter in the SN drawing as only interfaces boxes are present.
    • Imported interface boxes remember which sub-network link ports connect to them.
  • In the supernet drawing, compatible interface boxes (same # interface nodes) from different subnets can be connected.
    • This ties the interface nodes form each box together, 1-to-1, in order (top left to bottom right, etc.)
  • 2 or more boxes can be connected, but to be compatible, all boxes must have the same # of nodes, and each node set across the boxes can only have one reference/normal node, and the rest must be Ground. This avoids conflict over which sub-net's node is used.
  • On export, use the info in the tied interface nodes about which link ports are connected to make the link connections in the subnets
  • Add this to the existing supexport.py, so the same script can support both old & new formats.
    • if a subnet has interface boxes, omit the rest of it, else import all its details like before
  • Remain backwards compatible with old super drawings.
  • The result of the new design is the super drawings only have the interface boxes in them, which can be collapsed, and only a few connections to each, making for a very clean, high-level drawing

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.
Scalable_SuperNet

GunnsElectConverterInput solution reject problem

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.

Test all code for Trick library dependency errors

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.

  • Make a test Trick sim that rigorously checks for this kind of error in a class.
  • Make scripts that can skip tests for unneeded code or customize test code.
  • Make a script that can loop over all classes in the repo (use the lib/trick_if/S_sources.hh generated by the lib/trick make), skipping the pure virtual classes, and run the test sim on that class.
  • Add a CI workflow to test the whole repo.
  • Document CI workflows in the wiki.

Automate pressure head for fluid column under acceleration

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.

Complete basic interface for electrical links

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:

  • drive mFlux
  • drive mPotentialDrop
  • drive mPower
  • call transportFlux method to update nodes with in & out currents to enable KCL checks
  • call checkSpecificPortRules method to enforce valid node connections
  • call processUserPortCommand method to enable dynamic node mapping in runtime
  • implement the blockage malfunction

Simplify trace compounds-only flow in GunnsFluidSourceBoundary

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.

  • update GunnsFluidSourceBoundary to use this new interface, and simplify its TC-only code.

Add simple fuse model to user loads in GunnsElectUserLoadSwitch

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.

  • Add a fuse state to UserLoadBase, and config data for the fuse current limit above which it blows.
  • The fuses are downstream of the switch in GunnsElectUserLoadSwitch, and blow before the switch's own over-current trip is triggered.
  • Add a malfunction to force the fuse to blow on user input.
  • Add a way for the user and external models to reset the fuse.
  • This fuse model is optional and the default behavior of user loads and the GunnsElectUserLoadSwitch will be unchanged.
  • The fuse model will only be active when it is configured with a current limit > 0.

Add thermal aspect for solar array in example space vehicle sim

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.

  • add a thermal aspect for the solar array
  • integrate the electrical & thermal aspects through a GunnsThermalCapacitorHeatQueues spotter to demonstrate its use in queued sim bus interface between models of different rates.

Add a multi-separator fluid link

  • Make a new fluid conductor variant that can separate multiple fluid compounds from the bulk through-flow.
  • It should allow outside models to specify the fraction of each compound to be removed, rather than determine the fraction on its own.
  • It should allow up to 100% of the compound to be removed.
  • It should allow each compound to be sent to a separate exit node from the through-flow conductor nodes.
  • the GunnsDraw shape should look like a regular fluid conductor (resistor symbol) but adds a multi-colored arrow that curves off to the side
  • add the link help page to the Wiki
  • implement trace compounds
  • finishe the unit test

Add public access to set solver's slave potential vector

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.

Bad gSys limits in GunnsGasFan

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.

Add liquid hydrogen fluid type

A project needs to model either LH2 or very high pressure (non-real gas) H2 for a fuel cell application.

  • Add a new GUNNS_HYDROGEN fluid type to the FluidProperties class.
  • Add a new GUNNS_H2_REAL_GAS fluid type. Pressure should go up to at least 70 MPa.
  • Update the fluid properties wiki page.

Test gunnsdraw netexport in CI

  • Change SIM_test to export its network drawings at build-time. This will add some regression testing for netexport.py.

GunnsElectUserLoadSwitch.cpp missing library dependency on UserLoadBase

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.

Beginner help? None of the sims build.

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.

GunnsDraw netexport should catch mixing fluid & basic links

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.

Incorrect fluid conductance to nodes with no outflow

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.

gunnsdraw netexport.py bug in python 3.9

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.

GunnsFluidDistributedIf handle different mixture sizes in interface

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.

  • Add the ability to override the size of the target arrays for the interface to be different than the fluid network sizes.
  • Pad the extra unused values in the target interface arrays or fluid network arrays (whichever is larger) with zeroes.
  • Update the link help page

Pump/fan tuning helper spreadsheet max reference curve flow rate

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.

  • do it properly.

Yet another adsorber link

The endless quest for better adsorber models continues! Import the Toth isotherm-based GunnsFluidCdraAsborber link into the repo and make it more generic.

  • new link will be aspects/fluid/source/GunnsFluidSorptionBed
  • move the hardcoded sorbate/sorbant properties to a new properties class in ms-utils/properties.
  • allow sorbant properties for any number of sorbates
  • allow configurable sorbate loading interactions in each sorbant
  • allow sorbants to interact with sorbates as bulk compounds, trace compounds, or both. In the case of both, adsorb trace compounds first, and always desorb as bulk compounds.
  • model sorbate blocking, where a sorbate can block one or more sorbates in proportion to how much of it is adsorbed.
  • model sorbate co-adsorption, where a sorbate can block one or more sorbate in inverse proportion to how much of it is adsorbed.
  • allow sorbants to degrade and offgas trace compounds (for example, thermal amines offgas ammonia as they break down over time)
  • allow custom definition of new sorbant/sorbate properties, and overriding of existing properties via the input file,
  • allow a configurable number of sorbant segments instead of hardcoding the number
  • unit & integration test
  • create a new GunnsDraw shape in the fluid shapes library
  • create a new link help page in the wiki
  • for follow-on work: add sorbant properties for SA9T and 'Sorbead WS Zeolite'
  • for follow-on work: it might be useful to be able to define the equilibrium sorbate loading with something other than Toth isotherms, so extract the loading function from SorbateProperties and allow different implementations

Fluid type change conductor

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.

Implement CI

Get CI working like we had in ESGL GitLab. Other projects that might have good examples are Trick and TrickHLA.

  • run all unit tests
  • build & run sims/SIM_test
  • build & store the docker image (see comment below) Deleted, see comment below
  • store unit test artifacts (code coverage reports) Deleted, see comment below

GunnsFluidDistributedIf bullet-proofing

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.

  • Upgrade GunnsFluidHatch so that it disables the gas diffusion model if either node has zero volume. Diffusion is impossible in such cases anyway, since the zero volume has zero mass to diffuse.
  • Upgrade GunnsFluidDistributedIf to handle inflows from the network on its side that have negative mass fractions.
  • Upgrade GunnsFluidDistributedIf to handle negative mass fractions coming from the other side of the interface.
  • Upgrade GunnsFluidDistributedIf to add sanity limits on the exponent (mLoopLatency) in the pow function for lag gain. A bad frame loopback value from the other side of the interface could cause a large enough exponent to cause a math fault in the pow function. Limit the value to between 1-100 frames.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.