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

[IgaApplication] Add Nurbs modeler for SBM #13009

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

NickNick9
Copy link
Contributor

📝 Description
We have added the NURBS Modeler SBM:

  1. It is a derived class from the existing NURBS modeler, which creates a rectangular domain.
  2. The first addition is the identification of surrogate boundaries for the inner and outer loops.
  3. The second addition is the creation of the surface and BREP curves from the surrogate boundaries.

In particular, we have developed two utilities: one to identify the surrogate boundaries and another to create the BREP entities. These utilities were created to enhance clarity and because they might be used separately in other applications.

Please mark the PR with appropriate tags:

  • IgaApplication

@NickNick9 NickNick9 requested review from a team as code owners January 14, 2025 10:43
@NickNick9 NickNick9 changed the title Add Nurbs modeler for SBM for IgaApplication [IgaApplication] Add Nurbs modeler for SBM Jan 14, 2025
@rickyaristio rickyaristio self-assigned this Jan 15, 2025
if (mParameters.Has("skin_model_part_inner_initial_name")) {
skin_model_part_inner_initial_name = mParameters["skin_model_part_inner_initial_name"].GetString();

if (!mpModel->HasModelPart(skin_model_part_inner_initial_name))
Copy link
Member

Choose a reason for hiding this comment

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

you can use KRATOS_ERROR_IF()

: mpModel->CreateModelPart(iga_model_part_name);

// Create the True Model Part -> contains all the true boundary features
std::string skin_model_part_inner_initial_name = "skin_model_part_inner_initial_name";
Copy link
Member

Choose a reason for hiding this comment

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

Wouls it be useful to set this name from the json file?

Copy link
Contributor

Choose a reason for hiding this comment

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

This is actually the "default" name which is overwritten few lines below if the "skin_model_part_inner_inner_initial_name" is provided in the json file.

//

#if !defined(KRATOS_NURBS_GEOMETRY_MODELER_SBM_H_INCLUDED )
#define KRATOS_NURBS_GEOMETRY_MODELER_SBM_H_INCLUDED
Copy link
Member

Choose a reason for hiding this comment

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

pragma once

#include "includes/model_part.h"
#include "nurbs_geometry_modeler.h"
#include "geometries/nurbs_volume_geometry.h"
#include "geometries/nurbs_surface_geometry.h"
Copy link
Member

Choose a reason for hiding this comment

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

can those includes go to the .cpp?

typedef Node NodeType;

typedef Geometry<NodeType> GeometryType;
typedef typename GeometryType::Pointer GeometryPointerType;
Copy link
Member

Choose a reason for hiding this comment

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

now we use using GeometryType = Geometry<NodeType>;


xy_coord_i_cond[0][0] = i_cond.GetGeometry()[0].X(); // x_true_boundary1
xy_coord_i_cond[1][0] = i_cond.GetGeometry()[0].Y(); // y_true_boundary1
xy_coord_i_cond[0][1] = i_cond.GetGeometry()[1].X(); // x_true_boundary2
Copy link
Member

Choose a reason for hiding this comment

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

idem

knot_spans_available[idMatrix][i][j] = 1; // The knot span is considered DEACTIVE
}

// exit(0);
Copy link
Member

Choose a reason for hiding this comment

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

remove?

IndexType idSnakeNode = id_first_node+1;

// Follow the clockwise loop
int end = 0;
Copy link
Member

Choose a reason for hiding this comment

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

SizeType?

// We are going orizontally
int direction = 0 ; // 0 = up_vertical, 1 = right_orizontal, 2 = down_vertical, 3 = left_orizontal
int I = start_i+1;
int J = start_j+1;
Copy link
Member

Choose a reason for hiding this comment

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

SizeType

//

#if !defined(KRATOS_SNAKE_SBM_UTILITIES_H_INCLUDED )
#define KRATOS_SNAKE_SBM_UTILITIES_H_INCLUDED
Copy link
Member

Choose a reason for hiding this comment

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

pragma once

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.

4 participants