|
[Sponsors] |
Calculating the force on a patch using surfaceFieldValue |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 12, 2023, 16:46 |
Calculating the force on a patch using surfaceFieldValue
|
#1 |
Senior Member
Join Date: Jul 2013
Posts: 124
Rep Power: 13 |
Hi All,
I have a problem where I have a volTensorField that is a stress tensor (if you are curious, it is the Maxwell stress tensor), and I am trying to use this stress tensor to calculate the total force on a patch. I have been trying to use a surfaceFieldValue entry in my controlDict file that looks like this: maxwellForcesSphere { type surfaceFieldValue; libs ("libfieldFunctionObjects.so"); log true; writeControl timeStep; writeInterval 1; writeFields false; surfaceFormat none; regionType patch; name sphere; operation areaNormalIntegrate; fields ( maxwellStressTensor ); } Essentially, the force calculation should work like this: take the maxwellStressTensor, which is already calculated, take the inner product of this with the surface normal direction on the patch, and integrate this over the patch. It's my understanding that this is what 'areaNormalIntegrate' should be doing, but it's very possible I am misunderstanding this. Could someone please advise me on what I am doing wrong? When I run this as is it gives an output like this: areaNormalIntegrate(sphere) of maxwellStressTensor = (0 0 0 0 0 0 0 0 0) I am quite confident this should not be zero, and also the output should be a vector rather than a tensor, due to the inner product with the surface normal direction. Thanks for your help EDIT: I think another way to frame this question would be: suppose you calculate the velocity gradients tensor in your flow solver. Is it possible to calculate the total viscous force on a patch using surfaceFieldValue? Last edited by wildfire230; July 12, 2023 at 17:59. |
|
Tags |
surfacefieldvalue |
|
|
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 |
[Other] Wedge patch '*' is not planar | LilumDaru | OpenFOAM Meshing & Mesh Conversion | 7 | September 18, 2024 06:52 |
[OLAFLOW] The OLAFLOW Thread | Phicau | OpenFOAM Community Contributions | 459 | September 12, 2024 12:47 |
steadyUniversalMRFFoam Tutorial fails in MixingPlane | HenrikJohansson | OpenFOAM Bugs | 0 | February 14, 2019 05:48 |
createPatch Segmentation Fault (CORE DUMPED) | sam.ho | OpenFOAM Pre-Processing | 2 | April 21, 2014 03:01 |