-
Notifications
You must be signed in to change notification settings - Fork 11
add function object for solidification data #74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Can you add a PR description that mentions "closes issue #" to link and close this issue once this is merged? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will need to test visualizing after the concatenation of the data, but compiles and runs for me.
Compiles, runs, and visualization of the data looks good to me.
Not completely necessary to address here, but preferably there would some documentation either in a tutorial README or in the github.io site on how to use these new features.
solidificationData | ||
{ | ||
libs ("libadditiveFoamFunctionObjects.so"); | ||
|
||
type solidificationData; | ||
|
||
box (-1 -1 -1) (1 1 1); | ||
isoValue 1620; | ||
} | ||
/* | ||
ExaCA | ||
{ | ||
libs ("libadditiveFoamFunctionObjects.so"); | ||
type ExaCA; | ||
box (0 -0.0001 -0.0002) (0.002 0.0001 0); | ||
dx 2.5e-6; | ||
isoValue 1620; | ||
} | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider leaving the tutorial behavior the same so that it outputs the ExaCA data (or both).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the previous -withExaCA flag would use foamDictionary to reset the functions dictionary in system/controlDict. The problem with this, is that it would delete solidificationData function object if ran without the -withExaCA flag, which might not be desirable. I tried to get this working with sed, but ultimately gave up and just allowed the user to comment and uncomment the function objects they want manually. Any ideas on how we should treat this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think manual commenting/uncommenting is fine, just don't want to have the tutorial behavior change significantly without warning. Maybe leave a warning that prints out in Allrun saying that the -withExaCA
flag is deprecated and that you have to update the controlDict
as desired?
if [ "$withExaCA" = true ]; then | ||
foamDictionary -entry functions -set "{#includeFunc ExaCA}" system/controlDict | ||
else | ||
foamDictionary -entry functions -set "{}" system/controlDict | ||
fi | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(comment for later in this file) The default behavior for Allrun should be to concatenate the decomposed solidificationData files similar to the ExaCA file behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to leave the header in each of the decomposed files, I found this option for tail
to be useful for concatenation:
echo "x,y,z,t,R,G,V" > combined_solidification_data.csv
tail -q -n+2 solidificationData/data_*.csv >> combined_solidification_data.csv
rm -rf solidificationData/data_*.csv
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah we should probably modify the ExaCA function object as well so that each processor outputs a header, but we skip it when concatenating files
No description provided.