Skip to content
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

Open
wants to merge 25 commits into
base: develop
Choose a base branch
from

Conversation

Crazy-Rich-Meghan
Copy link

Perpendicular Flap with G+Smo (IsoGeometric Analysis) and OpenFOAM

NOTE: Stress instead of Force.

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.

@fsimonis fsimonis requested a review from uekerman December 9, 2024 12:50
Copy link
Member

@uekerman uekerman left a 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:

perpendicular-flap-stress/README.md Outdated Show resolved Hide resolved
perpendicular-flap-stress/README.md Outdated Show resolved Hide resolved
### Runnning the G+Smo Tutorial
Open two terminals and run:
```
cd solid-gismo-elasticity
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cd solid-gismo-elasticity
cd solid-gismo

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @uekerman,

We have another variant of this benchmark uses Kirichhoff-Love shell elememt and will be called solid-gismo-shell. While the KL shell variant has been verified for both accuracy and convergence, the implementation is currently hard-coded and needs to be generalized to support other examples.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we eventually keep both in the same folder and pick them within the run.sh script?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I renamed the folder. We can easily call different version from the same run script. Should we?

perpendicular-flap-stress/README.md Outdated Show resolved Hide resolved
perpendicular-flap-stress/README.md Outdated Show resolved Hide resolved
perpendicular-flap-stress/README.md Outdated Show resolved Hide resolved
perpendicular-flap-stress/README.md Outdated Show resolved Hide resolved
perpendicular-flap-stress/README.md Outdated Show resolved Hide resolved
perpendicular-flap-stress/solid-gismo-elasticity/clean.sh Outdated Show resolved Hide resolved
perpendicular-flap-stress/solid-gismo-elasticity/run.sh Outdated Show resolved Hide resolved
@uekerman
Copy link
Member

I am trying to install and run the case.

I am doing:

git clone gismo ... & cd gismo
mkdir build & cd build
cmake .. -DGISMO_OPTIONAL="gsKLShell;gsPreCICE;gsElasticity;gsStructuralAnalysis"
make solid-gismo-elasticity

and get

make: *** No rule to make target 'solid-gismo-elasticity'.  Stop.

And normal make works and gives me libgismo.so as expected.

I am a bit puzzled. How do I build the solid-gismo.cpp here? How does the adapter know about the available tutorials? Do I need to clone gismo into the tutorial case?

I guess what we need to do is to install the lib / make is discoverable and then add a CMakeLists.txt to the tutorial, which builds the actual solver?

@Crazy-Rich-Meghan
Copy link
Author

I am trying to install and run the case.

I am doing:

git clone gismo ... & cd gismo
mkdir build & cd build
cmake .. -DGISMO_OPTIONAL="gsKLShell;gsPreCICE;gsElasticity;gsStructuralAnalysis"
make solid-gismo-elasticity

and get

make: *** No rule to make target 'solid-gismo-elasticity'.  Stop.

And normal make works and gives me libgismo.so as expected.

I am a bit puzzled. How do I build the solid-gismo.cpp here? How does the adapter know about the available tutorials? Do I need to clone gismo into the tutorial case?

I guess what we need to do is to install the lib / make is discoverable and then add a CMakeLists.txt to the tutorial, which builds the actual solver?

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 perpendicular-flap-vertex-gismo.cpp I have also changed the filename to perpendicular-flap-vertex-gismo under this PR.

Since we have multiple CPP files on our side, we cannot use a simple name like solid-gismo-elasticity.cpp. We have discussed this internally and decided that in the next version, we will consolidate everything into a single CPP file. Additionally, we will specify the meshes, boundary conditions, participant names, and other configurations using an XML file.

@uekerman
Copy link
Member

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:

plot

The missing difference is probably due to the elements or refinement?

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 perpendicular-flap-vertex-gismo.cpp I have also changed the filename to perpendicular-flap-vertex-gismo under this PR.

The file perpendicular-flap-vertex-gismo.cpp here is not really needed, right? I now simply copied the executable over. And the name is fine. There is no standard for names of executables. The run.sh only needs to know the name.

I will continue cleaning up the case the next days. Please don't force push.

Comment on lines +43 to +46
```bash
cd solid-gismo
./run.sh
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could explain here how different variants could be run.


On the OpenFOAM side, you can open the `.foam` file with ParaView, or create VTK files with `foamToVTK`.

TODO: how can we visualize G+Smo results?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO


![Flap watchpoint](images/tutorials-perpendicular-flap-stress-displacement-watchpoint.png)

TODO: add picture
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add a picture once we are happy with the results.

Comment on lines +204 to +211
for ext in pvd vts vtp log txt; do
for file in **/*."$ext"; do
# Check if the file exists
[ -f "$file" ] && rm -f "$file"
done
done
rm -fv pointData.csv
rm -rfv ./output/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks still a bit arbitrary to me. Currently, the output folder is empty. Shouldn't the csv go there?

@uekerman uekerman marked this pull request as ready for review January 22, 2025 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants