CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [openComfort] New openComfort library published (https://www.cfd-online.com/Forums/openfoam-community-contributions/191950-new-opencomfort-library-published.html)

Tobi August 25, 2017 04:29

New openComfort library published
 
Hi all,

I am happy to announce that I developed a new openComfort library + application which can be used to analyze thermal comfort behavior based on EN ISO 7730. The code can be found on my website including the openComfort library, the comfortFoam application and two tutorials that show how to use it. Based on the fact that I am not a civil engineer or at least working in that field of application, I cannot tell you if the values that are calculated are reliable. Feedback is welcomed.

In addition, I will not support / update or change the old comfortFoam which was developed by Thomas Tian. I keep it on my bitbucket but it contains some mistakes and based on the new library (which allows easier maintenance and extension) it is depreciated.

The library calculates:
  • The mean time of the air
  • The PMV (predicted mean vote)
  • The PPD (predicted percentage of dissat.)


The library and application can be found on Holzmann CFD | Software Development



http://holzmann-cfd.de/cfd-online/openComfort.png

zordiack September 27, 2017 06:48

This is great! I've been thinking about doing something like this for a long time now but haven't had the time. It would be great to have something like this included as a functionObject to OpenFOAM code base. I will definitely test this :)

Also, I think it should be pretty easy to add other thermal comfort models to the library?

Tobi September 27, 2017 07:43

Hi,

