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

[swak4Foam] velocity of a patch by using swak4Foam

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 6, 2013, 10:31
Default velocity of a patch by using swak4Foam
  #1
Senior Member
 
Sasan Ghomi
Join Date: Sep 2012
Location: Denmark
Posts: 292
Rep Power: 15
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, 16:16
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
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, 08:08
Default
  #3
Senior Member
 
Sasan Ghomi
Join Date: Sep 2012
Location: Denmark
Posts: 292
Rep Power: 15
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, 15:30
Default
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
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


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
Problem with cyclic boundaries in Openfoam 1.5 fs82 OpenFOAM 37 November 29, 2024 11:15
[Commercial meshers] Fluent3DMeshToFoam simvun OpenFOAM Meshing & Mesh Conversion 50 January 19, 2020 16:33
Cyclic Boundary Condition Luiz Eduardo Bittencourt Sampaio (Sampaio) OpenFOAM Running, Solving & CFD 36 July 2, 2012 13:23
[Other] StarToFoam error Kart OpenFOAM Meshing & Mesh Conversion 1 February 4, 2010 05:38
Terrible Mistake In Fluid Dynamics History Abhi Main CFD Forum 12 July 8, 2002 10:11


All times are GMT -4. The time now is 01:17.