-
-
Notifications
You must be signed in to change notification settings - Fork 25
Add functionality for volumetric multiscale coupling to micro-mechanics simulations #135
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: develop
Are you sure you want to change the base?
Conversation
…le to another repo
…nto helper functions
…n consistent with Node or Face based functions
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.
A first round of comments after reading through most files and mostly skimming through adapter/PreciceInterface.c
and linstatic_precice.c
. Let's go through these files together as well.
Some of my comments are not necessarily something to act upon, just something for my own understanding.
SCCXC += nonlingeo_precice.c dyna_precice.c CCXHelpers.c PreciceInterface.c | ||
SCCXF += getflux.f getkdeltatemp.f | ||
SCCXC += nonlingeo_precice.c dyna_precice.c CCXHelpers.c PreciceInterface.c linstatic_precice.c | ||
SCCXF += getflux.f getkdeltatemp.f getc3d8elementgausspointcoords.f getc3d4elementgausspointcoords.f |
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.
Do I understand correctly that these files are completely written for the adapter, and not included in the original CalculiX source code? In that case, I wonder if they should better be under adapter/
or another new folder. What is the motivation for putting them outside?
The operations they define are specific to the adapter, right?
for (i = istartset[setID] - 1; i < iendset[setID]; i++) { | ||
elements[k] = ialset[i]; | ||
k++; | ||
} |
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.
Do we need some kind of bound check for k
? What is the size of elements
supposed to be?
@@ -409,6 +420,18 @@ int getXloadIndexOffset(enum xloadVariable xloadVar) | |||
} | |||
} | |||
|
|||
void getElementStrain(int strainIdx, int numIPTotal, double *eei, double *strainData) |
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.
This function uses int
for ids and sizes, but other functions use ITG
. What is ITG
, and is it a better-fitting type?
Same for the other two new functions.
int i, idx; | ||
// Loop through all element and respective gauss points | ||
for (i = 0; i < numIPTotal; i++) { | ||
idx = i * 6 + strainIdx; //TODO: Add explanation for 6 |
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.
yes, please. Two similar points below.
* @brief Gets the strain values at each Gauss point of each element | ||
* @param strainIdx: CalculiX variable for the index of the strain values | ||
* @param numIPTotal: CalculiX variable for the number of elements | ||
* @param eei: CalculiX array for the element integration information |
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.
What does eei
stand for? Is there a more intuitive name?
I guess this comes from some CalculiX-internal variable name, but I am still wondering.
integer :: kon(*) | ||
integer :: ipkon(*) |
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.
Description missing.
Same in the C3D8 file.
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.
A summary of the preCICE-related changes would be helpful when upgrading to newer CalculiX versions.
*sim->dtheta = 1; | ||
*sim->theta = 0; | ||
*sim->tper = 1; | ||
//*sim->dtheta = 1; |
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.
Why removed?
Maybe fully remove?
@@ -315,7 +380,7 @@ void Precice_WriteCouplingData(SimulationData *sim) | |||
sim->istartset, | |||
sim->iendset, | |||
sim->ipkon, | |||
sim->lakon, | |||
*sim->lakon, |
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.
Is lakon
a pointer?
Was this wrong before, or needed now because the type changed?
Does this need to be updated anywhere else?
@@ -804,6 +1000,7 @@ void PreciceInterface_FreeData(PreciceInterface *preciceInterface) | |||
free(preciceInterface->writeData); | |||
free(preciceInterface->elementIDs); | |||
free(preciceInterface->faceIDs); | |||
free(preciceInterface->nodeIDs); |
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.
How come we previously had elementIDs
but not nodeIDs
?
This PR is derived from #118 and adds functionality for volumetric coupling to micro-mechanics simulations. The functionality is primarily contributed by @kalupaika. This PR is branched from the feature branch of #118 because #118 contains code which is specific to coupling a macro-scale CalculiX simulation to many micro-scale NASMAT simulations. This PR contains the functionality:
The implemented functionality is tested for steady-state simulations only. To incorporate the features for transient simulations, an appropriate test case would need to be devised.