OpenCCM is a CFD-based compartment modelling software package. It is primarily intended for convection dominated reactive flows which feature a weak or one-way coupling between the reactive species and the carrier fluid, i.e. the reaction does not substantially influence the fluid flow over the course of the simulation.
Most of the tests fail when I run them (main branch, commit 8ba12ae).
First, I note that the correct way to run the tests does not appear to be documented -- it requires running pytest from the pytests subdirectory, and does not work if you run pytest pytests/ from the root directory of the source tree.
The short summary of failures is as follows:
=============================== short test summary info ================================
FAILED test_run_examples.py::test_opencmp_cstr_reversible - NameError: name 'np' is not defined
FAILED test_run_examples.py::test_opencmp_cstr_irreversible - NameError: name 'np' is not defined
FAILED test_run_examples.py::test_opencmp_pfr - NameError: name 'np' is not defined
FAILED test_run_examples.py::test_opencmp_recirc - NameError: name 'np' is not defined
FAILED test_run_examples.py::test_openfoam_2d_pipe - ValueError: Specified folder (../examples/OpenFOAM/pipe_with_recirc/./) does not co...
======================== 5 failed, 1 passed, 1 warning in 3.13s ========================
The full output of pytest -v . is here:testlog.txt
I am not sure what the requirements for running the test suite are. Does it require that both OpenCMP and OpenFOAM are also installed? It might be better to include some small example input data that can be used for testing, rather than requiring a rather large dependency to be installed.
I'll be putting up a PR for this soon, see my comments below.
[x] I have included instructions specifying where to run the tests from.
[x] Most of the failures are due to the a numpy change when going from 1.2 to 2.0. #39 addresses it.
[x] The OpenFOAM failure was caused by unavailable velocity profiles. I have included one and modified the run instructions for it accordingly.
[x] I have also included code for auto-running OpenCMP for generating the data needed for the tests when they are run.
[x] Re: Requirements. For the currently available OpenFOAM tests I have included the velocity data required in native OpenFOAM format, but do not want to generally do this as the file sizes will quickly get out of hand. In order to run all of the tests OpenCMP is required to be installed. I have changed the OpenCMP tests to be skipped if OpenCMP is not installed if the end user only cares about OpenFOAM support. The need for OpenCMP installed for it's test are:
OpenCMP functionality is leveraged for file I/O.
We have considered including OpenCMP in our intermediary format, but that would require re-processing whenever the intermediary format or the conversion process is changed. Further, the tests would no longer be hitting the conversion steps. Finally it would increase the size of the repository and of the final installed package.
Most of the tests fail when I run them (
main
branch, commit 8ba12ae).First, I note that the correct way to run the tests does not appear to be documented -- it requires running
pytest
from thepytests
subdirectory, and does not work if you runpytest pytests/
from the root directory of the source tree.The short summary of failures is as follows:
The full output of
pytest -v .
is here:testlog.txtI am not sure what the requirements for running the test suite are. Does it require that both OpenCMP and OpenFOAM are also installed? It might be better to include some small example input data that can be used for testing, rather than requiring a rather large dependency to be installed.
This is in the context of the review for JOSS (https://github.com/openjournals/joss-reviews/issues/6963).