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

Unable to deform using "specifiedSurfaces" #85

Open
sreekar2858 opened this issue Aug 17, 2023 · 6 comments
Open

Unable to deform using "specifiedSurfaces" #85

sreekar2858 opened this issue Aug 17, 2023 · 6 comments

Comments

@sreekar2858
Copy link

Description

Hello
I am using OpenFOAM case to morph a face using IDWarp.
The geometry is a cuboid as the following picture. The specifiedSurfaces are marked in red.
image

I defined the python script as follows:

import os
from mpi4py import MPI
from idwarp import USMesh
from pyofm import *
import numpy as np

options = {
  'gridFile':os.getcwd(),
  'fileType':'OpenFOAM',
  'specifiedSurfaces':["inner_walls"],
  'symmetrySurfaces':[],
  'symmetryPlanes':[],
  'aExp': 3.0,
  'bExp': 5.0,
  'LdefFact':1.0,
  'alpha':0.25,
  'errTol':0.000001,
  'evalMode':'fast',
  'useRotations':True,
  # 'zeroCornerRotations':True,
  'cornerAngle':30.0,
  'bucketSize':8,
}

# Create the mesh object
mesh = USMesh(options=options, comm=MPI.COMM_WORLD)

# Extract all coordinates
coords0 = mesh.getSurfaceCoordinates()

# Modify the coordinates as required
newCoords = coords0.copy()

for i in range(0,coords0.shape[0]):
    newCoords[i, 2] += 0.005

print(newCoords.shape)

# Reset the newly computed surface coordinates
mesh.setSurfaceCoordinates(newCoords)

mesh.getCommonGrid()

# Actually run the mesh warping
mesh.warpMesh()

# Write the new grid file.
mesh.writeGrid()

When I tried to check what "getSurfaceCoordinates" returns, I noticed it output 6272 points but the specifiedSurfaces should have 355 points and the entire geometry has 3190 points. I don't understand where the other points are from.
I exported the output from getSurfaceCoordinates() into a txt file and plotted in paraview which is perfectly coinciding with the existing mesh. So, it is returning all the points in the mesh with some additional points.

I would like to just morph the coordinates of a surface and want the entire mesh to conform to that change.

Steps to reproduce issue

  1. IDWarp 2.6.1 with fix from fix writeVolumeMeshPoints #84. This is optional as I would like to understand what the function getSurfaceCoordinates() returns and in what order.
  2. Here is the test case I am working on
    Test_Geom_01_solid.zip

Current behavior

The function is returning all the mesh points in the geometry with some redundant points.

Expected behavior

It should only return the points from specifiedSurfaces input in options.

Code versions

  • Operating System: UBUNTU 20.04.5 LTS (Focal Fossa)
  • Python: 3.8.10
  • OpenMPI: 3.1.6
  • CGNS: 4.1.2
  • PETSc: 3.14.6
  • Compiler:
  • This repository:
@sreekar2858
Copy link
Author

To add to this
I tried to just move 1 node to check how it works. The mesh is not warping at all, the deformed node just pierced into neighboring cells just as here: #80 (comment)

Thank you for the help
-Sree

@BilalAnwar165
Copy link

BilalAnwar165 commented Oct 11, 2024

Hi @sreekar2858 ,

I know its been a year since this post. I am having the same issue. The idwarp is reading all the mesh nodes instead of reading only the mesh nodes specified by the "specifiedSurfaces". Did you solve this issue?

Current behavior
The function is returning all the mesh points in the geometry with some redundant points.

Expected behavior
It should only return the points from specifiedSurfaces input in options.

Code versions
Operating System: UBUNTU 22.04.5 LTS (Jammy)
Python: 3.10.12
OpenMPI: 4.1.6
CGNS: 4.4.0
PETSc: 3.19.6
OpenFoam: Foundation version 10
Compiler:
This repository:

@friedenhe @sseraj @bernardopacini Did you guys look into this bug yet ? Any help would be appreciated.

@BilalAnwar165
Copy link

BilalAnwar165 commented Oct 18, 2024

This issue is till open. I have tried the AhmedBodyCoarse Mesh using OpenFoam10 with IDWarp. The IDwarp mesh.getSurfaceCoordinates extract the coordinates of all the surfaces even if I specify a surface in the meshOptions. Why It is happening or is there any other way to specify surface with openfoam meshes?

This does not happen with CGNS meshes.

@eirikurj @sseraj @jrram @ewu63 @JustinSGray

@ewu63
Copy link
Collaborator

ewu63 commented Oct 18, 2024

@BilalAnwar165 please do not randomly tag people, some of whom do not work on the project. This is spam will in no way get your issue resolved any faster.

As with any open source software, there is no promise that maintainers will address any issues opened. Just wait patiently and if nobody responds, then nobody responds. Bumping issues and tagging an increasing group of people you suspect have worked on the software is not a recipe for receiving free help for a free software in the future.

@sreekar2858
Copy link
Author

Hi @sreekar2858 ,

I know its been a year since this post. I am having the same issue. The idwarp is reading all the mesh nodes instead of reading only the mesh nodes specified by the "specifiedSurfaces". Did you solve this issue?

Current behavior The function is returning all the mesh points in the geometry with some redundant points.

Expected behavior It should only return the points from specifiedSurfaces input in options.

Code versions Operating System: UBUNTU 22.04.5 LTS (Jammy) Python: 3.10.12 OpenMPI: 4.1.6 CGNS: 4.4.0 PETSc: 3.19.6 OpenFoam: Foundation version 10 Compiler: This repository:

@friedenhe @sseraj @bernardopacini Did you guys look into this bug yet ? Any help would be appreciated.

Hey
No, I couldn't find a fix to this issue.
I stopped using IDWarp due to its limitations.

@BilalAnwar165
Copy link

Thank you @sreekar2858 for your reply.

Can you suggest any other volume mesh deformer?l that can deform an unstructured mesh with inflation later?

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

No branches or pull requests

3 participants