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

How to let the mesh motion solver just solve a small region near a moving boundary?

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

Like Tree4Likes
  • 4 Post By zhajingjing

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 12, 2010, 01:11
Default How to let the mesh motion solver just solve a small region near a moving boundary?
  #1
Member
 
jingjing
Join Date: Mar 2009
Location: shanghai,China
Posts: 30
Rep Power: 17
zhajingjing is on a distinguished road
Hi,
I use mesh motion solver for a moving boundary, and it takes a lot of time to move the whole mesh, if setting the part of mesh just near the moving boundary to move can be realized(that means just solve mesh equation in a region near the moving boundary), then I can save much time to run the case.

So how to let the mesh motion solver just solve a small region near a moving boundary? Can someone give me a hint?
Thanks!

Jingjing
fumiya, sunliming, hua1015 and 1 others like this.
zhajingjing is offline   Reply With Quote

Old   September 12, 2010, 02:03
Default
  #2
Senior Member
 
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25
deepsterblue will become famous soon enough
Take a look at subsetMotionSolverFvMesh (I think that's what it's called). Lets you use a subset mesh and prescribe mesh motion for that alone.
__________________
Sandeep Menon
University of Massachusetts Amherst
https://github.com/smenon
deepsterblue is offline   Reply With Quote

Old   September 12, 2010, 07:57
Default
  #3
Member
 
jingjing
Join Date: Mar 2009
Location: shanghai,China
Posts: 30
Rep Power: 17
zhajingjing is on a distinguished road
Hi
I use OpenFOAM-1.5, may I ask where is "subsetMotionSolverFvMesh", I cann't find it. Or you mean I should write a class that inherit from dynamicMotionSolverFvMesh" which will have the function I want?
zhajingjing is offline   Reply With Quote

Old   September 12, 2010, 09:53
Default
  #4
Senior Member
 
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25
deepsterblue will become famous soon enough
I suppose this is one of those features that are only available on OF-1.5-dev. You can find it at:

($FOAM_SRC)/dynamicFvMesh/subsetMotionSolverFvMesh

It does precisely what you're looking for, using a cellSet for the subset mesh. It also includes a relaxation coefficient for blending.
__________________
Sandeep Menon
University of Massachusetts Amherst
https://github.com/smenon
deepsterblue is offline   Reply With Quote

Old   September 17, 2010, 00:18
Default
  #5
Member
 
jingjing
Join Date: Mar 2009
Location: shanghai,China
Posts: 30
Rep Power: 17
zhajingjing is on a distinguished road
Thank you very much! I succeed in using subsetMotionSolverFvMesh, and can run my case in serial pattern,but fail in parallel pattern.

Code:
--------------------------------------------------------------------------
[duanmu@localhost deckMesh]$ mpirun -np 2 interDyMFoam -parallel
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  1.5-dev                               |
|   \\  /    A nd           | Revision: exported                              |
|    \\/     M anipulation  | Web:      http://www.OpenFOAM.org               |
\*---------------------------------------------------------------------------*/
Exec   : interDyMFoam -parallel
Date   : Sep 17 2010
Time   : 07:13:36
Host   : localhost.localdomain
PID    : 1482
Case   : /home/duanmu/zjj/deckMesh
nProcs : 2
Slaves : 
1
(
localhost.localdomain.1483
)

Pstream initialized with:
    floatTransfer     : 0
    nProcsSimpleSum   : 0
    commsType         : blocking

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create dynamic mesh for time = 0.05

Selecting dynamicFvMesh subsetMotionSolverFvMesh
Uncoupled 172 faces on coupled patches. (processorPolyPatch, cyclicPolyPatch)
You might need to run couplePatches to restore the patch face ordering.

[0] Number of cells in new mesh : 10800
[0] Number of faces in new mesh : 37447
[0] Number of points in new mesh: 16529
[1] Number of cells in new mesh : 10800
[1] Number of faces in new mesh : 37158
[1] Number of points in new mesh: 16083
[0]     oldInternalFaces : 9188
[1]     oldInternalFaces : 8697
Selecting motion solver: displacementLaplacian
--> FOAM Warning : 
    From function dlLibraryTable::open(const fileName& functionLibName)
    in file db/dlLibraryTable/dlLibraryTable.C at line 86
    could not load /home/duanmu/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libfvMotionSolvers.so: undefined symbol: _ZN4Foam15pointPatchFieldIdE5debugE
