|
[Sponsors] |
October 3, 2016, 11:29 |
Volume averaged-field
|
#1 |
Senior Member
André
Join Date: Mar 2016
Posts: 133
Rep Power: 10 |
Hey guys,
suppose I want to create a new field function for velocity or pressure where the local value is a volume average of a sphere around that point. What is the easiest way to define such a thing? Thanks in advance!!
__________________
Sapere aude! |
|
October 3, 2016, 12:27 |
|
#2 |
Member
Join Date: Nov 2015
Posts: 38
Rep Power: 11 |
Hi,
I would create a local spherical coordinate system in the point you want to observe. For that coordinate system you can create a cell set of the type "threshold". Use the r-coordinate as field function and specify a radius that you wnt to use. Along with that cell set you get a field function e.g. "Cell Set 1" that has a value of 1 for the cells inside the sphere. Now you create two field functions: FF1: $FF*$Volume*$CellSetVar1 FF2: $Volume*$CellSetVar1 "$FF" is the Field Function that you want to average inside the sphere, e.g $Pressure or $$Velocity.mag(). Create two sum reports for FF1 and FF2. Now you create a third Field Function or a expression report that devides the sum report of FF1 by the sum report of FF2. The result should be your searched value. |
|
October 3, 2016, 12:38 |
|
#3 | |
Senior Member
André
Join Date: Mar 2016
Posts: 133
Rep Power: 10 |
Quote:
I want to do the average for my whole domain.
__________________
Sapere aude! |
||
October 3, 2016, 16:51 |
|
#4 |
Member
Join Date: Nov 2015
Posts: 38
Rep Power: 11 |
Ok, I haven't understood that you want to get that value in every cell of the domain.
Sorry, but I'm not aware of any easy method outside of user coding to do that. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] dynamicTopoFVMesh and pointDisplacement | RandomUser | OpenFOAM Meshing & Mesh Conversion | 6 | April 26, 2018 08:30 |
How to use "translation" in solidBodyMotionFunction in OpenFOAM | rupesh_w | OpenFOAM Running, Solving & CFD | 5 | August 16, 2016 05:27 |
multiphase turbulance case floating error | harsha_kulkarni | OpenFOAM Running, Solving & CFD | 3 | February 18, 2016 06:06 |
Volume averaged continuity and momentum eqns forE-L flow | jiejie | OpenFOAM Running, Solving & CFD | 0 | April 10, 2013 06:12 |
Problem with rhoSimpleFoam | matteo_gautero | OpenFOAM Running, Solving & CFD | 0 | February 28, 2008 07:51 |