CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Selective patches in dynamicInkJetFvMesh

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 27, 2019, 12:49
Default Selective patches in dynamicInkJetFvMesh
  #1
New Member
 
Joaquín Aranciaga
Join Date: Oct 2018
Posts: 21
Rep Power: 8
joaran is on a distinguished road
Hello everyone!


I'm modifying the dynamicInkJetFvMesh solver for moving the mesh following a specific function of time and space. I'm able to do that without problems, but here's what's been troubling me. I have a sliding surface, and I need to move only the points belonging to one of the patches, while the adjacent patch remains still. So, I cannot filter the points based solely on their locations, because that way points belonging to both of the surfaces move.

What I attempted to do is to load the faces:

Code:
faceIOList faces_;

    faces_
    (
        IOobject
        (
            "faces",
            io.time().constant(),
            meshSubDir,
            *this,
            IOobject::MUST_READ,
            IOobject::NO_WRITE
        )
     )
And then I intend to load the boundaries, and do a loop over the faces gathering the points that belong to the faces that belong to a given patch name, say "movingPlane".
So, my questions would be:


How may I load the boundaries from the boundary file exported by polymesh? i.e. I'm looking for something analogous to the code I wrote for the faces.


Once loaded that file, how can I access the "movingPlane" patch and get their startingFace and number of faces?


Given that, how can I access the components of a given face to get the points that make the face? Until now, I've managed to access a specific line in the "face" list, but it gives me something like " 4 (12 60 23 90)", and I'd need to get 12, 60, 23 and 90 separately.


Ps: I've already tried the Laplacian solvers for both displacement and velocity, and both explode at some time (the domain becomes highly non-orthogonal), and besides, I already know the prescribed movement of the nodes.


Thank you very much for taking the time to read this post!


Joa.-
joaran is offline   Reply With Quote

Old   May 27, 2019, 16:36
Default
  #2
New Member
 
Joaquín Aranciaga
Join Date: Oct 2018
Posts: 21
Rep Power: 8
joaran is on a distinguished road
Quote:
Originally Posted by joaran View Post
Hello everyone!


I'm modifying the dynamicInkJetFvMesh solver for moving the mesh following a specific function of time and space. I'm able to do that without problems, but here's what's been troubling me. I have a sliding surface, and I need to move only the points belonging to one of the patches, while the adjacent patch remains still. So, I cannot filter the points based solely on their locations, because that way points belonging to both of the surfaces move.

What I attempted to do is to load the faces:

Code:
faceIOList faces_;

    faces_
    (
        IOobject
        (
            "faces",
            io.time().constant(),
            meshSubDir,
            *this,
            IOobject::MUST_READ,
            IOobject::NO_WRITE
        )
     )
And then I intend to load the boundaries, and do a loop over the faces gathering the points that belong to the faces that belong to a given patch name, say "movingPlane".
So, my questions would be:


How may I load the boundaries from the boundary file exported by polymesh? i.e. I'm looking for something analogous to the code I wrote for the faces.


Once loaded that file, how can I access the "movingPlane" patch and get their startingFace and number of faces?


Given that, how can I access the components of a given face to get the points that make the face? Until now, I've managed to access a specific line in the "face" list, but it gives me something like " 4 (12 60 23 90)", and I'd need to get 12, 60, 23 and 90 separately.


Ps: I've already tried the Laplacian solvers for both displacement and velocity, and both explode at some time (the domain becomes highly non-orthogonal), and besides, I already know the prescribed movement of the nodes.


Thank you very much for taking the time to read this post!


Joa.-
Hi all,


I've managed to answer question #3. To access a specific element of a row of a list, it's as simple as listName[i][j].


For the moment I've circumvented the problem by looping at faces manually written by me (after looking at the boundary file. The problem is that every time I refine the mesh, or change it in any way, I have to manually change those numbers and recompile it. But the silver lining is that it takes oneself out of the hurry, in case we don't know the right way to do it.


Greetings!
Joa.-
joaran is offline   Reply With Quote

Reply

Tags
dynamicinkjetfvmesh, mesh motion, openfoam


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Foam::error::PrintStack almir OpenFOAM Running, Solving & CFD 92 May 21, 2024 08:56
Problem using AMI vinz OpenFOAM Running, Solving & CFD 298 November 13, 2023 09:19
[snappyHexMesh] snappyHexMesh error "Cannot determine normal vector from patches." lethu OpenFOAM Meshing & Mesh Conversion 1 June 3, 2020 08:49
Possible bug with stitchMesh and cyclics in OpenFoam Jack001 OpenFOAM Pre-Processing 0 May 21, 2016 09:00
Cyclic boundaries in OF 21x morard OpenFOAM 25 May 13, 2013 23:35


All times are GMT -4. The time now is 16:11.