processorPointPatch::calcPatchPatchPoints() : constructing patch-patch points
processorPointPatch::calcPatchPatchPoints() : constructed patch-patch points
[0] 
[0] 
[0] size 31775 is not equal to the given value of 16529
[0] 
[0] file: /home/duanmu/zjj/deckMesh/processor0/0.05/motionSubset/pointDisplacement from line 18 to line 31839.
[0] 
[0]     From function Field<Type>::Field(const word& keyword, const dictionary& dict, const label s)
[0]     in file /home/duanmu/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude/Field.C at line 224.
[0] 
FOAM parallel run exiting
[0] 
--------------------------------------------------------------------------
MPI_ABORT was invoked on rank 0 in communicator MPI_COMM_WORLD 
with errorcode 1.

NOTE: invoking MPI_ABORT causes Open MPI to kill all MPI processes.
You may or may not see output from other processes, depending on
exactly when Open MPI kills them.
--------------------------------------------------------------------------
[1] 
[1] 
[1] size 31775 is not equal to the given value of 16083
[1] 
[1] file: /home/duanmu/zjj/deckMesh/processor1/0.05/motionSubset/pointDisplacement from line 18 to line 31839.
[1]
-It shows the size mismatch, is there something need to pay attention during parallel decomposition after using motionSubset ? What should I do?

-How to display the decomposed part of every processor in paraFoam ,in order to examine?

Thank you!
zhajingjing is offline   Reply With Quote

Old   September 17, 2010, 16:18
Default
  #6
Member
 
