CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

modifying nuSgsWallFunction

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   January 16, 2012, 22:03
Default modifying nuSgsWallFunction
  #1
Member
 
Kim Yusik
Join Date: Dec 2009
Posts: 39
Rep Power: 7
impecca is on a distinguished road
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 06:17.
impecca is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Modifying the laplacian operator mlawson OpenFOAM Running, Solving & CFD 11 September 7, 2011 12:30
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


All times are GMT -4. The time now is 09:25.