|
[Sponsors] |
Drag coefficient at each time interval for different obstacles |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 12, 2022, 10:49 |
Drag coefficient at each time interval for different obstacles
|
#1 |
New Member
Vijay
Join Date: Feb 2020
Posts: 7
Rep Power: 6 |
Hello All,
I want to calculate drag coefficient at each time step on front face of each obstacle (here 6 buildings). Here is my blockMesh file Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 7 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 1; vertices ( (0 0 0) (200 0 0) (200 150 0) (0 150 0) (0 0 250) (200 0 250) (200 150 250) (0 150 250) ); blocks ( hex (0 1 2 3 4 5 6 7) (50 50 50) simpleGrading (1 1 1) ); edges ( ); boundary ( atmosphere { type patch; faces ( (4 5 6 7) ); } bottom { type wall; faces ( (0 3 2 1) ); } left { type cyclic; neighbourPatch right; faces ( (0 4 7 3) ); } right { type cyclic; neighbourPatch left; faces ( (2 6 5 1) ); } entry { type wall; faces ( (1 5 4 0) ); } exit { type patch; faces ( (3 7 6 2) ); } building { type wall; faces ( ); } ); mergePatchPairs ( ); // ************************************************************************* // I am able to remove solid domain (buildings) using toposet. Here is toposet file - Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 7 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object topoSetDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // actions ( { name c0; type cellSet; action clear; } { name c0; type cellSet; action invert; } { name c0; type cellSet; action delete; source boxToCell; sourceInfo { boxes ( ( 35 50 0 ) ( 65 70 80 ) ( 85 50 0 ) ( 115 70 80 ) ( 135 50 0 ) ( 165 70 80 ) ( 35 100 0 ) ( 65 120 80 ) ( 85 100 0 ) ( 115 120 80 ) ( 135 100 0 ) ( 165 120 80 ) ); } } ); // ************************************************************************* // To try out, I added forcecoeff function in controldict file. Code:
functions { forceCoeffs1 { // Mandatory entries type forceCoeffs; libs ("libforces.so"); patches (building); // Optional entries // Field names p p; U U; rho rho; rho rhoInf; rhoInf 1000; // Reference pressure [Pa] pRef 0; // Include porosity effects? porosity no; // Store and write volume field representations of forces and moments writeFields yes; // Centre of rotation for moment calculations CofR (0 0 0); // Lift direction liftDir (0 0 1); // Drag direction dragDir (0 1 0); // Pitch axis pitchAxis (1 0 0); // Freestream velocity magnitude [m/s] magUInf 30; // Reference length [m] lRef 80; // Reference area [m2] Aref 2400; // Spatial data binning // - extents given by the bounds of the input geometry binData { nBin 20; direction (0 1 0); cumulative yes; } } } // ************************************************************************* // Could anyone tell me how can I create patch for front face of each building which was deleted from topoSet? How can I use createPatch here? And if anyone has different approach, let me know. Thank you in advance : ) |
|
Tags |
createpatchdict, forcecoeffs, interfoam, toposetdict |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Stuck in a Rut- interDyMFoam! | xoitx | OpenFOAM Running, Solving & CFD | 14 | March 25, 2016 08:09 |
Problem with an old Simulation | FrankW | CFX | 3 | February 8, 2016 05:28 |
same geometry,structured and unstructured mesh,different behaviour. | sharonyue | OpenFOAM Running, Solving & CFD | 13 | January 2, 2013 23:40 |
Upgraded from Karmic Koala 9.10 to Lucid Lynx10.04.3 | bookie56 | OpenFOAM Installation | 8 | August 13, 2011 05:03 |
Could anybody help me see this error and give help | liugx212 | OpenFOAM Running, Solving & CFD | 3 | January 4, 2006 19:07 |