|
[Sponsors] |
potentialFoam porousBafflePressure turbulence |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 20, 2014, 19:49 |
potentialFoam porousBafflePressure turbulence
|
#1 |
Member
Brock Lee
Join Date: Sep 2012
Location: Midwest
Posts: 40
Rep Power: 14 |
Foamers,
As a preface, I'm just starting to dig into the openfoam code. So if I say something silly or ask an obvious question, please just roll with it. I'm attempting to modify the porousBafflePressure boundary condition in OF so that it is compatible with potentialFoam. Currently the porousBafflePressure boundary condition requires that a turbulence model be present, and thus throws an error when I run potentialFoam. I'd like the BC to run with a constant nu if potentialFoam is called. A code snippet of the original incompressible half of the BC is below... Code:
if (phi.dimensions() == dimensionSet(0, 3, -1, 0, 0)) { const incompressible::turbulenceModel& turbModel = db().lookupObject<incompressible::turbulenceModel> ( "turbulenceModel" ); const scalarField nuEffw = turbModel.nuEff()().boundaryField()[patchI]; jump_ = -sign(Un)*(I_*nuEffw + D_*0.5*magUn)*magUn*length_; } Code:
if (phi.dimensions() == dimensionSet(0, 3, -1, 0, 0)) { if solver == potentialFoam { const dictionary& transportProperties = db().lookupObject<IOdictionary> ( "transportProperties" ); dimensionedScalar nu(transportProperties.lookup("nu")); jump_ = -sign(Un)*(I_*nu + D_*0.5*magUn)*magUn*length_; } else { const incompressible::turbulenceModel& turbModel = db().lookupObject<incompressible::turbulenceModel> ( "turbulenceModel" ); const scalarField nuEffw = turbModel.nuEff()().boundaryField()[patchI]; jump_ = -sign(Un)*(I_*nuEffw + D_*0.5*magUn)*magUn*length_; } } I appreciate the help! |
|
January 21, 2014, 16:28 |
|
#2 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
Hi Brock,
As far as I know, you do know have any means of detecting, whether the solver is potentialFoam, but there might be hidden something in the Time object. You could try to track down, where the solver-name in the header of the log file is written. That aside, I believe it is a bad approach. I would rather propose that you make use of the foundObject and its bolean return. If it returns true, then a turbulence model is found, and you are not running potentialFoam, otherwise you are running potentialFoam, and you can apply your modifications. Kind regards, Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request. |
|
January 21, 2014, 20:46 |
|
#3 | |
Member
Brock Lee
Join Date: Sep 2012
Location: Midwest
Posts: 40
Rep Power: 14 |
Quote:
I have another question regarding the loading of the transportProperties dictionary. It appears that potentialFoam does not load this inside its createFields.H source code, and therefore isn't available to me when I try to look it up via lookupObject. I think I need to stick one of these somewhere... Code:
IOdictionary transportProperties ( IOobject ( "transportProperties", runTime.constant(), mesh, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ); What's the best way to load transportProperties for use by the porousBafflePressure boundary condition? Thanks again for any suggestions you can provide! |
||
January 23, 2014, 15:11 |
|
#4 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
Hi Brock,
Before I answer you question, allow me to ask: "What is the meaning of having the viscosity included in a solver, which solves for an inviscid fluid?" Kind regards, Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request. |
|
Tags |
porousbafflepressure, potentialfoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Turbulence postprocessing | Mohsin | FLUENT | 2 | October 3, 2016 15:18 |
Turbulence length scale and integral length scale | rizhang | CFX | 2 | April 22, 2016 08:22 |
Question on Turbulence Intensity | Eric | FLUENT | 1 | March 7, 2012 05:30 |
Discussion: Reason of Turbulence!! | Wen Long | Main CFD Forum | 3 | May 15, 2009 10:52 |
Code release: Flow Transition and Turbulence | Chaoqun Liu | Main CFD Forum | 0 | September 26, 2008 18:15 |