|
[Sponsors] |
December 7, 2015, 08:36 |
|
#61 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Of course you can use this as a post-processing too.
Just use the velocity field U of your steady-state simulation and calculate your fluxes. Then just solve the equation of AoA. Finished (:
__________________
Keep foaming, Tobias Holzmann |
|
December 7, 2015, 08:50 |
|
#62 | |
Senior Member
Join Date: Jul 2009
Posts: 260
Rep Power: 18 |
Quote:
HTML Code:
functionObject HTML Code:
controlDict HTML Code:
functions { Tracer { type scalarTransport; functionObjectLibs ("libutilityFunctionObjects.so"); outputControl outputTime; active true; autoSchemes false; nCorr 0; resetOnStartUp false; fvOptions { IncrementTime { type scalarSemiImplicitSource; active true; selectionMode all; cellZone Layers; scalarSemiImplicitSourceCoeffs { volumeMode specific; injectionRateSuSp { Tracer (1 0); } } } } } } HTML Code:
pimpleFoam |
||
June 13, 2016, 18:26 |
|
#64 | |
Senior Member
|
Quote:
Is there any reason that one has to make a new solver and not to use the function object? Using FO seems easier and I see no difference. Is there anything I am missing? Best.
__________________
Learn OpenFOAM in Persian SFO (StarCCM+ FLUENT OpenFOAM) Project Team Member Complex Heat & Flow Simulation Research Group If you can't explain it simply, you don't understand it well enough. "Richard Feynman" |
||
June 13, 2016, 19:09 |
|
#65 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
It should work too
The problem is a bit older. When I made the first solver there was no possibility to do it with functions. Hence, I never tried it.
__________________
Keep foaming, Tobias Holzmann |
|
January 23, 2017, 16:58 |
|
#66 |
Member
Ahmad Habib
Join Date: Nov 2014
Location: Aleppo, Syria
Posts: 53
Rep Power: 12 |
Hello foamers.
I recently switched my working field to the thermal comfort analyses and I when I searched about that in OpenFOAM I find this code: https://sourceforge.net/projects/openfoamadd-ons/ And by reading the code I noticed that it can calculate the mean age of air and the ventilating efficiency and some other thermal comfort indicators (PMV, PPD, etc). But I didn't found any example of using it or weather it could be used in the steady state cases or what, so if any one used it or have any knowledge about something similar it would be great to share that with us Regards. |
|
January 27, 2017, 14:12 |
|
#67 |
Senior Member
Tian
Join Date: Mar 2009
Location: Berlin, germany
Posts: 122
Rep Power: 17 |
Hi,
here is a link for the download: comfortFoam https://bitbucket.org/shor-ty/comfor...AM-4.x#commits Bye Tian Sent from my iPhone using CFD Online Forum mobile app
__________________
BIM HVACTool, The Green Building Simulation Tool for OpenFOAM, Energy Plus and Radiance. |
|
January 28, 2017, 15:08 |
|
#68 |
Member
Ahmad Habib
Join Date: Nov 2014
Location: Aleppo, Syria
Posts: 53
Rep Power: 12 |
Hi Mr Tain
Please bear with me because I have a lot of questions. I'm using OpenFOAM 2.3.0 on Ubuntu 14.04 and after pasting the cloning code into my terminal inside the openFOAM directory, a new folder named "comfortFoam" created containing only a readme file with the same containing of the web site. Now the web site says: NOT IMPLEMENTED TILL NOW (so we can't use it ?, if so, when we can use it?) How to compile it - use git for cloning (and I think that I did that, correct?) - change to the branch (is that means to select 2.3.x ?, if so, how I can do that?, if not, what is that means ?) - compile with wmake (so it is not a dynamic library, correct?, so how we can use it? is it calculates the AoA, PMV, ... etc for the calculated results so I should use it after the simulation is finished? is this simulation is a steady state or transient one? And thanks for your time Regards Ahmad |
|
January 31, 2017, 09:46 |
|
#69 |
Senior Member
Tian
Join Date: Mar 2009
Location: Berlin, germany
Posts: 122
Rep Power: 17 |
Hi,
That is correct. This is a post processing tool. You run it after your solution. Age of Air can run during your simulation via controlDict. No need to do it in comfortFoam. I think comfortFoam is running under 4 version and 16+, too. Bye ä Thomas Sent from my iPhone using CFD Online Forum mobile app
__________________
BIM HVACTool, The Green Building Simulation Tool for OpenFOAM, Energy Plus and Radiance. |
|
January 31, 2017, 09:47 |
|
#70 |
Senior Member
Tian
Join Date: Mar 2009
Location: Berlin, germany
Posts: 122
Rep Power: 17 |
Hi,
You download via website or git. Than only run: wmake. It create a new tool: comfortFoam. Bye Thomas Sent from my iPhone using CFD Online Forum mobile app
__________________
BIM HVACTool, The Green Building Simulation Tool for OpenFOAM, Energy Plus and Radiance. |
|
February 16, 2017, 04:12 |
Compile error
|
#71 |
Member
Ahmad Habib
Join Date: Nov 2014
Location: Aleppo, Syria
Posts: 53
Rep Power: 12 |
Dear tian
I copied the files from the site and I got this error when I tried to compile it, Code:
a-habib@ahmad-PC:~/OpenFOAM/a-habib-4.x/comfortfoam$ wmake Making dependency list for source file comfortFoam.C g++ -std=c++0x -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3 -DNoRepository -ftemplate-depth-100 -I/home/a-habib/OpenFOAM/OpenFOAM-4.x/src/TurbulenceModels/turbulenceModels/lnInclude -I/home/a-habib/OpenFOAM/OpenFOAM-4.x/src/TurbulenceModels/incompressible/lnInclude -I/home/a-habib/OpenFOAM/OpenFOAM-4.x/src/transportModels -I/home/a-habib/OpenFOAM/OpenFOAM-4.x/src/transportModels/incompressible/singlePhaseTransportModel -I/home/a-habib/OpenFOAM/OpenFOAM-4.x/src/thermophysicalModels/radiation/lnInclude -I/home/a-habib/OpenFOAM/OpenFOAM-4.x/src/finiteVolume/lnInclude -I/home/a-habib/OpenFOAM/OpenFOAM-4.x/src/meshTools/lnInclude -IlnInclude -I. -I/home/a-habib/OpenFOAM/OpenFOAM-4.x/src/OpenFOAM/lnInclude -I/home/a-habib/OpenFOAM/OpenFOAM-4.x/src/OSspecific/POSIX/lnInclude -fPIC -c comfortFoam.C -o Make/linux64Gcc48DPInt32Opt/comfortFoam.o In file included from /usr/include/stdint.h:25:0, from /home/a-habib/OpenFOAM/ThirdParty-4.x/platforms/linux64/gcc-4.8.4/lib/gcc/x86_64-unknown-linux-gnu/4.8.4/include/stdint.h:9, from /home/a-habib/OpenFOAM/OpenFOAM-4.x/src/OpenFOAM/lnInclude/int32.H:40, from /home/a-habib/OpenFOAM/OpenFOAM-4.x/src/OpenFOAM/lnInclude/int.H:38, from /home/a-habib/OpenFOAM/OpenFOAM-4.x/src/OpenFOAM/lnInclude/label.H:39, from /home/a-habib/OpenFOAM/OpenFOAM-4.x/src/OpenFOAM/lnInclude/labelList.H:47, from /home/a-habib/OpenFOAM/OpenFOAM-4.x/src/OpenFOAM/lnInclude/UPstream.H:42, from /home/a-habib/OpenFOAM/OpenFOAM-4.x/src/OpenFOAM/lnInclude/Pstream.H:42, from /home/a-habib/OpenFOAM/OpenFOAM-4.x/src/OpenFOAM/lnInclude/parRun.H:35, from /home/a-habib/OpenFOAM/OpenFOAM-4.x/src/finiteVolume/lnInclude/fvCFD.H:4, from comfortFoam.C:52: /usr/include/features.h:374:25: fatal error: sys/cdefs.h: No such file or directory # include <sys/cdefs.h> ^ compilation terminated. make: *** [Make/linux64Gcc48DPInt32Opt/comfortFoam.o] Error 1 a-habib@ahmad-PC:~/OpenFOAM/a-habib-4.x/comfortfoam$ Thanks in advance Last edited by a_habib; February 16, 2017 at 05:59. |
|
February 16, 2017, 04:16 |
|
#72 |
Senior Member
Kevin van As
Join Date: Sep 2014
Location: TU Delft, The Netherlands
Posts: 252
Rep Power: 21 |
Quick random guess:
What is your gcc version? |
|
February 16, 2017, 04:22 |
|
#73 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Dear Habib,
it seems that you installed OpenFOAM either you compiled it yourself, right? The message of the compiler is not related to the application you try to compile it is an essential packaged that is missing on your system for c++. It is a standard library that you need to compile the application. I am too lazy to search for your but »here we go« ... It is not really polite, I know, but as a supporter I want that the questioner thinks about the problem :P. Good luck. PS: By the way it is TIAN not TAIN. PPS: In addition, you have to switch to the branch for your OpenFOAM version. That is my fault because I have no time to update the readme till now. Code:
git checkout
__________________
Keep foaming, Tobias Holzmann |
|
February 16, 2017, 04:59 |
|
#74 |
Senior Member
Tian
Join Date: Mar 2009
Location: Berlin, germany
Posts: 122
Rep Power: 17 |
__________________
BIM HVACTool, The Green Building Simulation Tool for OpenFOAM, Energy Plus and Radiance. |
|
February 16, 2017, 06:07 |
|
#75 |
Member
Ahmad Habib
Join Date: Nov 2014
Location: Aleppo, Syria
Posts: 53
Rep Power: 12 |
I'm really sorry for my mistake, I corrected it
I'm using a precompiled OP from http://rheologic.net and i know that i needed some packages to complete but my experience is not enough to figure it out PS I don't have any experience in git that's why I rely on others in that I'll try again Thanks a lot |
|
February 16, 2017, 06:45 |
|
#76 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
For git you need to do the following:
Code:
git checkout <tab><tab> HEAD OpenFOAM-4.x origin/OpenFOAM-2.3.x master origin/HEAD origin/OpenFOAM-4.x OpenFOAM-2.3.x origin/master Code:
git checkout OpenFOAM-4.x Code:
sudo apt-get install build-essential flex bison git-core cmake zlib1g-dev libboost-system-dev libboost-thread-dev libopenmpi-dev openmpi-bin gnuplot libreadline-dev libncurses-dev libxt-dev
__________________
Keep foaming, Tobias Holzmann |
|
February 16, 2017, 15:15 |
It worked
|
#77 |
Member
Ahmad Habib
Join Date: Nov 2014
Location: Aleppo, Syria
Posts: 53
Rep Power: 12 |
Dear Tobias
Thanks a lot for your effort and I'm really sorry for being such a lazy one I had to install a lot of things after some updating Code:
sudo apt-get update sudo apt-get install build-essential flex bison git-core cmake zlib1g-dev libboost-system-dev libboost-thread-dev libopenmpi-dev openmpi-bin gnuplot libreadline-dev libncurses-dev libxt-dev Code:
sudo apt-get install libx32gcc-4.8-dev sudo apt-get install libc6-dev-i386 LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:/usr/lib32:$LIBRARY_PATH export LIBRARY_PATH |
|
February 20, 2017, 16:02 |
Some Questions
|
#78 |
Member
Ahmad Habib
Join Date: Nov 2014
Location: Aleppo, Syria
Posts: 53
Rep Power: 12 |
Dear Tobi,
I tried to use the comfortFoam tool on the hotRoom tutorial using buoyantBoussinesqPimpleFoam (as a rough start) and -thanks to you- it worked as it says in its description, and in the end i got this message (No AoA file found in last time dictionary Skip calculation of AoA) when the { if (AoAHeader.headerOk())} wasn't satisfied, so, as it's obvious I need the AOA filed in the case files. could it be like this? (not in the hotRoom case, I mean generally) Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 4.x | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object AOA; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 -1 0 0 0 0]; // or [0 0 1 0 0 0 0 ]; internalField uniform 0; boundaryField { inlet { type fixedValue; value uniform 0; } outlet { type zeroGradient; } walls { type zeroGradient; } } // ************************************************************************* // Does it calculate the AOA only in the last time step? because I saw that it is reading the AOAHeader and creating the volScalarField nut and solving the AOAEqn only if (i+1==endTime) Code:
//- If last time, calcualte AoA if (i+1 == endTime) { Info << "Read header of AoA file if available" << endl; IOobject AoAHeader ( "AoA", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT ); if (AoAHeader.headerOk()) { Info<< "Create field AoA\n" << endl; volScalarField AoA(AoAHeader, mesh); Info<< "Backup original AoA file to AoA.old\n" << endl; mvBak(AoA.objectPath(), "old"); #include "createPhi.H" Info<< "Create field nut\n" << endl; const volScalarField nut ( IOobject ( "nut", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh ); int count = 0; while (true) { fvScalarMatrix AoAEqn ( fvm::ddt(AoA) + fvm::div(phi, AoA) - fvm::laplacian(nut, AoA) == dimensionedScalar ( "ageSource", AoA.dimensions()*dimensionSet(0,0,-1,0,0,0,0), scalar(1) ) ); AoAEqn.relax(); AoAEqn.solve(); count++; . . . At last, I noticed that you had uncommented the calculation of the mid, max AOA and the AE, so if I recommented these lines back it should work, correct? or you'r blanning to modify some thing? Code:
if (count > 500) { AoA.write(); // // scalar cellsum(0); // scalar midAoA(0); // scalar volume(0); // // forAll(mesh.cells(), cellI) // { // midAoA += AoA[cellI] * mesh.V()[cellI]; // volume += mesh.V()[cellI]; // cellsum++; // }; // // scalar maxValue = max(AoA).value(); // // Info<< "Average age of air " // << (midAoA/volume) << " s\n" // << "Maximum age of air " // << maxValue << " s\n"; // // // AE = (Tn/2TM) x 100 % // Info<< "Room volume " // << gSum(mesh.V()) << " m3\n"; // << "Ventilation efficiency AE = " // << (gSum(mesh.V())/sumZuluft)/(2*(maxValue/3600)) // << " %" << endl; break; } Regards, Ahmad. |
|
February 23, 2017, 04:52 |
|
#79 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Dear Ahmad,
first of all thank you for the feedback but the fruits should go more to Thomas Tian because he programmed it and asked me if I can extend it and or host it. Till now I just changed a few things like:
You are right, if you want to calculate the mean time of the air you have to put a file to the last time step which looks like you had. The 500 times is like that we calculate the matrix 500 times in order to get an accurate solution. This implementation is stupid and I wanted to change it some when but no time. Now, I even think the whole calculation of AoA is not correct because it does not make sense for me at the moment :P. I will not work on that code till a new version is out and I have to re-build it for the new FOAM-version (if necessary). In addition, I should split the code into more files. PS: If you think about the equation AoAEqn, you will understand that it should be definitely wrong, right? But I have to check.
__________________
Keep foaming, Tobias Holzmann |
|
February 23, 2017, 09:16 |
|
#80 |
Member
Ahmad Habib
Join Date: Nov 2014
Location: Aleppo, Syria
Posts: 53
Rep Power: 12 |
Ok dear Tobi
Thanks for the response and I'll keep looking into it and waiting for the update Sent from my iPhone using CFD Online Forum mobile app |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
air bubble is disappear increasing time using vof | xujjun | CFX | 9 | June 9, 2009 08:59 |
local age of air in starccm+ | Mike23 | Siemens | 3 | September 20, 2008 12:16 |
[Indoor Air Quality]How do I calcauate "Age of Air | Young | CFX | 6 | April 29, 2008 00:14 |
age of air | teddy | Siemens | 3 | February 9, 2007 10:41 |
Age of Air In Star-CD | Ted Crilly | Siemens | 1 | February 19, 2005 20:50 |