|
[Sponsors] |
adding Energy eqn to the porousSimpleFoam solver |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 17, 2014, 10:13 |
adding Energy eqn to the porousSimpleFoam solver
|
#1 |
Senior Member
|
hi everybody,
I'm Trying to add Energy Eqn to the porousSimpleFoam solver and I'm encountering some problems. I want to solve natural convection in a porous zone. I added TEqn and necessary terms to momentum equation, but when I wmake it the below error appeared: Code:
/home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/fvMatrix.C:1862:34: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foam::operator+(const Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >&, const Foam::tmp<Foam::fvMatrix<Type> >&) /home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/fvMatrix.C:2101:34: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foam::operator+(const Foam::fvMatrix<Type>&, const Foam::dimensioned<Type>&) /home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/fvMatrix.C:2114:34: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foam::operator+(const Foam::tmp<Foam::fvMatrix<Type> >&, const Foam::dimensioned<Type>&) /home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/fvMatrix.C:2127:34: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foam::operator+(const Foam::dimensioned<Type>&, const Foam::fvMatrix<Type>&) /home/mostafa/OpenFOAM/OpenFOAM-2.1.0/src/finiteVolume/lnInclude/fvMatrix.C:2140:34: note: template<class Type> Foam::tmp<Foam::fvMatrix<Type> > Foam::operator+(const Foam::dimensioned<Type>&, const Foam::tmp<Foam::fvMatrix<Type> >&) make: *** [Make/linux64GccDPOpt/bbpsfMy.o] Error 1 Best, Mostafa |
|
March 26, 2014, 01:56 |
|
#2 |
Senior Member
|
and finally, after lots of endeavor, I couldn't do that!!!!
so I decided to write the code in my way and don't using the porousZone of OF! but I have a big problem: I don't know how to specify an equation for a region that I defined it in my mesh?!?! how can I tell OF that the zone, for example, named PorousZ have different governing equation with the other zone? or how can I use a source term in my equations that have a coefficient like 'beta': beta=0 if zone=FluidZ beta=1 if zone=PorousZ ? thanks Mostafa |
|
March 26, 2014, 03:52 |
|
#3 |
Member
Christian Butcher
Join Date: Jul 2013
Location: Japan
Posts: 85
Rep Power: 13 |
Dear Mostafa,
I haven't tried doing this, but my guess is that you might find your second method easier. If you can write a set of equations which is applied to all of your mesh, with all of the mesh being affected by a source term, which is multiplied by zero for your FluidZ zone, then that should be fairly simple? Assuming that your zones are constant in time, you can use something like Code:
volScalarField betaMultiplier ( IOobject ( "beta", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE, true ), mesh, dimensionedScalar ( "beta", dimensionSet(0, 0, 0, 0, 0, 0, 0), 0.0 ), // Some boundary types here - I guess these might not matter? ); Code:
forAll(mesh.cellCentres(), cellI) { if (some test for zones) { betaMultiplier.internalField()[cellI] = 1; } else { betaMultiplier.internalField()[cellI] = 0; } } |
|
March 31, 2014, 21:14 |
|
#4 |
New Member
Yesaswi
Join Date: Jan 2014
Posts: 26
Rep Power: 12 |
Hi,
I am also trying to do the same. Did you figure out how to do it?? |
|
April 1, 2014, 05:17 |
|
#5 |
Senior Member
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 18 |
Hello,
Why don't you use buoyantSimpleFoam / buoyantBoussinesqSimpleFoam ? For porosity, just use fvOptions, with explicitPorositySource type. Regards, olivier |
|
April 1, 2014, 05:29 |
|
#6 | |
Senior Member
|
Quote:
AFAIK, fvOptions is just for OF-2.2.x, am I right? It's a good idea, but I haven't enough information about how fvOptions works! can you please give me some information? Thanks a lot for your idea, Mostafa |
||
April 1, 2014, 05:49 |
|
#7 |
Senior Member
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 18 |
hello,
fvOption should work for at least OF 2.2 and 2.3 Here is an exemple file for fvOption with porosity, and also with the topoSetDict. Both should be in system. Just run "topoSet" to create the cellZone before running the solver. regards, olivier |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
chtMultiRegionSimpleFoam | samiam1000 | OpenFOAM Running, Solving & CFD | 39 | March 31, 2016 09:43 |
Adding Radiation to a turbulent solver | MasAmi | OpenFOAM Running, Solving & CFD | 0 | October 25, 2013 03:36 |
energy eqn + constant fluid properties | cfx_user | Main CFD Forum | 1 | March 6, 2013 08:13 |
Different ans of poisson eqn with different solver | Quarkz | Main CFD Forum | 0 | October 6, 2005 12:49 |
Solver for poisson eqn in FVM? Mudpack, fishpack.? | zonexo | Main CFD Forum | 0 | October 5, 2005 20:11 |