|
[Sponsors] | |||||
Sampling air passing through multiple windows |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|
|
#1 |
|
Member
Ben Simpson
Join Date: Dec 2019
Location: UK
Posts: 32
Rep Power: 8 ![]() |
Hi,
I have a model of a building which has open windows on each side. Inside I have several sources of CO2. What I need to do is predict the air velocity and total concentration of CO2 passing through the windows, both in and out of the building. Ideally I would like the field values for every cell within a plane along the centre of the windows. I am using openFOAM v8 running buoyantSimpleFoam. Does anyone know the best method for achieving this? I have tried including a surfaces file in my controlDict where i tried to create a separate cuttingPlane for each window. But this resulted in the output files containing data for every cell along the x or y plane depending on the window location. Kind regards, Ben Code:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1812 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
surfaces
{
type surfaces;
libs ("libsampling.so");
writeControl writeTime;
surfaceFormat raw;
fields (U T CO2);
interpolationScheme cell;
surfaces
(
Window1
{
type cuttingPlane;
planeType pointAndNormal;
pointAndNormalDict
{
point (1.35 0.175 0.7);
normal (1 0 2);
}
interpolate true;
}
Window2
{
type cuttingPlane;
planeType pointAndNormal;
pointAndNormalDict
{
point (4.35 0.175 0.7);
normal (1 0 2);
}
interpolate true;
}
Window3
{
type cuttingPlane;
planeType pointAndNormal;
pointAndNormalDict
{
point (7.35 0.175 0.7);
normal (1 0 2);
}
interpolate true;
}
Window4
{
type cuttingPlane;
planeType pointAndNormal;
pointAndNormalDict
{
point (10.35 0.175 0.7);
normal (1 0 2);
}
interpolate true;
}
Window5
{
type cuttingPlane;
planeType pointAndNormal;
pointAndNormalDict
{
point (13.35 0.175 0.7);
normal (1 0 2);
}
interpolate true;
}
Window6
{
type cuttingPlane;
planeType pointAndNormal;
pointAndNormalDict
{
point (1.35 15.525 0.7);
normal (1 0 2);
}
interpolate true;
}
Window7
{
type cuttingPlane;
planeType pointAndNormal;
pointAndNormalDict
{
point (4.35 15.525 0.7);
normal (1 0 2);
}
interpolate true;
}
Window8
{
type cuttingPlane;
planeType pointAndNormal;
pointAndNormalDict
{
point (7.35 15.525 0.7);
normal (1 0 2);
}
interpolate true;
}
Window9
{
type cuttingPlane;
planeType pointAndNormal;
pointAndNormalDict
{
point (10.35 15.525 0.7);
normal (1 0 2);
}
interpolate true;
}
Window10
{
type cuttingPlane;
planeType pointAndNormal;
pointAndNormalDict
{
point (13.35 15.525 0.7);
normal (1 0 2);
}
interpolate true;
}
Window11
{
type cuttingPlane;
planeType pointAndNormal;
pointAndNormalDict
{
point (0.175 1.35 0.7);
normal (0 1 2);
}
interpolate true;
}
Window12
{
type cuttingPlane;
planeType pointAndNormal;
pointAndNormalDict
{
point (0.175 4.35 0.7);
normal (0 1 2);
}
interpolate true;
}
Window13
{
type cuttingPlane;
planeType pointAndNormal;
pointAndNormalDict
{
point (0.175 7.35 0.7);
normal (0 1 2);
}
interpolate true;
}
Window14
{
type cuttingPlane;
planeType pointAndNormal;
pointAndNormalDict
{
point (0.175 10.35 0.7);
normal (0 1 2);
}
interpolate true;
}
Window15
{
type cuttingPlane;
planeType pointAndNormal;
pointAndNormalDict
{
point (0.175 13.35 0.7);
normal (0 1 2);
}
interpolate true;
}
Window16
{
type cuttingPlane;
planeType pointAndNormal;
pointAndNormalDict
{
point (15.525 1.35 0.7);
normal (0 1 2);
}
interpolate true;
}
Window17
{
type cuttingPlane;
planeType pointAndNormal;
pointAndNormalDict
{
point (15.525 4.35 0.7);
normal (0 1 2);
}
interpolate true;
}
Window18
{
type cuttingPlane;
planeType pointAndNormal;
pointAndNormalDict
{
point (15.525 7.35 0.7);
normal (0 1 2);
}
interpolate true;
}
Window19
{
type cuttingPlane;
planeType pointAndNormal;
pointAndNormalDict
{
point (15.525 10.35 0.7);
normal (0 1 2);
}
interpolate true;
}
Window20
{
type cuttingPlane;
planeType pointAndNormal;
pointAndNormalDict
{
point (15.525 13.35 0.7);
normal (0 1 2);
}
interpolate true;
}
);
}
// ************************************************************************* //
|
|
|
|
|
|
|
|
|
#2 |
|
Member
Ben Simpson
Join Date: Dec 2019
Location: UK
Posts: 32
Rep Power: 8 ![]() |
To better explain the issue see the image attached.
As you can see the cuttingPlane is currently extending across the entire x and y axis. What I need is the plane to be located and the same size as the windows. It may be that the cuttingPlane isn't designed to do what I want but I am assuming that there must be a way of getting the same data as the cuttingPlane but just for the cells in the centre of the windows. Kind regards, Ben |
|
|
|
|
|
|
|
|
#3 |
|
Senior Member
Jan
Join Date: Jul 2009
Location: Hamburg
Posts: 145
Rep Power: 21 ![]() |
Hi Ben,
I have not tested, but maybe you can create faceZones for each window with topoSet, and then use these zones as input. Best, Jan |
|
|
|
|
|
|
|
|
#4 |
|
Member
Ben Simpson
Join Date: Dec 2019
Location: UK
Posts: 32
Rep Power: 8 ![]() |
Hi Jan,
Thank you for your reply. Previously I have tried to set up faceZones within the windows and then use them as the inputs. Unfortunately I was unable to get it working in a satisfactory way. I am sure it can be fixed this way, but I have instead found a solution by keeping the set up as it is, where by the surface provides the field values for all cells along the cuttingPlane. Then I have created a python script to strip out the cells that are within the windows based on their location. Regards, Ben |
|
|
|
|
|
![]() |
| Tags |
| buoyantsimplefoam, openfoam, sampling |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| effect or air preheating on non-premixed combustion ? | sooraj546 | FLUENT | 9 | February 4, 2020 06:55 |
| OpenFOAM static build on Cray XT5 | asaijo | OpenFOAM Installation | 9 | April 6, 2011 13:21 |
| UDF for sampling particles from multiple injections | JaC | Fluent UDF and Scheme Programming | 0 | March 31, 2010 11:43 |
| Multiple solutions of air flow | Fab | Main CFD Forum | 3 | February 28, 2008 06:01 |
| Mass flow of air through a warehouse with multiple openings | Matt Gangemi | Main CFD Forum | 0 | September 18, 1998 19:02 |