CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

velocity of a patch by using swak4Foam

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

Reply
 
LinkBack Thread Tools Display Modes
Old   September 6, 2013, 09:31
Default velocity of a patch by using swak4Foam
  #1
Senior Member
 
Sasan Ghomi
Join Date: Sep 2012
Location: Iran - Tehran
Posts: 185
Rep Power: 4
sasanghomi is on a distinguished road
Hi Foamers,

I am using dynamicMesh in a simulation and I want to save the velocity of a moving patch versus time . Can I do this action by using swak4Foam . Can you say me How ca I do that??

Thanks and best regards,
Sasan.
sasanghomi is offline   Reply With Quote

Old   September 6, 2013, 15:16
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by sasanghomi View Post
Hi Foamers,

I am using dynamicMesh in a simulation and I want to save the velocity of a moving patch versus time . Can I do this action by using swak4Foam . Can you say me How ca I do that??

Thanks and best regards,
Sasan.
Short answer: in principle yes, but you've got to be more specific

Before I go into details: what will always work is getting the position via "pos()" and during postprocessing calculate the velocity from this.

The rest depends on the type of mesh-motion you're using:

If the mesh motion is specified via a field cellMotionU, pointMotionU or similar then you just have to access that field like you would access any field. If you're not sure whether there is such a field use the listRegisteredObjects-functionObject and have a look at the list.

If the motion-solver works without such a field then the only chance is to do the classic "this position minus old position divided by timestep" -dance. There is a thing called storedVariables in swak that allows you to store "pos()" and use it at the next timestep. BUT: this only works if you've got a motion-solver that keeps the structure of the mesh the same (especially the number of faces on the patch must stay the same and the order in which they are numbered too)

So you really have to say what kind of mesh-motion you're doing.

General: whenever possible I tried to anticipate the problems with mesh-motion and either work around them or (as in the case of changing patch-numbers) make sure that the code fails in a controlled way. But it has been some time since I did anything especially for mesh motion. Part of the problem is that it setting up good test cases for that takes almost as much time as fixing these things. So if there are problems I'll need a small test case that reproduces the problem before I even consider fixing it.
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   September 8, 2013, 07:08
Default
  #3
Senior Member
 
Sasan Ghomi
Join Date: Sep 2012
Location: Iran - Tehran
Posts: 185
Rep Power: 4
sasanghomi is on a distinguished road
Hi Bernhard ,

Thank you very much for your complete reply. Actually I am using sonicTurbDyMEngineFoam solver and simpleEngineTopoFvMesh class for handling the dynamicMesh and I don't use pointMotionU.

Thanks and best regards,
Sasan.
sasanghomi is offline   Reply With Quote

Old   September 9, 2013, 14:30
Default
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Very important with mesh-motion: always state which version of OF you use. Because that is where the two flavours of OF massively differ
Quote:
Originally Posted by sasanghomi View Post
Thank you very much for your complete reply. Actually I am using sonicTurbDyMEngineFoam solver and simpleEngineTopoFvMesh class for handling the dynamicMesh and I don't use pointMotionU.
Quick glance at the (1.6-ext) sources didn't show any obvious fields to use. Which doesn't mean there aren't any (it was really quick). So use the listRegisteredObjects FO to see if there are any likely candidates. If there aren't you'll have to derive the velocity from the positions.

Sorry for not being more helpful
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
swak4Foam: problem with a parabolic velocity profile Claudio87 OpenFOAM Pre-Processing 5 May 29, 2014 09:30
Single volume Mesh gmsh PeteH Open Source Meshers: Gmsh, Netgen, CGNS, ... 9 August 6, 2013 08:54
Using starToFoam clo OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 33 September 26, 2012 04:04
swak4Foam to calculate bubble velocity nimasam OpenFOAM 1 March 1, 2012 15:10
Terrible Mistake In Fluid Dynamics History Abhi Main CFD Forum 12 July 8, 2002 09:11


All times are GMT -4. The time now is 07:28.