Skip to content

Commit

Permalink
Merge pull request #929 from AlbertoCuadra/fix-typo-header
Browse files Browse the repository at this point in the history
Solve: fix typo header
Former-commit-id: e2d23d5
  • Loading branch information
AlbertoCuadra authored Jan 25, 2024
2 parents 9a8f49a + c53b6e0 commit 8d12a0a
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 12 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/submodule_update_parent.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: 'Send submodule updates to parent repository'

on:
push:
branches:
- master

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
update:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
repository: AlbertoCuadra/combustion_toolbox_website
token: ${{ secrets.CI_TOKEN }}
submodules: true

- name: Pull & update submodules recursively
run: |
git submodule update --init --recursive
git submodule update --recursive --remote
- name: Commit
run: |
git config user.email "[email protected]"
git config user.name "GitHub Actions - update submodules"
git checkout main
git add --all
git commit -m "Update submodules" || echo "No changes to commit"
git push
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ This project is also part of the PhD of [Alberto Cuadra-Lara](https://www.acuadr

* The [tutorial](https://combustion-toolbox-website.readthedocs.io/en/latest/tutorial.html) will help you get started using Combustion Toolbox on your pc.
* See [examples](https://combustion-toolbox-website.readthedocs.io/en/latest/examples.html) of Combustion Toolbox applications.
* Check the [documentation](https://combustion-toolbox-website.readthedocs.io/en/latest/documentation/index.html) of almost every functions.
* Check the [documentation](https://combustion-toolbox-website.readthedocs.io/en/latest/) of almost every functions.

## Gallery

Expand Down
6 changes: 3 additions & 3 deletions utils/databases/find_products.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
%
% Examples:
% * [LS, ind_elements_DB] = find_products(self, {'O2', 'N', 'eminus'})
% * [LS, ind_elements_DB] = find_products(self, {'O2', 'CO', 'N'}, DB, 'flag_burcat', true)
% * [LS, ind_elements_DB] = find_products(self, {'O2', 'CO', 'N'}, DB, 'flag_burcat', true, 'flag_ion', true)
% * [LS, ind_elements_DB] = find_products(self, {'O2', 'CO', 'N'}, DB, 'flag_burcat', true, 'flag_ion', true, 'ind', ind_elements_DB)
% * [LS, ind_elements_DB] = find_products(self, {'O2', 'CO', 'N'}, 'flag_burcat', true)
% * [LS, ind_elements_DB] = find_products(self, {'O2', 'CO', 'N'}, 'flag_burcat', true, 'flag_ion', true)
% * [LS, ind_elements_DB] = find_products(self, {'O2', 'CO', 'N'}, 'flag_burcat', true, 'flag_ion', true, 'ind', ind_elements_DB)

% Definitions
MAX_ELEMENTS = 5;
Expand Down
28 changes: 20 additions & 8 deletions utils/databases/generate_DB.m
Original file line number Diff line number Diff line change
@@ -1,34 +1,46 @@
function DB = generate_DB(DB_master)
function DB = generate_DB(DB_master, varargin)
% Generate Database (DB) with thermochemical interpolation curves for
% the species contained in DB_master
%
% Args:
% DB_master (struct): Database with the thermodynamic data of the chemical species
%
% Optional Args:
% LS (cell): List of species to be included in DB
%
% Returns:
% DB (struct): Database with custom thermodynamic polynomials functions generated from NASAs 9 polynomials fits
%
% Example:
% DB = generate_DB(DB_master)
% Examples:
% * DB = generate_DB(DB_master)
% * DB = generate_DB(DB_master, {'CO2', 'H2O', 'O2', 'N2'})

% Default
LS = fieldnames(DB_master);

% Check initial inputs
if nargin > 1
assert(iscell(varargin{1}), 'List of species must be a cell.');

LS = varargin{1};
end

% Load database
if exist('DB.mat', 'file')
if exist('DB.mat', 'file') && nargin == 1
fprintf('NASA database with thermo loaded from main path ... ')
load('DB.mat', 'DB');
else
DB = get_DB(DB_master);
DB = get_DB(DB_master, LS);
end

fprintf('OK!\n');
end

% SUB-PASS FUNCTIONS
function DB = get_DB(DB_master)
function DB = get_DB(DB_master, LS)
% Generate Database (DB) with thermochemical interpolation curves for
% the species contained in DB_master

LS = fieldnames(DB_master);

fprintf('Generating NASA database with thermo ... ')

for i = 1:length(LS)
Expand Down

0 comments on commit 8d12a0a

Please sign in to comment.