Open luohancfd opened 1 month ago
NetworkX
The package is currently listed as an optional requirement as it isn't needed for the main functionality of the package. It's only needed for certain optional post processing functionality, specifically if network_diagram
is set to True
, which is the current default.
network_diagram
is set to False
in the config file? (It goes under POST-PROCESSING
). If so, this is an oversight on my part as the imports were supposed to be wrapped so that they would only be called when that flag was used.network_diagram
in their config file or by changing the default value, such that they do not use the NetworkX code path be an acceptable solution?RTD I will look into incorporating that calculation script into the OpenCMP example provided, as that example and the simulation from the paper are derived from the same source.
Symlink I will take a look and test alternatives for symlinking. I'm thinking automatically falling back to a plain file copy, and displaying a warning, would be preferable to throwing the error.
This would let the user know that a faster alternative is available, but does not force them to run with admins privileges, which may be an impossible expectation in certain corporate engineering settings. And it would generally be less risky for the user to not have to run it with admin privileges.
@luohancfd Hi there, let me know if the changes in #38 properly address your above comments.
@Alex-Vasile
I'm struggling with the example cases and need your help to address them.
examples/OpenCMP
: I assume config_Stokes
generates and initial guess, config_INS
is for single specie transient incompressible flow simulation, config_MCINS
is for multi-species one. Although the usage of OpenCMP is beyond the topic of this repo, it's better to document that. I ran the config_Stokes case successfully. But the config_INS
case took extensive time. Is it really necessary to run to 5000s? The same reason applies to the config_MCINS
. I found I can still run the compartment modeling part with the time_range
reduced to 30s and get similar plot by running analysis.py
. If it's really necessary, please provide an example output. I found you have results published https://www.sciencedirect.com/science/article/pii/S0098135424000681?via%3Dihub for config_INS
but nothing for config_MCINS
. Besides, I'm a little confused why you can compare the compartment modeling with the config_MCINS
. In the compartment modeling, it seems you are modeling an almost irrevisble reaction Na2CO3 + CaCl2 -> 2NaCl + CaCO3
(I assume this is gas phase reaction). But I couldn't understand what the case config_MCINS
is doing. According to this tutorial case https://opencmp.io/tutorials/tutorial_8.html, you are solving an additional mass conservation equation as a
. But I couldn't find a similar [SURFACE_RXN]
block. You do have a block named [FUNCTIONS]/source
in file model_config
, but it's 0 for a
. I personally feel it's OK to not explain every details of a case, especially when the case is targeted for a specific academic usage. But if you decide to publish your code, it's better to let the user understand what is going on for the example cases.examples/OpenFOAM
: I built OpenFOAM-12 download link https://openfoam.org/download/12-source/, sha256 are listed here in case it matters : e59fad54c62e64f1bb89dbaebe5f99a76dc0a6a91d9aad86042a7c4cef6d0744 OpenFOAM-12.tar.gz 8159763451f714387a3846e9c09717533f293107204a3ad470e4acbaa8ce356b ThirdParty-12.tar.gz. I didn't change the mesh. So I just renamed folder "_0" to "0", and invoke foamRun
(step 5 in your instruction). I didn't see any difference of T
and Vc
for 0 and 300. Is that the expected behavior? In you instruction, you mentioned
- Open
controlDict
, comment out the solve line withincompressibleFluid
and uncomment the two lines below it defining a new solve and subSulver, finally uncomment the#includeFunc scalarTransport
line at the bottom of the file.
But the file you posted https://github.com/uw-comphys/openccm/blob/a18be55ddb1fb0f0f501c3f7d38c4b68cab9b51f/examples/OpenFOAM/pipe_with_recirc/system/controlDict#L19-L24
has already uncommented the lines.
If this is a mistake, please fix it. Also, please provide a tagged frozen version for review. While I'm writting this comment, I see a new PR get merged.
pytests
: I failed to run the tests due to missing files from the examples
folder. Please correct the examples, or provide independent test files that don't rely on other data/folder.@luohancfd
I looked into it a bit more, and I'll include some of the pre-computed files. To clarify some of your other points.
pipe_recird_2d
:
CONFIG
: Creates a compartmental model and then runs an inert tracer simualtion on it for calculating residence time. This is the same as the CFD simulation described by CONFIG_MCINS
. This simulation is what gets compared to the CFD results.CONFIG_W_RXN
: This also creates a compartmental model but it shows how to run a reactive species simulation, using a reversible reaction and chemical specie variable names. This is simulation is not compared to any CFD.The 0/
directory contains the pre-computed steady-state results. The instructions state that if you wish to use these results and go straight to running the inert tracer CFD simulation to skip to step 13. I have changed the wording to make this more clear.
The tests should have all of the data they need, I updated them in another PR to generate any input data they need. However, They need to be run from inside the pytest folder. #43 addresses this issue. Once that's merged the tests can be run using the openccm-tests
entry point from any directory.
See #49 for changed related to these comments.
Hi authors! I have a few comments regarding to the review.
NetworkX
should be added as a required packageos.symlink
. It might be good to throw an error if the requirement is not met at the beginning.