
[Sponsors] 
use of porous media with sonicFoam or rhoCentralFoam 

LinkBack  Thread Tools  Search this Thread  Display Modes 
February 2, 2018, 15:54 
use of porous media with sonicFoam or rhoCentralFoam

#1 
New Member
Join Date: Aug 2017
Posts: 18
Rep Power: 8 
Hello!
How can I use a porous media/cell zone with transient solver like sonicFoam or rhoCentralFoam? Do I need to implement the code for the porous zones in the solver or there is another way to do it? I want to use the porous zone near the walls and the sonicFoam/rhoCentralFoam for the farfield domain. Regards. 

February 8, 2018, 06:49 

#2 
Senior Member
Deep
Join Date: Oct 2017
Posts: 180
Rep Power: 8 
Were you able to use those sovlers (esp. sonicFoam) for your case? Could you share the outcome please?


February 11, 2018, 01:02 

#3  
Member
mahdi
Join Date: Nov 2015
Location: Paris, France
Posts: 32
Rep Power: 10 
Quote:
If I understand correctly your question, you want to simulate a porous zone with a transient solver? right? you can define a porous zone in your mesh and then use fvOptions. If my answer is what you are looking for and you need further information please don't hesitate to ask. Bests 

February 13, 2018, 12:46 

#4  
New Member
Join Date: Aug 2017
Posts: 18
Rep Power: 8 
Quote:
Thank you for your answer. Yeah, that's what I need, more or less. I tried to define the porous zone with topoSetDict and then use the fvOptions as you said. It looks like it reads the porous zone when i run the solver but after 3 iterations i get this: Code:
/**\  =========    \\ / F ield  OpenFOAM: The Open Source CFD Toolbox   \\ / O peration  Version: v1706   \\ / A nd  Web: www.OpenFOAM.com   \\/ M anipulation   \**/ Build : v1706 Arch : "LSB;label=32;scalar=64" Exec : rhoCentralFoam Date : Feb 13 2018 Time : 19:16:39 Host : "themistoklisdesktop" PID : 14946 Case : /home/themistoklis/VKI/3D/LES/cases_folder/ssLESporosity1 nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring runtime modified files using timeStampMaster (fileModificationSkew 10) allowSystemOperations : Allowing usersupplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create mesh for time = 0 Reading thermophysical properties Selecting thermodynamics package { type hePsiThermo; mixture pureMixture; transport const; thermo hConst; equationOfState perfectGas; specie specie; energy sensibleInternalEnergy; } Reading field U Creating turbulence model Selecting turbulence model type LES Selecting LES turbulence model kEqn Selecting LES delta type vanDriest Selecting LES delta type cubeRootVol LES { LESModel kEqn; turbulence on; printCoeffs on; delta vanDriest; cubeRootVolCoeffs { deltaCoeff 1; } PrandtlCoeffs { delta cubeRootVol; cubeRootVolCoeffs { deltaCoeff 1; } smoothCoeffs { delta cubeRootVol; cubeRootVolCoeffs { deltaCoeff 1; } maxDeltaRatio 1.1; } Cdelta 0.158; } vanDriestCoeffs { delta cubeRootVol; cubeRootVolCoeffs { deltaCoeff 1; } smoothCoeffs { delta cubeRootVol; cubeRootVolCoeffs { deltaCoeff 1; } maxDeltaRatio 1.1; } Aplus 26; Cdelta 0.158; } smoothCoeffs { delta cubeRootVol; cubeRootVolCoeffs { deltaCoeff 1; } maxDeltaRatio 1.1; } Ce 1.048; Ck 0.094; } Creating finite volume options from "system/fvOptions" Selecting finite volume options model type explicitPorositySource Source: porosity_wall  selecting cells using cellZone porosity_wall Porosity region porosity_wall: selecting model: DarcyForchheimer creating porous zone: porosity_wall coordinateSystem origin: (0 0 0) e1 (1 0 0); e2 (0 1 0); e3 (0 0 1); local bounds: (2e+300 2e+300 2e+300) fluxScheme: Kurganov Starting time loop > FOAM Warning : From function virtual void Foam::probes::findElements(const Foam::fvMesh&) in file probes/probes.C at line 122 Did not find location (0.5 0.5 0.35) in any cell. Skipping location. Mean and max Courant Numbers = 0.0011493 26.4788 deltaT = 1.8883e10 Time = 1.8883e10 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 diagonal: Solving for rhoUx, Initial residual = 0, Final residual = 0, No Iterations 0 diagonal: Solving for rhoUy, Initial residual = 0, Final residual = 0, No Iterations 0 diagonal: Solving for rhoUz, Initial residual = 0, Final residual = 0, No Iterations 0 smoothSolver: Solving for Ux, Initial residual = 5.90703e08, Final residual = 2.44838e17, No Iterations 2 smoothSolver: Solving for Uy, Initial residual = 1.26004e08, Final residual = 6.01289e18, No Iterations 2 smoothSolver: Solving for Uz, Initial residual = 3.90837e07, Final residual = 1.92179e18, No Iterations 2 diagonal: Solving for rhoE, Initial residual = 0, Final residual = 0, No Iterations 0 smoothSolver: Solving for e, Initial residual = 1.58267e08, Final residual = 1.84018e17, No Iterations 2 smoothSolver: Solving for k, Initial residual = 1, Final residual = 9.37399e20, No Iterations 2 ExecutionTime = 6.42 s ClockTime = 7 s Mean and max Courant Numbers = 2.14605e05 0.466437 deltaT = 2.02418e10 Time = 3.91248e10 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 diagonal: Solving for rhoUx, Initial residual = 0, Final residual = 0, No Iterations 0 diagonal: Solving for rhoUy, Initial residual = 0, Final residual = 0, No Iterations 0 diagonal: Solving for rhoUz, Initial residual = 0, Final residual = 0, No Iterations 0 smoothSolver: Solving for Ux, Initial residual = 2.22091e08, Final residual = 1.2556e18, No Iterations 2 smoothSolver: Solving for Uy, Initial residual = 4.60887e09, Final residual = 4.60887e09, No Iterations 0 smoothSolver: Solving for Uz, Initial residual = 2.09171e07, Final residual = 6.71802e18, No Iterations 2 diagonal: Solving for rhoE, Initial residual = 0, Final residual = 0, No Iterations 0 smoothSolver: Solving for e, Initial residual = 5.00931e09, Final residual = 5.00931e09, No Iterations 0 > FOAM Warning : From function virtual void Foam::fv::option::checkApplied() const in file cfdTools/general/fvOptions/fvOption.C at line 125 Source porosity_wall defined for field U but never used > FOAM Warning : From function virtual void Foam::fv::option::checkApplied() const in file cfdTools/general/fvOptions/fvOption.C at line 125 Source porosity_wall defined for field U but never used This is my fvOption file: Code:
porosity_wall { type explicitPorositySource; active true; explicitPorositySourceCoeffs { type DarcyForchheimer; selectionMode cellZone; cellZone porosity_wall; // Specify the name of the cellZone DarcyForchheimerCoeffs { // Negative coeffs are multiplied by largest positive coeff, // taking the magnitude, e.g. for 1000, coeff = 1e7*1000 = 1e10 d [0 2 0 0 0 0 0] (1e7 1000 1000); f [0 1 0 0 0 0 0] (0 0 0); coordinateSystem // Cartesian coordinates for the cellZone { x (1 0 0); y (0 1 0); #includeEtc "caseDicts/general/coordinateSystem/cartesianXY" } } } } Code:
actions ( { name porosity_wall;//center type cellZoneSet; action new;//add source boxToCell; sourceInfo { box (0.125 0 0)(0.12494365 0.75 0.1);//building_wall } } ); 

February 13, 2018, 23:50 

#5  
Member
mahdi
Join Date: Nov 2015
Location: Paris, France
Posts: 32
Rep Power: 10 
Quote:
Can you test your case with another solver like sonicFoam and let me know if it worked? I have no idea about rhoCentralFoam, but just check the source code and it seems it doesn't care about fvOptions in momentum equation: //  Solve momentum solve(fvm::ddt(rhoU) + fvc::div(phiUp)); U.ref() = rhoU() /rho(); U.correctBoundaryConditions(); rhoU.boundaryFieldRef() == rho.boundaryField()*U.boundaryField(); if (!inviscid) { solve ( fvm::ddt(rho, U)  fvc::ddt(rho, U)  fvm::laplacian(muEff, U)  fvc::div(tauMC) ); rhoU = rho*U; } And this could be the reason for this warning: Source porosity_wall defined for field U but never used However, for the other solvers like sonicFoam momentum equation solve like this: // Solve the Momentum equation MRF.correctBoundaryVelocity(U); fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(phi, U) + MRF.DDt(rho, U) + turbulence>divDevRhoReff(U) == fvOptions(rho, U) ); UEqn.relax(); fvOptions.constrain(UEqn); if (pimple.momentumPredictor()) { solve(UEqn == fvc::grad(p)); fvOptions.correct(U); K = 0.5*magSqr(U); } And as you can see, there is fvOptions in RHS of the equation as the source term. Regards, 

September 15, 2018, 20:34 

#6  
New Member
Join Date: Aug 2017
Posts: 18
Rep Power: 8 
Quote:
You were right, rhocentralfoam couldn't 'read' the porous medium on the wall. In order to do so, I modified the momentum equation of rhocentralfoam and it works. Sorry for the late reply. 

May 7, 2020, 11:12 

#7  
Senior Member
Join Date: Dec 2019
Posts: 215
Rep Power: 7 
Quote:
Dear Calmly, could you post your solution for rhoCentralFoam? I am very interested how you changed the code to make it work. Regards, shock77 

Tags 
media, porous, rhocentralfoam 
Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Thermal nonequilibrium porous media model with conjugate heat transfer  Hexahedron  FLUENT  9  February 22, 2023 02:55 
Multiphase Porous Media Flow  Convergence Issues  VT_Bromley  FLUENT  7  May 14, 2020 16:34 
Porous media setup issues in Fluent  Bernard Van  FLUENT  29  January 26, 2017 04:09 
How to model granular flow through porous media  Axius  FLUENT  2  August 7, 2014 10:34 
porous media: Fluent or StarCD?  Igor  Main CFD Forum  0  December 5, 2002 15:16 