Adding Energy Equation for porousSimpleFoam
Hi,
I am new to openFOAM. I am trying to add energy equation for simplePorousFoam. I initially attempted the same for simpleFoam solver by
This ran successfully. I repeated the same for porousSimpleFoam. Practically, this doesn't work as the energy equations are different for different domains (porous and non porous). OpenFOAM deals with this my making modifications in the equation based on the inout porosity parameters. It used member functions like
Could anyone help me to implement the similar approach for energy equation too?? |
porousSimpleFoam
Hi all,
Can someone explain me how the porous simple foam works? All I know is it modifies the original momentum equation just for the porous zone I want to add a temperature equation in the same way. It should have basic energy equation for fluid zone and porous temperature equation for porous zone. So, can someone help me out with this? Thank You, Yesaswi |
Hi Yesaswi
I have a problem same as you. If you know about that. Could you describe to me pls. Thx |
porousSimpleFoam add an additional force term in the region where porosity is defined, do not solve a different equation there.
So, if you want temperature equation everywhere and just add a source/sink in the porous regions that is fine, you can use fvOptions for simple sources or swak SourceExpression for more elaborated ones. If you want to solve two distinct equations depending on the region, you need something like multiregion handling, like in conjugate heat transfer, because there you will have boundary conditions in the interface to keep the problem well-posed. That is difficult, I think and I cannot help with that. Could you describe a bit better your problem? |
Hi klilla
I use fvOptions for source but it has error. Can you explain me about that pls. Code:
#0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam221/platforms/linuxGccDPOpt/lib/libOpenFOAM.so" Kittipos |
porousSimpleFoam
1 Attachment(s)
Hi,
I am new to openFOAM. I am trying to simulate Heat transfer from a porous square cylinder maintained at constant temeperature to a flowing wind.I want to add temperature equation and Brinkmann term for PorousSimpleFoam. initially I added TEqn.H similar to procedure explained for icofoam solver and made necessary changes in header file ,create fields and make file here are my observations for which i need some clarifications TEqn:fvScalarMatrix TEqn ( //fvm::ddt(T) // <--- steady state simulation, so ddt disabled... //+ fvm::div(phi, T) - fvm::laplacian(DT, T) == fvOptions(T) // porouszone is maintained at const. temperature ); TEqn.relax(); fvOptions.constrain(TEqn); TEqn.solve(); fvOptions.correct(T); UEqn: tmp<fvVectorMatrix> tUEqn ( fvm::div(phi, U) //- fvm::laplacian(nu, U) //<<------ here i added brinkmann term + MRF.DDt(U) + turbulence->divDevReff(U) == fvOptions(U) ); fvVectorMatrix& UEqn = tUEqn.ref(); UEqn.relax(); header file modifications // Pressure-velocity SIMPLE corrector { #include "UEqn.H" #include "TEqn.H" // TEqn included here #include "pEqn.H" } laminarTransport.correct(); turbulence->correct(); Make file modifications: my_porousSimpleFoam.C EXE = $(FOAM_USER_APPBIN)/my_porousSimpleFoam fvOptions Dict: s1 { type scalarFixedValueConstraint; active true; scalarFixedValueConstraintCoeffs { selectionMode cellZone; cellZone porousBlockage; volumeMode uniform; fieldValues { T 303; } } } incoming flow is at const temp. 283 following are the flow and heat transfer parameters considered Re 40 Darcy no (Da ): 10e-6,10e-4 ,10e-2 porosity values: 0..629,0.8,0.993 Pr :0.71 when i run the simulation the Cd and Nusselt number values are not matching with the case which i want to validate So, can someone help me out with this? Thank You, Svramana |
multiRegionReactingPorousSimpleFoam
Hello Ramana,
Seems like you got the hang of things, creating your own solver, feel free to link your case and I may be able to look into it in the upcoming weekend. In the mean time, I have been working on a chemical catalyst model expanding upon the usermade solver called multiRegionSimpleReactingFoam (originally by TonkomoLLC https://github.com/TonkomoLLC/multiRegionReactingFoam). I have added a thermal model to the solid domain inside of the fluid domain, which may be a reacting mixture or not. This solver is not validated or tested enough but builds in OF4 (I'll soon update it to OF5), but it may give you a hint at what may the be next move. The solver does not include a heat transfer model between the porous media and the fluid, however, it may be included using fvoptions. Hope its of any help. https://www.dropbox.com/s/vgtl1o1be5...am.tar.gz?dl=0 Regards Lasse |
Quote:
Dear Lasse, Thank you so much for your replay and please find the case folder (solver ,case and ref. paper) for your reference . I will definitely go through the reference link and will update you . https://www.dropbox.com/s/e3i9wxifcg...e1.tar.gz?dl=0 Reagards, S.V.Ramana |
Hello Ramana,
I implemented your case in the following: https://www.dropbox.com/s/eesdzhxa6x...er.tar.gz?dl=0 I chose to solve it with chtMultiRegionSimpleFoam, a transient version also exists, however, you may not agree with the implementation. The main issue is the porosity model inside the porous domain, it is just solved as normal fluid problem. To improve it either implement a porousity model in fvoption applying it only in the porous domain or divide the domain into a non porous domain or a porous domain, and then implement a custom boundary condition from the fluid - fluid inside porous domain. I would due the prior as its much simpler compared to the custom boundary conditions. Let me know if you have any questions, it was just a quick setup and the case is ready for the chtMultiRegionSimpleFoam call, if you wish to recreate it just create your mesh as usual and use the topodict on only the solid (porous) domain, by copying the polymesh into the porous folder and running the Allporos. Additionally, note that I build the case based upon the heatTransfer tutorial chtMultiRegionSimpleFoam called heatExchanger, and that the AoE and htcConst should be determined from the heat transfer rate between the solid porous domain and the fluid. Regards Lasse. |
Quote:
I am using single domain approach ,i don't have the thermo physical properties.All i have is Reynold number(nu),Pr No:0.71(for air),permiability K and porosity. |
Hello Ramana,
My bad, however, as the tempererature is fixed any of the solid properties don't matter. The reason for the implementation is due to the enthalpy setup in chtMultiregionFoam allowing for a simple heat exchanger model implementation, which also may be used for a single domain approach. If you plan on using your own solver, I would implement the heat transfer model in the fvOptions based upon heat transfer in a porous domain. Below is an example of a abit more complex heat source implementation in chtMultiRegionFoam, showing how to call cell values in fvoptions and defining a source. Code:
energySource |
problem with porousmedia heat transfer using simple foam
Hi,
i Code:
f you want temperature equation everywhere and just add a source/sink in the porous regions that is fine, you can use fvOptions for simple sources Regards, S.V.ramana |
Hello Ramana,
Sorry for the late reply, however, I realised that the above mentioned piece of code does not work with the TEqn, and requires EEqn(to my understanding) and is therefore not of use to you unless you use solvers like chtMultiRegionFoam. To define the conditions between the porous zone and fluid I would suggest you looking into empirical relations or analytical porous reactor modelling as it will describe modelling of the heat transfer between the two regions. Here is a source in regarding the above: https://www.politesi.polimi.it/bitst..._DiStefano.pdf Sorry for the inconvenience, regards Lasse. |
Dear Lasse,
Thanks for your case and explanations, it really helps me a lot cause I am building a transient case with a 3 region problem (air/porous/air) non thermal equilibrium between hot air going through the porous zone. Quote:
Can you explain the difference between both approaches ? Thanks ! adrià |
Hello Adrià, to my understanding the porousSimpleFoam allows for either implicit in the tensorial resistance or the transport using the spherical part of the resistance in the momentum diagonal (from the solver source).
The transport approach is used by fvOptions through the means of the Darcy-Forchheimer model. I would say it would be the same approach and as accurate using the Darcy-Forchheimer model, and could easily be tested with use of a simple case, first solved with porousSimpleFoam and then chtMultiRegionFoam. Regards Lasse |
Quote:
Adrià |
Const. Temp on porous cylinder surface
Hi all
Code:
TEqn:fvScalarMatrix TEqn how to define const.Temperature only on walls of porouszone ? Regards, Ramana |
I think you would need to define a separate faceZone for that and not using the cellZone defined for the porous Zone.
|
Fixed temperature on face zone
Quote:
|
No, indeed not. You can only set it in cells. But what you can easily do is to separate the first cell zone attached to the boundary. It is an approximation, but better then nothing.
I tried to see if you could do it with swak4foam, but could not find anything like that. |
Quote:
Regards Ramana |
All times are GMT -4. The time now is 14:33. |