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