|
[Sponsors] |
January 16, 2012, 21:03 |
modifying nuSgsWallFunction
|
#1 |
Member
Kim Yusik
Join Date: Dec 2009
Posts: 39
Rep Power: 16 |
Dear Foamers,
I am trying to modify the nuSgsWallFunction (nuSgsUSpaldingWallFunctionFvPatchScalarField.C) in OF 1.7.1 and I got some questions. I want to implement Wang & Moin ( pof.aip.org/resource/1/phfle6/v14/i7/p2043_s1 ) model. In this model it specifies tauw (wall shear stress) directly rather than nuSgs (like in 'nuSgsWallFunction'). So I managed to acess to the 'tauw' (B() in LES model, see the code below) as a first step but I do not know how I return a calculated values into the B(). I just added few more lines within the nuSgsUSpaldingWallFunctionFvPatchScalarField.C file. // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // void nuSgsWallFunctionFvPatchScalarField::evaluate ( const Pstream::commsTypes ) { const scalarField& ry = patch().deltaCoeffs(); const fvPatchVectorField& U = patch().lookupPatchField<volVectorField, vector>(UName_); scalarField magUp = mag(U.patchInternalField() - U); const scalarField& nuw = patch().lookupPatchField<volScalarField, scalar>(nuName_); //*** modification const label patchI = patch().index(); const LESModel& lesModel =db().lookupObject<LESModel>("LESProperties"); fvPatchSymmTensorField& tauw= lesModel.B()().boundaryField()[patchI]; forAll(tauw, facei){ tauw[facei]=symmTensor(0.0, 0.0, 0.0, 0.0, 0.0, 0.0); } //*** modification END By this way, I got an error when I run a simulation which is #0 Foam::error:: printStack(Foam::Ostream&) It seems that 'tauw[facei]=symmTensor(0.0, 0.0, 0.0, 0.0, 0.0, 0.0)' has a problem. without this line, no error. So could you suggest me how to return the calculated 'tauw' values into B() please? or any suggestion will be appreciated. Thanks in advance. Yusik Last edited by impecca; January 17, 2012 at 05:17. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Modifying the laplacian operator | mlawson | OpenFOAM Running, Solving & CFD | 22 | July 16, 2018 04:56 |
nuSgsWallFunction in parallel | cfdmarkus | OpenFOAM Bugs | 1 | October 8, 2009 10:09 |
modifying Prepin File from command line | pgopalak | FLOW-3D | 1 | August 5, 2009 11:06 |
Suggestion for Modifying the Standard k-e Model | Iaroslav | FLUENT | 0 | June 9, 2009 11:01 |
modifying commercial codes | Richard Carroni | Main CFD Forum | 1 | October 15, 1998 06:38 |