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

[mesh manipulation] CreatePatch after subsetMesh

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By maka

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 25, 2008, 15:21
Default CreatePatch after subsetMesh
  #1
Senior Member
 
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 18
maka is on a distinguished road
after using createPatch to make a patch how can we interpolate the field to be consistent with the new mesh? Thanks.

details:

(1) I used subsetMesh to make a new mesh with oldInternalFaces as added patch.
(2) I used createPatch to split oldInternalFaces into two parts and redistribute those parts to two patches of the original mesh. This is done by modifing the fvMeshSubset. I'm using V1.3 so I had to add a new subMesh() that returns a non-const reference to fvMesh.
(3) now the new mesh has the same number of patches of original mesh but two patches has been changed. I can see the new mesh in paraFoam and it is OK.
(4) When I tried to borrow the part of code of subsetMesh that subset the field it crashed with error at the end of the message.
(5) I did some checks that shows that if step 2 is removed every thing works fine. It has to be that fvMeshSubset::interpolate does not work if one of the patches changed the number of faces that belongs to it.

(6) my question is: after using createPatch to make a patch how can we interpolate the field to be consistent with the new mesh? Thanks.


error message:Subsetting field k
Subsetting field nuSgs
Subsetting field p
Subsetting field U
Writing polyMesh to time 0.004
Foam::error::printStack(Foam:stream&)
Foam::sigSegv::sigSegvHandler(int)
/lib64/tls/libc.so.6 [0x38ce72e2f0]
std::basic_ostream<char,> >& std::operator<<>, std::allocator<char> >(std::basic_ostream<char,> >&, std::basic_string<char,>, std::allocator<char> > const&)
Foam:Sstream::write(Foam::word const&)
Foam::operator<<(Foam:stream&, Foam::word const&)
Foam::GeometricField<double,>::GeometricBoundaryFi eld::writeEntry(Foam::word const&, Foam:stream&) const
Foam:stream& Foam::operator<<>(Foam:stream&, Foam::GeometricField<double,> const&)
Foam::GeometricField<double,>::writeData(Foam:stream&) const
Foam::regIOobject::write(Foam::IOstream::streamFor mat, Foam::IOstream::versionNumber, Foam::IOstream::compressionType) const
Foam::regIOobject::write() const
modifyMesh.02 [0x418111]
__libc_start_main
__gxx_personality_v0
Segmentation fault
maka is offline   Reply With Quote

Old   August 27, 2008, 06:25
Default I think I knew the reason. Ste
  #2
Senior Member
 
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 18
maka is on a distinguished road
I think I knew the reason. Step (1) need to be done on both the mesh and fields (I did not do it to the fields) then, step (2) need also to be done for both the mesh and the fields. This means that I have to make createPatch to work on both the mesh and the fields. I looked the src of createPatch and it seems that it only works on the mesh but not the fields.
maka is offline   Reply With Quote

Old   August 27, 2008, 08:28
Default mapFields seems to be the solu
  #3
Senior Member
 
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 18
maka is on a distinguished road
mapFields seems to be the solution. After createPatch, mapFields is used to generate the new fields.
vince002 likes this.
maka is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
createPatch cyclic boundary condition KateEisenhower OpenFOAM Pre-Processing 3 September 4, 2018 15:30
There is a bug in createPatch? feno102 OpenFOAM Pre-Processing 6 November 1, 2017 03:24
createPatch Segmentation Fault (CORE DUMPED) sam.ho OpenFOAM Pre-Processing 2 April 21, 2014 03:01
Cyclic BCs using createPatch in OF 1.6.x SunnyPP OpenFOAM 2 August 6, 2010 11:21
[Salome] unv mesh corrupted after createPatch maddalena OpenFOAM Meshing & Mesh Conversion 1 February 18, 2010 08:43


All times are GMT -4. The time now is 06:36.