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 34 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
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/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
Crazy-Rich-Meghan and others added 2 commits December 16, 2024 08:28
Co-authored-by: Benjamin Uekermann <benjamin.uekermann@gmail.com>
@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.

perpendicular-flap-stress/README.md Show resolved Hide resolved
perpendicular-flap-stress/README.md Outdated Show resolved Hide resolved
perpendicular-flap-stress/README.md Outdated Show resolved Hide resolved
tools/cleaning-tools.sh Show resolved Hide resolved
@uekerman uekerman marked this pull request as ready for review January 22, 2025 17:56
perpendicular-flap-stress/plot-displacement.sh 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

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.

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

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.

Comment on lines +204 to +210
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
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
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

@Crazy-Rich-Meghan Only removing the output folder should be enough, right? I assume this name is currently hard-coded into the solver, right? (no problem, I just want to understand)

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