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 with shell element #17

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Crazy-Rich-Meghan
Copy link
Contributor

  • Use shell mid-plane to represent elasticity
  • Coupled with OpenFOAM via vertex-vertex communication method
  • Use volume for visualization

@Crazy-Rich-Meghan Crazy-Rich-Meghan added the enhancement New feature or request label Mar 20, 2025
@Crazy-Rich-Meghan Crazy-Rich-Meghan self-assigned this Mar 20, 2025
Copy link
Member

@hverhelst hverhelst left a comment

Choose a reason for hiding this comment

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

There are quite some left-over sections commented out, and gsDebugVar calls left in the code. Would be nice to give it a small clean-up.
In addition, try to comment a bit more sections. Maybe we can accompany the file with a .dox file, so that it'll be documented immediately; this is a good practice anyay.
Lastly, it would be nice to have the update of the shell volume (inside the time-loop) as just a function call,i.e. constructShellVolume(mid_surface,thickness) (and maybe some direction to indicate which direction the thickness acts). Is this possible?

#include <gsPreCICE/gsLookupFunction.h>

#include <gsAssembler/gsExprEvaluator.h>
// #include <gsPreCICE/gsPreCICEVectorFunction.h>
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
// #include <gsPreCICE/gsPreCICEVectorFunction.h>

Comment on lines +29 to +31
#include <gsKLShell/src/gsMaterialMatrixContainer.h>
#include <gsKLShell/src/gsMaterialMatrixEval.h>
#include <gsKLShell/src/gsMaterialMatrixIntegrate.h>
Copy link
Member

Choose a reason for hiding this comment

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

These should not be needed. Please test

Suggested change
#include <gsKLShell/src/gsMaterialMatrixContainer.h>
#include <gsKLShell/src/gsMaterialMatrixEval.h>
#include <gsKLShell/src/gsMaterialMatrixIntegrate.h>

#endif

using namespace gismo;
const double PI = 3.14159265;
Copy link
Member

Choose a reason for hiding this comment

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

Unused

Suggested change
const double PI = 3.14159265;

Comment on lines +86 to +89




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

<< "----------------------\n\n";

// 1. construction of a knot vector for each direction
// 1. Construction of knot vectors for each direction
Copy link
Member

Choose a reason for hiding this comment

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

Why are the comments double?

Suggested change
// 1. Construction of knot vectors for each direction

Comment on lines +301 to +302

gsDebugVar(quad_shell_xy);
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
gsDebugVar(quad_shell_xy);

Comment on lines +304 to +308

// gsMatrix<> displacementData = gsMatrix<>::Zero(3, comPt.rows());
// displacementData.setRandom();


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
// gsMatrix<> displacementData = gsMatrix<>::Zero(3, comPt.rows());
// displacementData.setRandom();

Comment on lines +435 to +439
// gsMatrix<> points(2, 1);
// points.col(0) << 0.5, 1;

// gsStructuralAnalysisOutput<real_t> writer("./output/pointData.csv", points);
// writer.init({"x", "y", "z"}, {"time"}); // point1 - x, point1 - y, point1 - z, time
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
// gsMatrix<> points(2, 1);
// points.col(0) << 0.5, 1;
// gsStructuralAnalysisOutput<real_t> writer("./output/pointData.csv", points);
// writer.init({"x", "y", "z"}, {"time"}); // point1 - x, point1 - y, point1 - z, time

Comment on lines +455 to +465

// gsMatrix<> deformed_thickness(greville.cols(), 3);

// for (index_t k = 0; k != quad_uv.rows(); k++)
// {
// N_shell.row(k) = ev.eval(sn(G_shell).normalized(), quad_uv.row(k));
// deformed_thickness.row(k) = N_shell.row(k) * T_shell(0, k);
// }

gsDebugVar("Got here 3");

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
// gsMatrix<> deformed_thickness(greville.cols(), 3);
// for (index_t k = 0; k != quad_uv.rows(); k++)
// {
// N_shell.row(k) = ev.eval(sn(G_shell).normalized(), quad_uv.row(k));
// deformed_thickness.row(k) = N_shell.row(k) * T_shell(0, k);
// }
gsDebugVar("Got here 3");

Comment on lines +485 to +502

// assembler.assemble();
// F = assembler.rhs();

gsDebugVar(bcInfo);

participant.readData(SolidMesh, StressData, quadPointIDs, ForceData);



// Is this really an average? (maybe need to consider normal vector)
gsDebugVar(ForceData.rows());
gsDebugVar(ForceData.cols());
gsDebugVar(N.rows());
gsDebugVar(N.cols());
gsDebugVar(quadPointsData.rows());
gsDebugVar(quadPointsData.cols());
gsDebugVar(quad_uv.cols());
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
// assembler.assemble();
// F = assembler.rhs();
gsDebugVar(bcInfo);
participant.readData(SolidMesh, StressData, quadPointIDs, ForceData);
// Is this really an average? (maybe need to consider normal vector)
gsDebugVar(ForceData.rows());
gsDebugVar(ForceData.cols());
gsDebugVar(N.rows());
gsDebugVar(N.cols());
gsDebugVar(quadPointsData.rows());
gsDebugVar(quadPointsData.cols());
gsDebugVar(quad_uv.cols());

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants