-
-
Notifications
You must be signed in to change notification settings - Fork 116
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
Perpendicular flap (IGA solid participant G+Smo) #603
base: develop
Are you sure you want to change the base?
Perpendicular flap (IGA solid participant G+Smo) #603
Conversation
…stress; Modified precice-config.xml to communicate with stress
…ty-stress
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.
Thanks for these great contributions!
I did not yet try it out, but wanted to give some initial tips already.
Guidelines worth checking out:
- tutorials contribution guidelines
- style guide of the preCICE docs.
… scripts
Co-authored-by: Benjamin Uekermann <[email protected]>
I am trying to install and run the case. I am doing:
and get
And normal I am a bit puzzled. How do I build the I guess what we need to do is to install the lib / make is discoverable and then add a |
Hi Benjamin, Thanks for testing this! The thing is, if you try to compile the file from the G+Smo side, we are using a different name for the filename since G+Smo and preCICE have different naming rules. On the G+Smo side, the solid participant filename is Since we have multiple CPP files on our side, we cannot use a simple name like |
With a few minor changes, I was able to run the case. Most importantly, I changed the data mapping constraint for the stresses to "consistent". I now get: The missing difference is probably due to the elements or refinement?
The file I will continue cleaning up the case the next days. Please don't force push. |
|
||
As we defined a watchpoint on the 'Solid' participant at the flap tip (see `precice-config.xml`), we can plot it with gnuplot using the script `plot-displacement.sh.` You need to specify the directory of the selected solid participant as a command line argument, so that the script can pick-up the desired watchpoint file, e.g. `plot-displacement.sh solid-gismo`. The resulting graph shows the x displacement of the flap tip. You can modify the script to plot the force instead. | ||
|
||
 |
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, we don't need to show all other variants here. One non-linear one (e.g. deal.II) could be enough.
And we need a brief sentence that we have not yet found the reason for the difference.
@Crazy-Rich-Meghan The results look good now 👍 What did you change? |
Hi @uekerman , for the nonlinear version we iterate with Jacobian matrix, and the linear version with stiffness matrix. In principle, if the problem we are solving is a linear problem, the nonlinear time integrator should converge within the first timestep and result should be the same as time-integrator with stiffness matrix, that's why you see they are overlapping. And we checked the source code from dealii, in linear_elasticity there is no geometric nonlinearlity so we changed a bit from our side. |
Co-authored-by: Benjamin Uekermann <[email protected]>
fce67e9
to
a69bc8e
Compare
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.
Thanks a lot for the contribution! Looks already very neat! I also compared the differences to the perpendicular-flap and it looks very clean. I also think that it is fine having this as a separate subcase, and I expect we will have more solvers opting for stresses instead of forces.
I could not run the case, but maybe I am doing something wrong, or something still needs to be documented. Other than that, this is in good shape already.
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.
Trying to run this, I get, in the beginning, on the Fluid:
---[precice] Automatic RBF mapping alias from mesh "Solid-Mesh" to mesh "Fluid-Mesh" in "read" direction resolves to "partition-of-unity RBF" .
---[precice] Computing "partition-of-unity RBF" mapping from mesh "Solid-Mesh" to mesh "Fluid-Mesh" in "read" direction.
---[precice] ERROR: The interpolation matrix of the RBF mapping from mesh "Solid-Mesh" to mesh "Fluid-Mesh" is not invertable. This means that the mapping problem is not well-posed. Please check if your coupling meshes are correct (e.g. no vertices are duplicated) or reconfigure your basis-function (e.g. reduce the support-radius).
and the Solid waits with:
Solving timestep 0...
It. |R|/|R0| |dU|/|U0|
0 0 0
Finished
---[precice] relative convergence measure: relative two-norm diff of data "Displacement" = inf, limit = 5.00e-03, normalization = 0.00e+00, conv = true
---[precice] relative convergence measure: relative two-norm diff of data "Stress" = inf, limit = 5.00e-03, normalization = 0.00e+00, conv = true
---[precice] All converged
---[precice] WARNING: The coupling residual equals almost zero. There is maybe something wrong in your adapter. Maybe you always write the same data or you call advance without providing new data first or you do not use available read data. Or you just converge much further than actually necessary.
---[precice] WARNING: The IQN matrix has no columns.
---[precice] Time window completed
---[precice] Mapping "Stress" for t=0.01 from "Fluid-Mesh" to "Solid-Mesh"
---[precice] iteration: 1 of 50 (min 1), time-window: 2, time: 0.01 of 5, time-window-size: 0.01, max-time-step-size: 0.01, ongoing: yes, time-window-complete: yes, write-iteration-checkpoint
Am I missing something?
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.
Hi Makis,
Thanks for testing! I tested this PR with a clean clone. I did not run into this problem.
My procedure is:
- cloned this pr
- cloned a clean G+Smo
- in the build folder of G+Smo, I included submodule: gsPreCICE;gsKLShell;gsElasticity;gsStructuralAnalysis
- make perpendicular-flap-vertex-gismo
- sudo make install perpendicular-flap-vertex-gismo
- switched back to the pr, and run the run.sh script in fluid-openfoam and solid-gismo
I am able to run this example following these steps and I could not replicate the issue here.
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 tried again, after pulling the latest state of this branch and of Gismo:
- Tutorials
perpendicular-flap-gismo-elasticity-stress
Mar 24 (bd0610f) - Gismo
stable
Mar 23 (390eaf68de077ecddb5ae9f899fa88bf8a84a244) - preCICE
develop
Mar 21 (6c1b8590c1895502443901f73bdde71a53d776f2) withPRECICE_FEATURE_PETSC_MAPPING ON
andPRECICE_FEATURE_GINKGO_MAPPING OFF
- OpenFOAM v2406
- OpenFOAM adapter
develop
Mar 21 (fc16b305bd43f455b9ce044acadd42c56b52fdf4) - Running on my laptop: Ubuntu 22.04, Eigen 3.4.0, PETSc 3.15.
Same error.
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.
@Crazy-Rich-Meghan which state of preCICE are you using? I can try checking with that, to exclude any bugs in preCICE develop
.
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.
It worked for me previously, but I am now trying to mimic @MakisH 's setup.
I, however, get an error when trying to build that version of gismo:
Building CXX object optional/gsElasticity/CMakeFiles/gsElasticity.dir/gsBiharmonicAssembler_.cpp.o
In file included from /home/uekermbn/Repos/gismo/optional/gsElasticity/gsBaseAssembler.h:17,
from /home/uekermbn/Repos/gismo/optional/gsElasticity/gsBiharmonicAssembler.h:17,
from /home/uekermbn/Repos/gismo/optional/gsElasticity/gsBiharmonicAssembler_.cpp:3:
/home/uekermbn/Repos/gismo/src/gsAssembler/gsAssembler.h: In instantiation of ‘void gismo::gsAssembler<T>::apply(ElementVisitor&, size_t, gismo::boxSide) [with ElementVisitor = gismo::gsVisitorBiharmonicMixed<double>; T = double; size_t = long unsigned int]’:
/home/uekermbn/Repos/gismo/src/gsAssembler/gsAssembler.h:462:13: required from ‘void gismo::gsAssembler<T>::push(const ElementVisitor&) [with ElementVisitor = gismo::gsVisitorBiharmonicMixed<double>; T = double]’
/home/uekermbn/Repos/gismo/optional/gsElasticity/gsBiharmonicAssembler.hpp:93:54: required from ‘void gismo::gsBiharmonicAssembler<T>::assemble(bool) [with T = double]’
/home/uekermbn/Repos/gismo/optional/gsElasticity/gsBiharmonicAssembler_.cpp:8:25: required from here
/home/uekermbn/Repos/gismo/src/gsAssembler/gsAssembler.h:721:27: error: cannot convert ‘gismo::gsBasis<double>::domainIter’ {aka ‘gismo::gsDomainIteratorWrapper<double>’} to ‘gismo::gsDomainIterator<double>&’
721 | visitor_.assemble(domIt, quWeights);
| ^~~~~
| |
| gismo::gsBasis<double>::domainIter {aka gismo::gsDomainIteratorWrapper<double>}
In file included from /home/uekermbn/Repos/gismo/optional/gsElasticity/gsBiharmonicAssembler.hpp:20,
from /home/uekermbn/Repos/gismo/optional/gsElasticity/gsBiharmonicAssembler_.cpp:4:
/home/uekermbn/Repos/gismo/optional/gsElasticity/gsVisitorBiharmonicMixed.h:74:48: note: initializing argument 1 of ‘void gismo::gsVisitorBiharmonicMixed<T>::assemble(gismo::gsDomainIterator<T>&, const gismo::gsVector<T>&) [with T = double]’
74 | inline void assemble(gsDomainIterator<T> & element,
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
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.
@hverhelst Thanks for the quick reaction. I wasn't aware that this is necessary. I now used a fresh clone again.
And indeed I also run into the same problem as @MakisH
- Tutorials: same as @MakisH
- Gismo: same as @MakisH
- preCICE develop Mar 24 (5909d6548) (PETSc off), almost the same as @MakisH
- OpenFOAM v2212
- OpenFOAM adapter v1.3.1
- Ubuntu 20.04, Eigen 3.4.0
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.
Okay, that's somehow good. I think @Crazy-Rich-Meghan is on it right now. I'll wait for her response.
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 get a similar problem with preCICE v3.1.2
---[precice] ERROR: The interpolation matrix of the RBF mapping from mesh "Solid-Mesh" to mesh "Fluid-Mesh" is not invertable. This means that the mapping problem is not well-posed. Please check if your coupling meshes are correct (e.g. no vertices are duplicated) or reconfigure your basis-function (e.g. reduce the support-radius).
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.
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.
And it is a 3D mesh, so duplicated vertices for a mapping in 2D, which explains the error.
@hverhelst Did you change anything in the adapter in this direction recently?
Co-authored-by: Gerasimos Chourdakis <[email protected]>
I tried to do it as Makis suggested and I arrived at the similar error. So I set back G+Smo and submodules few commits and now it worked for me:
And my PC is Ubuntu 24.04. @hverhelst Maybe you have an idea about what is going wrong here, could be related to one of the recent commits to G+Smo. |
Perpendicular Flap with G+Smo (IsoGeometric Analysis) and OpenFOAM
NOTE:
Stress
instead ofForce
.This PR is still a draft, because the G+Smo adapter's documentation is still ongoing.
I have added a README.md file to guide users on running the tutorial with G+Smo. It includes detailed instructions for setup and execution.