|
[Sponsors] |
August 7, 2012, 15:50 |
Turbulence Model with Elliptic Relaxation
|
#1 |
New Member
Join Date: Feb 2012
Posts: 6
Rep Power: 14 |
Hello all,
I've been working on implementing a damping function, fmu, defined by an elliptic relaxation equation. This is the first modification I've done that has required defining my own discretized equation so I'm sure there are errors in my implementation. Also I believe my method of setting the initial and boundary conditions could use improvement. Currently my simpleFoam case compiles and runs but the results are incorrect. fmu must be between 0 and 1 and equal 0 on wall boundaries. To initialize this I added the code below to the constructor. In /0/fmu I set a value of 0 to my wall patch and 0.5 to the internalField and all other patches. Code:
fmu_ ( IOobject ( "fmu", runTime_.timeName(), mesh_, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh_ ), dimensionedScalar("fmu",dimless,.5) label patchWall = mesh_.boundaryMesh().findPatchID("wall") fmu_.boundaryField()[patchWall]=0.0 The fmu equation is Code:
const volScalarField Lsqr(this->Lsqr(W,S,Cmu,Tt,k_,epsilon_,zeta)); tmp<fvScalarMatrix> fmuEqu ( Lsqr*fvm::laplacian(fmu_) == scalar(1.0) - fmu_ ); fmuEqu().relax(); solve(fmuEqu); label patchWall = U_.mesh().boundaryMesh().findPatchID("wall"); fmu_.boundaryField()[patchWall]=0.0; Does this procedure look correct? Is using the boudaryField()[patchWall]=0.0 the proper way to correct the wall boundary condition? Thanks in advance for any input, Tim |
|
August 16, 2012, 12:01 |
|
#2 |
Senior Member
Tarak
Join Date: Aug 2010
Location: State College, PA
Posts: 111
Rep Power: 15 |
Hii,
You can do something like this so that you do not need to create Initial Condition files for the fields you want to get printed out: LPrint_ ( IOobject ( "LPrint", runTime_.timeName(), mesh_, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh_, dimensionedScalar("LPrint", dimensionSet(0, 1, 0, 0, 0, 0, 0), 0.0), zeroGradientFvPatchScalarField::typeName |
|
August 16, 2012, 15:46 |
|
#3 |
New Member
Join Date: Feb 2012
Posts: 6
Rep Power: 14 |
Thanks for the input.
Also, as an update, I use the following to solve the elliptic equation. It seems to be working, but I'm still testing. Code:
tmp<fvScalarMatrix> fmuEqu ( - fvm::laplacian(fmu_) == - fvm::Sp(1.0/Lsqr,fmu_) + 1.0/Lsqr ); fmuEqu().relax(); solve(fmuEqu); |
|
Tags |
elliptic, relaxation |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Use of k-epsilon and k-omega Models | Jade M | Main CFD Forum | 40 | January 27, 2023 07:18 |
Superlinear speedup in OpenFOAM 13 | msrinath80 | OpenFOAM Running, Solving & CFD | 18 | March 3, 2015 05:36 |
SimpleFoam case with SpalartAllmaras turbulence model implemented | nedved | OpenFOAM Running, Solving & CFD | 2 | November 30, 2014 22:43 |
KOmega Turbulence model from wwwopenFOAMWikinet | philippose | OpenFOAM Running, Solving & CFD | 30 | August 4, 2010 10:26 |
SSG Reynolds Turbulence Model | Georges | CFX | 1 | February 28, 2007 16:15 |