velocity of a patch by using swak4Foam
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. |
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. |
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. |
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 |
All times are GMT -4. The time now is 22:30. |