energy equation for porousSimpleFoam
Hi dear foamers
I do not know how to add an energy equation to my solver (porousSimpleFoam).my flow is incompressible and I do not know how to add TEqn.H to my own solver.what should I do with (rho of fluid, Cp of it and also Sigma,k and q"') ? while the equation the equation is something like this: rho(fluid)*Cp(fluid)[sigma dt/dt + Udt/dx]=k d2T/dx2 + q'" + (mu/K) u^2 Sigma = [porosity(rho*cp)f+(1-porosity)*(rhoc)s]/(rho*cp)f q"' = (1- porosity) q'"s k= (porosity*kf) + (1- porosity)*ks please help me. fvScalarMatrix TEqn ( fvm::ddt(T) +fvm::div(phi,T) -fvm::laplacian(alpha,T) ); TEqn.solve(); what should I do with these kf,ks,.... how and where should I define them? Just right them in transportProperties in constant folder? Best regards Mohsen |
energy equation for porousSimpleFoam
hi dear Foamers
has anyone write this equation for his/her solver? I need emergent help in this case. I understand how to define my porous zone I want to add the energy equation to my solver I did it but didn't work I am here to ask you if you would help me or not I'm looking forward to your reply my friend I hope you can help me by your useful comments my equation is something like this rho(fluid)*Cp(fluid)[sigma dT/dt + UdT/dx]=k d2T/dx2 + q'" + (mu/K) u^2 Sigma = [porosity(rho*cp)f+(1-porosity)*(rhoc)s]/(rho*cp)f q"' = (1- porosity) q'"s k= (porosity*kf) + (1- porosity)*ks I also don't know how and where to define sigma,k... best regards Mohsen |
Greetings Mohsen,
Have a look into the solver rhoPorousSimpleFoam. The source code for it is located at "applications/solvers/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/". You can see the full path to it by running: Code:
echo $FOAM_SOLVERS/compressible/rhoSimpleFoam/rhoPorousSimpleFoam/ Or you can modify this equation to work the other way around, namely to solve the temperature and then calculate whatever else is needed. Good luck! Best regards, Bruno |
Hi all,
I am also working with same condition as yours. Now i am moving to heat transfer problem with porous media. May i know how to add energy equation with porousSimpleFoam solver case?? Thanks in advance, Vishsel |
Quick answer: In the current/modern OpenFOAM solvers, you can add porous mediums on any solver, without the need to modify the solver. See for example: https://openfoamwiki.net/index.php/DarcyForchheimer
|
Hi Bruno,
Thank you for your reply. Actually my case is HX which has solid parts and fluid domains. I need to find out heat transfer, for that i need to include energy equation to porousSimpleFoam solver(my case). How can i add energy equation to my case?? And How to create heat source in openfoam for my case?? Thank you, Vishsel |
Quick question: Which OpenFOAM version are you using?
|
Hi bruno,
I am using openfoam 2.3 version. I need to apply a heat source at wall BC and to see the distribution of heat. |
Quick answer: In OpenFOAM 2.3 you have the tutorial case "heatTransfer/chtMultiRegionSimpleFoam/heatExchanger" and demonstrates what you want to do, namely having heat exchange and a porous region.
|
Hi bruno,
Thank you for your reply. Thank you in advance Vishsel |
Hi bruno,
Thank you for your reply. Actually my need is to generate a heat at surface (i.e @solid wall BC). I have an input like heat flux value, heat generation value in W and how can i give heat flux or heat generation value in fvOptions file. And I have an another doubt, for my case whether i have to use type 1)scalarSemiImplicitSource (or) 2)externalWallHeatFluxTemperature in fvOptions and what are all the changes in fvSchemes & fvSolution files ??And this is my fvOptions file and values 50,137.5 are in watts Code:
wall-dp-1 Code:
Creating finite volume options from fvOptions Code:
ddtSchemes Code:
solvers Is it correct?? if it is wrong please correct me.. Thank you in advance Vishsel |
Quote:
Code:
volumeMode specific; // absolute; To calculate the value of 'h' you must divide the total volume where you want to apply this heat to the power in watts. for example: for your Code:
wall -dp -1 Code:
0.000333435 Code:
p(W)/volume i.e. 50,137.5 (in watts)/0.000333435 3. You don't really have to change anything in fvschemes and fvSolution for now and changes in fvSolution depends on your mesh quality etc. I also dont have much knowledge about different schemes and solvers. I can only help you with those that I have used so far. Hope it helps! |
Hi,
Thankyou so much for your reply. I am getting this error while running. Why iam getting this error?? Code:
Creating finite volume options from fvOptions Code:
FoamFile Thankyou in advance Vishnu |
What is wall -mp 1 , wall -dp 1 etc in your case?
And where are you defining it? |
Hi,
Those are all the boundary surface.. i need to generate the heat source on that surface of the wall wall-mp-1 wall-mp-2 wall-dp-1 wall-dp-2 |
I have only generated heat source on a body, but as far as I know to generate heat source on the surface you can directly assign the heat source on that particular surface as below:
Code:
heatSource |
Hi all,
Thankyou for your solution. @priyanka But still i am getting this error. And solver for ''h'' is not running. Code:
Creating finite volume options from fvOptions Code:
wall-mp-1 Code:
actions Thanks in advance, Vishnu |
I just recalled this,
You want to give power as an input to generate heat on your surfaces wall-mp-1 wall-mp-2 wall-dp-1 wall-dp-2 Right? If yes, then as far as I know you can not give power as input to a surface. Power can only be given as an input to a volume which means to a cellZone. you can give temperature as input to surfaces but not power because it is a volumetric identity. But maybe you can take opinion from others as I am also not very experienced in OpenFoam. |
Thank you for your reply.
I have an input like heat flux (W/m2) and heat generation (W). I have taken volume value from Code:
- selected 5338536 cell(s) with volume 0.000333435 But my case was to generate an heat at surface(@wall). Is it possible to give heat flux (W/m2) and heat generation (W) value as an input ??? |
All times are GMT -4. The time now is 15:20. |