jingjing
Join Date: Mar 2009
Location: shanghai,China
Posts: 30
Rep Power: 17
zhajingjing is on a distinguished road
Hi,
I use the modified decomposePar , but the case still can't work in parallel
(see posts:
http://www.cfd-online.com/Forums/ope...epar-sets.html
http://www.cfd-online.com/Forums/ope...-part-2-a.html)

First, I'm not sure whether I decompose correctly. I didn't use the decomposeParWithSets, just add some sentence to the original source file according to the domainDecomposition.C.Patch in the fist post, compile and run the modified decomposePar, Then I get the decompose information,

Code:
[duanmu@localhost deckMesh]$ decomposePar -force
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  1.5-dev                               |
|   \\  /    A nd           | Revision: exported                              |
|    \\/     M anipulation  | Web:      http://www.OpenFOAM.org               |
\*---------------------------------------------------------------------------*/
Exec   : decomposePar -force
Date   : Sep 18 2010
Time   : 11:22:28
Host   : localhost.localdomain
PID    : 29413
Case   : /home/duanmu/zjj/deckMesh
nProcs : 1

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Time = 0.02
Create mesh for region region0

Calculating distribution of cells
Selecting decompositionMethod simple

Finished decomposition in 1.35 s

Calculating original mesh data

Distributing cells to processors

Distributing faces to processors

Calculating processor boundary addressing

Distributing points to processors

Checking for face/cell-Sets
Found cell sets: 
1
(
c0
)


Constructing processor meshes

Processor 0
    Number of cells = 291550
    Writing cell set c0 with 54000 cells
    Number of faces shared with processor 1 = 1826
    Number of processor patches = 1
    Number of processor faces = 1826
    Number of boundary faces = 30496

Processor 1
    Number of cells = 291550
    Writing cell set c0 with 0 cells
    Number of faces shared with processor 0 = 1826
    Number of processor patches = 1
    Number of processor faces = 1826
    Number of boundary faces = 29314

Number of processor faces = 1826
Max number of processor patches = 1
Max number of faces between processors = 1826
water depth 1.4
wave type linearWave
wave omega 5.5478
wave height 0.14
wave number 3.13837735726
w=1.99404041929
piston stroke 0.0351046043615

Processor 0: field transfer
Processor 1: field transfer

End.
It seems the decomposition is correctly if just from the decomposition information, only processor 0 's domain cover the subsetMotion area c0. So I know my previous decomposition that directly using the original decomposePar is absolutely wrong.

However, parallel running still fail.

Code:
[duanmu@localhost deckMesh]$ mpirun -np 2 interDyMFoam -parallel
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  1.5-dev                               |
|   \\  /    A nd           | Revision: exported                              |
|    \\/     M anipulation  | Web:      http://www.OpenFOAM.org               |
\*---------------------------------------------------------------------------*/
Exec   : interDyMFoam -parallel
Date   : Sep 18 2010
Time   : 11:03:30
Host   : localhost.localdomain
PID    : 29174
Case   : /home/duanmu/zjj/deckMesh
nProcs : 2
Slaves : 
1
(
localhost.localdomain.29175
)

Pstream initialized with:
    floatTransfer     : 0
    nProcsSimpleSum   : 0
    commsType         : nonBlocking

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create dynamic mesh for time = 0.02

Selecting dynamicFvMesh subsetMotionSolverFvMesh
[1] Number of cells in new mesh : 0
[1] Number of faces in new mesh : 0
[1] Number of points in new mesh: 0
[0] Number of cells in new mesh : 54000
[0] Number of faces in new mesh : 166350
[0] Number of points in new mesh: 58466
[1]     oldInternalFaces : 0
[0]     oldInternalFaces : 1800
Selecting motion solver: displacementLaplacian
--> FOAM Warning : 
    From function dlLibraryTable::open(const fileName& functionLibName)
    in file db/dlLibraryTable/dlLibraryTable.C at line 86
    could not load /home/duanmu/OpenFOAM/OpenFOAM-1.6/lib/linuxGccDPOpt/libfvMotionSolvers.so: undefined symbol: _ZN4Foam15pointPatchFieldIdE5debugE
processorPointPatch::calcPatchPatchPoints() : constructing patch-patch points
processorPointPatch::calcPatchPatchPoints() : constructed patch-patch points
water depth 1.4
wave type linearWave
wave omega 5.5478
wave height 0.14
wave number 3.13837735726
w=1.99404041929
piston stroke 0.0351046043615
Selecting motion diffusion: inverseDistance
[localhost.localdomain:29175] *** An error occurred in MPI_Waitall
[localhost.localdomain:29175] *** on communicator MPI_COMM_WORLD
[localhost.localdomain:29175] *** MPI_ERR_TRUNCATE: message truncated
[localhost.localdomain:29175] *** MPI_ERRORS_ARE_FATAL (your MPI job will now abort)
--------------------------------------------------------------------------
mpirun has exited due to process rank 1 with PID 29175 on
node localhost.localdomain exiting without calling "finalize". This may
have caused other processes in the application to be
terminated by signals sent by mpirun (as reported here).
--------------------------------------------------------------------------
The warning doesn't matter, it also pops out when running in serial, my case run well in serial, but that's too slow for 3D case, so I really need parallel runnning.

I desperately don't know what to do facing this information.
Is there anyone can give me hint?
Thank you all!

Last edited by zhajingjing; September 17, 2010 at 16:45.
zhajingjing is offline   Reply With Quote

Old   March 4, 2011, 16:27
Default
  #7
New Member
 
Mark Beal
Join Date: Feb 2011
Posts: 24
Rep Power: 15
msbealo is on a distinguished road
Did you solve this? I'm not using a subsetMesh, but my case that works fine on one processor fails to work in parallel.

interFoam single and parallel work fine.
interDyMFoam works for single but not parallel processors case.

I'm using OF1.7.1 if that helps.

Mark
msbealo is offline   Reply With Quote

Old   July 8, 2011, 06:48
Default
  #8
Senior Member
 
Arne Stahlmann
Join Date: Nov 2009
Location: Hanover, Germany
Posts: 209
Rep Power: 18
Arnoldinho is on a distinguished road
Zhajingjing,

I'm also interested if you ever solved this. I'd like to use the subsetMotionSolver in combination with interDyMFoam on OF 1.6-ext. It is working fine in serial so far, but fails in parallel mode as well.
I patched the domainDecomposition.C, but it seems that the patched one does not correctly decompose the subfolders in /0 for the subSet part.

Any hints would be highly appreciated!

Arne

Last edited by Arnoldinho; July 8, 2011 at 08:06.
Arnoldinho is offline   Reply With Quote

Old   April 7, 2014, 12:10
Default
  #9
New Member
 
Giampaolo Cetraro
Join Date: Oct 2012
Posts: 14
Rep Power: 14
misklach is on a distinguished road
Any update for make subsetmotion solver work in parallel?
misklach is offline   Reply With Quote

Old   April 28, 2016, 05:15
Default
  #10
Member
 
YS
Join Date: Jan 2010
Posts: 96
Rep Power: 16
Ya_Squall2010 is on a distinguished road
Any update on this issue?
Ya_Squall2010 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
RPM in Wind Turbine Pankaj CFX 9 November 23, 2009 05:05
how to extend FSI 2D codes to 3D, need advises abouziar Main CFD Forum 1 May 30, 2008 05:08
moving boundary / mesh John Main CFD Forum 1 May 8, 2008 11:28
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55
CFX 5.5 Roued CFX 1 October 2, 2001 17:49


All times are GMT -4. The time now is 12:54.