|
[Sponsors] |
[openComfort] Calculation Doubts in openComfort |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 21, 2017, 02:11 |
Calculation Doubts in openComfort
|
#1 |
New Member
Shadab Mohammed
Join Date: Aug 2017
Posts: 14
Rep Power: 11 |
Hi, Tobi and dear community,
Thank you so much for implementing the AOA calculation for compressible flow and I am sorry for giving this late reply. Dear Tobi, I have some doubts. 1) As I am away from my system installed OpenFOAM and don't know how to use OpenFOAM on Github platform. Therefore I have not compiled the code till now. But in solveAOA function for a compressible flow, I have seen that the dimensions of the source are given as s^(-1). But I think it should be kgm^(-3)s^(-1). 2) Through CFD discussion pages and googling I learned that autoPtr and tmp are smart pointers they used for memory management and without invoking the copy constructor of class therefore to save the memory and computational time. it works by creating a pointer to a class. But still, I do not have the full knowledge about them, when and how to use them in OpenFOAM. Please suggest me some material so that I can have a command on this topic. 3) For calculation of PMV, we have seen that the Relative Humidity specified as a fixed value for the whole domain. From the ventilation study, we found that the relative humidity is a local variable and it varies a lot in a domain. Therefore I am suggesting that we should solve a water species transport equation in addition to energy equation. From there we obtain the local partial pressure and corresponding to local temperature obtain the saturation pressure then we can obtain the Relative Humidity locally. 4) As you already discussed why can't we use local cell centered velocity instead of the whole average domain velocity and where can I find the EN ISO 7730 calculation. Thanks & Regards: Shadab Last edited by Tobi; October 21, 2017 at 10:04. |
|
October 21, 2017, 10:19 |
|
#2 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Hi Shadab,
I moved you post into a new thread because it is more about the implemented mathematics. First of all thank you for your words and second, lets go directly to your questions: Keep in mind I am not a civil engineer and I do not have any idea if the values we get from the library are trust able (not based on the equations - more based on the fact that I have no idea how it should be). Humidity If the humidity is complete different in the geometry, the results should be calculated based on a volScalarField humidity field. However, I have no time to investigate into that topic. Doing that should not be a big deal. E.g. setting up a humidity field. However, out of the box I have no idea about the functionalities of humidity based on temperature and pressure. Saturation Pressure As before, we could implement a local saturation pressure which is calculated based on other quantities. Right now the guy is evaluated in each cell but with a constant humidity based on the formula given there (I did not check this equation). Velocities As it is already in the source as a comment, I would personally use the local values instead of a averaged one. However, Thomas Tian who invented this comfort guy first did it that way. He is much more experienced in that topic than me so I kept it as it was but mentioned my doubts in the source code with the comment: Code:
//- Stil in question. Based on EN ISO 7730 calculation done with // an average velocity. However, shouldn't we use the value of each // cell separately? Uaverage(); DIN ISO 7730 You have to buy it. Pointer The autoPtr is a smart pointer like auto_ptr, static_ptr, dynamic_ptr as in the standard C++. The tmp<> pointer is smart enough to know how many pointers are pointing to the object. If there is no pointer pointing onto it, it will be destroyed. That was the reason why the reference: Code:
volScalarField& muEff = turb->muEff(); Code:
tmp<volScalarField> muEfft = turb->muEff(); volScalarField& muEff = muEfft();
__________________
Keep foaming, Tobias Holzmann |
|
October 25, 2017, 05:35 |
Dimension problem with AOA equation for compressible flow.
|
#3 |
New Member
Shadab Mohammed
Join Date: Aug 2017
Posts: 14
Rep Power: 11 |
Hello Tobi,
Thanks again for answering the above questions. The doubt with the first question is still remained, As after observing the equation of AOA for compressible flow we see that, all the terms in left hand side have a unit of kgm^(-3), while the right hand side it has a unit of sec^(-1). According to my observation the compiler should through a dimensional inconsistency error, while compiling the library, buts its not. may be I am missing some point, please help me to understand this.
__________________
--------------------------------------- Thanks & Regards: Shadab Mohammed |
|
October 25, 2017, 05:43 |
|
#4 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
No,
while constructing the matrix, we build single matrices which will be returned. In the Matrix-Construction, the units are changed and thus, the dimensions are correct. If one makes a mistake in the e.g. source term (wrong units), the calculation should give a dimension problem error (as you said). E.g. Code:
fvScalarMatrix ( fvm::ddt(S) <<< We build a new matrix and return (the units are not the units of S) +fvm::ddt(phi, S) <<< We build a new matrix and return (the units are not the units of S) == dimensionedScalar("S", dimensionSet(0,0,0,0,0,0,0), scalar(1)) <<< here we have to think about ); Code:
fvScalarMatrix ( tmp<fvScalarMatrix> // returned from fvm::ddt(S) + tmp<fvScalarMatrix> // returned from fvm::div(phi,S) == dimensionedScalar(..) ); I would expect that at the end we have: Code:
fvScalarMatrix ( tmp<fvScalarMatrix> // fvm::ddt(S) + tmp<fvScalarMatrix> // fvm::div(phi,S) == tmp<fvScalarMatrix> // dimensionedScalar(..) ); You should be able to check it out doing the following: Code:
fvScalarMatrix Test ( dimensionedScalar("foo", dimensionSet(0,0,0,0,0,0,0), scalar(1)) ); Info<< Test.dimensions() << endl; By the way: wasn't it you who asked me this question via E-Mail? I guess now it should be clear, right?
__________________
Keep foaming, Tobias Holzmann |
|
October 25, 2017, 06:13 |
|
#5 |
New Member
Shadab Mohammed
Join Date: Aug 2017
Posts: 14
Rep Power: 11 |
Dear Tobi,
I only ask the question regarding dimensional convention in fvMatrix through mail and at that time you clear my doubts with unsteady term, convection term and Laplace term. code: Code:
fvScalarMatrix AoAEqn ( fvm::ddt(rho, AoA) + fvm::div(phi, AoA) - fvm::laplacian(muEff, AoA) == dimensionedScalar ( "source", AoA.dimensions()*dimensionSet(0,0,-1,0,0,0,0), scalar(1) ) ); The integration of constant source term has(delV*source)= m^(-3)* sec^(-1). Which is different compare to left hand side. Forgive me if my explanation is wrong.
__________________
--------------------------------------- Thanks & Regards: Shadab Mohammed |
|
October 25, 2017, 06:19 |
|
#6 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Can you publish a short test case for compressible AoA calculations. As I said above, I build it but did not test it - do you get any dimension problems or is the calculation done without problems?
One remark. Based on your assumptions, the last term should only have m^3 because the source has s and I multiply it by 1/s.
__________________
Keep foaming, Tobias Holzmann |
|
October 25, 2017, 06:24 |
|
#7 |
New Member
Shadab Mohammed
Join Date: Aug 2017
Posts: 14
Rep Power: 11 |
I have not run any case the with compressible AOA, but i will do now and then i will let you know.
__________________
--------------------------------------- Thanks & Regards: Shadab Mohammed |
|
October 25, 2017, 06:26 |
|
#8 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
In the fvMatrix.C file you will see how the dimensionedScalar are used:
Code:
1151 template<class Type> 1152 void Foam::fvMatrix<Type>::operator-= 1153 ( 1154 const dimensioned<Type>& su 1155 ) 1156 { 1157 source() += psi().mesh().V()*su; 1158 } 1159 Code:
V = m^3 su = no unit // because the source is AoA*1/s
__________________
Keep foaming, Tobias Holzmann |
|
October 25, 2017, 07:04 |
|
#9 | ||
New Member
Shadab Mohammed
Join Date: Aug 2017
Posts: 14
Rep Power: 11 |
Dear Tobi,
yeah I understand the implementation of source term in fvMatrices. but I still have a doubt in this statement. Quote:
Quote:
__________________
--------------------------------------- Thanks & Regards: Shadab Mohammed |
|||
October 25, 2017, 07:37 |
|
#10 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Correct. The dimensions of the RHS should be rho*AoA as it would be in the integral form:
So the formulation should be: Code:
== dimensionedScalar ( "source", - AoA.dimensions()*dimensionSet(0,0,-1,0,0,0,0), + AoA.dimensions()*dimensionSet(0,0,-1,0,0,0,0)*rho.dimensions(), scalar(1) ) Thank you very much for the hint.
__________________
Keep foaming, Tobias Holzmann |
|
October 25, 2017, 07:50 |
|
#11 | |
New Member
Shadab Mohammed
Join Date: Aug 2017
Posts: 14
Rep Power: 11 |
The problem is resolved yet. It saying the improper way of calling the dimensioned function.
Quote:
I have another doubt, here instead of applying scalar (1) it should be multiplied with rho.
__________________
--------------------------------------- Thanks & Regards: Shadab Mohammed |
||
October 25, 2017, 08:00 |
|
#12 | |
New Member
Shadab Mohammed
Join Date: Aug 2017
Posts: 14
Rep Power: 11 |
The problem is resolved if we specify like this
Quote:
__________________
--------------------------------------- Thanks & Regards: Shadab Mohammed |
||
October 25, 2017, 08:01 |
|
#13 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Hi,
please pull my repo: Code:
wclean git pull wmake libso However, now I am even a bit confused :P I need some time to think about that. Thanks for the discussion.
__________________
Keep foaming, Tobias Holzmann |
|
October 25, 2017, 08:38 |
|
#14 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Summary. You were right with almost everything.
Code:
fvScalarMatrix AoAEqn ( fvm::ddt(rho, AoA) + fvm::div(phi, AoA) - fvm::laplacian(muEff, AoA) == dimensionedScalar ( "source", AoA.dimensions()*dimensionSet(0,0,-1,0,0,0,0), scalar(1) )*rho );
__________________
Keep foaming, Tobias Holzmann |
|
October 25, 2017, 09:16 |
|
#15 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
I made some stupid git things but now it should be fine with the commit 87209dc
I also put the new tutorial in. Let me know if there is some mistake.
__________________
Keep foaming, Tobias Holzmann |
|
October 26, 2017, 09:26 |
|
#16 |
New Member
Shadab Mohammed
Join Date: Aug 2017
Posts: 14
Rep Power: 11 |
Hello Tobi,
I have checked the comfortFoam solver for compressible flow in laminar and turbulent case. In both cases it is running fine and thank you so much for your cooperation. Actually i want to cross check the PMV and PPD equation. When I compare the equations from the given below website with the equations implemented in code, I observe some changes. Therefore, It will be nice if you can provide me the equations for PMV and PPD. The website link: https://sustainabilityworkshop.autod...hermal-comfort I am not able to obtain the expressions given in reference of the page.
__________________
--------------------------------------- Thanks & Regards: Shadab Mohammed |
|
October 29, 2017, 12:13 |
|
#17 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Hi,
the equations given in the website you refer to are not in correlation to the norm I have. I do not know if they also made mistakes (e.g. first term, e^( ) -> is exp in the new version 2005). The library I build is based on ISO 7730:2005. The link provides information of a 20 years older ISO norm. To check it, you need the reference.
__________________
Keep foaming, Tobias Holzmann Last edited by Tobi; October 30, 2017 at 03:21. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Dynamic mesh adaption in parallel calculation | xh110120 | FLUENT | 1 | March 12, 2016 08:05 |
Determining the calculation sequence of the regions in multe regions calculation | peterhess | OpenFOAM Running, Solving & CFD | 4 | March 9, 2016 03:07 |
Increase in CPU number during the FIRE calculation | amin_u50 | AVL FIRE | 0 | August 6, 2014 08:34 |
MRF and Heat transfer calculation | Susan YU | FLUENT | 0 | June 2, 2010 08:46 |
Warning 097- | AB | Siemens | 6 | November 15, 2004 04:41 |