I was forced by Thomas Tian to do it :) - he never gave up asking me: Tobi when do you check the comfortFoam application. However, I did a complete new development exactly based on easy maintenance and flexibility. Due to the fact that it is a library now, you can easily add it to the functions and using it in the postProcess utility. I was mentioning it to the Foundation (https://bugs.openfoam.org/view.php?id=2678) but it should be extended further. Right now I only added the usage to incompressible flows. If you extend it, feel free to make a push request.

Shadab October 12, 2017 05:36

Error with Comfortfoam Solver while running in K-Epsilon
 
1 Attachment(s)
Hi Tobi,

I have downloaded the comfortFoam solver, from your website and compiled it successfully.

As I am interested in your solver and want to make it for compressible flow cases, presently i am checking your solver for incompressible case with K-Epsilon model.

Your solver running fine on simple geometry case in laminar flow, when i want to run this solver by using RAS K-epsilon model. The bouyantBoussinesq solver completed its 600 iteration, but upon using comfortFoam solver, in its first iteration after Solution of AOA this error has generated.
Quote:

Cleaning /home/mechartes/OpenFOAM/OpenFOAM-5.0/src/opencomfort/tutorials/simpleGeometry case

-------------------------------------------------------------------------------
Tutorial by Tobias Holzmann :: Generated on August 2017
Build for OpenFOAM version :: OpenFOAM-5.x
Tested on system :: Ubuntu 16.04
-------------------------------------------------------------------------------


Topic: Checking the functionality of the openComfort library
-------------------------------------------------------------------------------
- Check OpenFOAM version. We need OpenFOAM-5.x
- You are not using the correct OpenFOAM version
Your version is OpenFOAM-5.0 and we need OpenFOAM-5.x

- Proceed with your OpenFOAM version (y/n): y


Start meshing
-------------------------------------------------------------------------------

- Create simple geometry
- Change patch types


-------------------------------------------------------------------------------
End Meshing


- Copy 0.org to 0
- Start simulation (approximately 10 seconds)
- Simulation ended


- Start comfortFoam
#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3 ? in "/lib/x86_64-linux-gnu/libm.so.6"
#4 ? in "/lib/x86_64-linux-gnu/libm.so.6"
#5 ? in "/lib/x86_64-linux-gnu/libm.so.6"
#6 pow in "/lib/x86_64-linux-gnu/libm.so.6"
#7 Foam::pow(Foam::Field<double>&, Foam::UList<double> const&, double const&) at ??:?
#8 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::pow<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<doub le, Foam::fvPatchField, Foam::volMesh> > const&, Foam::dimensioned<double> const&) at ??:?
#9 Foam::openComfort::TSurfaceCloth(Foam::GeometricFi eld<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::dimensioned<double> const&, Foam::dimensioned<double> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) const at ??:?
#10 Foam::openComfort::pmv() at ??:?
#11 ? in "/home/mechartes/OpenFOAM/mechartes-5.0/platforms/linux64GccDPInt32Opt/bin/comfortFoam"
#12 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#13 ? in "/home/mechartes/OpenFOAM/mechartes-5.0/platforms/linux64GccDPInt32Opt/bin/comfortFoam"
./run: line 68: 6685 Floating point exception(core dumped) comfortFoam > logComfort
From the error report i found that the error was in pow() function arguments which used during the surface temperature calculation, which inturn used pmv() function.

Please help me out of this problem. I have attached my log files in simple geometry zip file.

Thanks & Regards
Shadab

Shadab October 13, 2017 08:37

Implementation of Comprssible part for the calculation of AOA
 
1 Attachment(s)
Hello Foamers,

I have try to implement the compressible part in openComfort.C file. I am not very good in implementing of solver, I understand the code and try to implement the compressible part of it. When I compiled the solver it is giving many errors, I am understanding the errors but I am not able to find the solution. The error report is given below.


Code:

mechartes@MRDC-001:~/Thermal_Comfort/Solver_Development/opencomfort/src/openComfort$ wmake
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file openComfort.C
g++ -std=c++11 -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 -O0 -fdefault-inline -ggdb3 -DFULLDEBUG -DNoRepository -ftemplate-depth-100 -I/home/mechartes/OpenFOAM/OpenFOAM-5.0/src/TurbulenceModels/turbulenceModels/lnInclude -I/home/mechartes/OpenFOAM/OpenFOAM-5.0/src/TurbulenceModels/incompressible/lnInclude -I/home/mechartes/OpenFOAM/OpenFOAM-5.0/src/transportModels -I/home/mechartes/OpenFOAM/OpenFOAM-5.0/src/transportModels/incompressible/singlePhaseTransportModel -I/home/mechartes/OpenFOAM/OpenFOAM-5.0/src/transportModels/compressible/lnInclude -I/home/mechartes/OpenFOAM/OpenFOAM-5.0/src/thermophysicalModels/basic/lnInclude -I/home/mechartes/OpenFOAM/OpenFOAM-5.0/src/thermophysicalModels/radiation/lnInclude -I/home/mechartes/OpenFOAM/OpenFOAM-5.0/src/TurbulenceModels/turbulenceModels/lnInclude -I/home/mechartes/OpenFOAM/OpenFOAM-5.0/src/TurbulenceModels/compressible/lnInclude -I/home/mechartes/OpenFOAM/OpenFOAM-5.0/src/finiteVolume/lnInclude -I/home/mechartes/OpenFOAM/OpenFOAM-5.0/src/meshTools/lnInclude -IlnInclude -I. -I/home/mechartes/OpenFOAM/OpenFOAM-5.0/src/OpenFOAM/lnInclude -I/home/mechartes/OpenFOAM/OpenFOAM-5.0/src/OSspecific/POSIX/lnInclude  -fPIC -c openComfort.C -o Make/linux64GccDPInt32Debug/openComfort.o
openComfort.C: In member function ‘void Foam::openComfort::AoA() const’:
openComfort.C:231:13: error: ‘rho’ was not declared in this scope
            rho,
            ^~~
openComfort.C:232:13: error: ‘U’ was not declared in this scope
            U,
            ^
openComfort.C:233:13: error: ‘phi’ was not declared in this scope
            phi,
            ^~~
openComfort.C:234:13: error: ‘thermo’ was not declared in this scope
            thermo
            ^~~~~~
In file included from openComfort.C:238:0:
/home/mechartes/OpenFOAM/OpenFOAM-5.0/src/finiteVolume/lnInclude/compressibleCreatePhi.H:41:9: error: ‘runTime’ was not declared in this scope
        runTime.timeName(),
        ^~~~~~~
/home/mechartes/OpenFOAM/OpenFOAM-5.0/src/finiteVolume/lnInclude/compressibleCreatePhi.H:42:9: error: ‘mesh’ was not declared in this scope
        mesh,
        ^~~~
/home/mechartes/OpenFOAM/OpenFOAM-5.0/wmake/rules/General/transform:25: recipe for target 'Make/linux64GccDPInt32Debug/openComfort.o' failed
make: *** [Make/linux64GccDPInt32Debug/openComfort.o] Error 1

I also attached the codes in zip file. I understand that error was in creation of smart pointer to compressible turbulence class, I think the error is due to that, the header file of compressible case is not compiling properly. Please have a look in openComfort.C file.

Thanks and Regards
Shadab

Tobi October 13, 2017 08:46

Hi,

if you build it, keep a clean programming and make a pull request. I can add the extension and do not provide it myself (lack of time). However to your problem. As it is written, e.g. rho is not defined:

Code:

      solveAoA(rho, muEff, phi);
it indicates that rho is not defined. Actually if you check your case, you will figure out that there is no rho definition.
To your comment with the references (turb->muEff()); I don't know why I did not use a reference here but there was a reason for doing that. Cannot remember.
Is there a reason why you comment the incompressible code pieces?

Tobi October 14, 2017 07:56

Compressible AoA Implemented
 
Hi Shadab Mohammed and dear community,

based on the try of Shadab to implement the compressible AoA calculation into the openComfort library, I took the time to implement the it today. In addition, I can tell you why we could not use the references in the viscosity statement. The nuEff() function will return a tmp<> object. I tried to wrap it to get the reference but it was not working. Right now the only way is the copy but I do not know if it is a real copy in that case. I have to check out the tmp class for that to be sure what is going on here.

Please let me know if the calculation works.


  • The implementation of the compressible AoA treatment is implemented forOpenFOAM-5.x
  • See commit 0012536

Tobi October 15, 2017 05:56

Problem with the copy of the nuEff() and muEff() field is resolved by commit f1a1a2de3b3f1828d3f4eb108d6509992ff9a8f6

Antimony October 16, 2017 02:32

Hi Tobi,

Noticed that you are missing a } in line 203 of openComfort.C in the latest commit.

Cheers,
Antimony

Tobi October 16, 2017 03:00

Good morning Antimony,

thank you for the report. Interesting because I checked the compilation yesterday. However, maybe my fingers in vim were too fast and I did some deletion. The problem is resolved in commit 21922e6f4476c0c5697c4949245c6835ab77ef27

a_habib February 1, 2019 07:01

Hello Tobias
Great library, but if it is possible I need some documentation about the theoretical and mathematical equations about the calculation of PMV, Tcl, and AoA.

Thanks in advance.

Regards.

minecraftgp April 7, 2019 12:57

Hi Tobi,

The opencomfort code is no longer in your bitbuket, could you give another link available?

Cheers

Tobi June 28, 2019 10:35

Hi,

I am sorry but I closed the code.

Tobi October 16, 2019 13:44

Hi everybody,


I rebuild the code as objectFunction which will be released soon in the DEV line of the Foundation version.

Enjoy.


All times are GMT -4. The time now is 11:41.