adding Energy eqn to the porousSimpleFoam solver
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> >&) Best, Mostafa |
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 |
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 Code:
forAll(mesh.cellCentres(), cellI) |
Hi,
I am also trying to do the same. Did you figure out how to do it?? |
Hello,
Why don't you use buoyantSimpleFoam / buoyantBoussinesqSimpleFoam ? For porosity, just use fvOptions, with explicitPorositySource type. Regards, olivier |
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 |
2 Attachment(s)
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 |
All times are GMT -4. The time now is 17:56. |