CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

How to add a wall momentum source to a solver

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 6, 2013, 19:43
Default How to add a wall momentum source to a solver
  #1
New Member
 
Join Date: May 2012
Posts: 17
Rep Power: 13
boeleman is on a distinguished road
Dear Foamers,

I am trying to modify interDyMFoam by adding a momentum source which is defined on a wall.

force_.boundaryField()[patchi] = someValue;

where force is a volVectorField.

I have tried to add the term

forcef_ = fvc::interpolate( force_ ) & mesh.Sf()/mag(mesh.Sf());

to pEqn.H and UEqn.H but there is no effect in my simulation. Does anyone know how to do this correctly? Should I convert my boundaryField to an internalField?

Thanks,

Arnout
boeleman is offline   Reply With Quote

Old   February 6, 2013, 20:32
Default
  #2
New Member
 
Join Date: May 2012
Posts: 17
Rep Power: 13
boeleman is on a distinguished road
I think I found an answer:

force is a vectorField
force_ is a volVectorField
forcef_ is a surfaceScalarField (and can thus be added in UEqn.H and pEqn.H)

const labelUList& faceCells = boundary[patchi].faceCells();

scalarField b2(force.size());

forAll(b2, facei)
{
force_[faceCells[facei]] = force[facei];
}

forcef_ = fvc::interpolate( force_ ) & mesh.Sf()/mag(mesh.Sf());
boeleman is offline   Reply With Quote

Reply

Tags
boundaryfield, internalfield, momentum, source, wall

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[swak4Foam] swak4Foam-groovyBC build problem zxj160 OpenFOAM Community Contributions 18 July 30, 2013 14:14
[ICEM] Export ICEM mesh to Gambit / Fluent romekr ANSYS Meshing & Geometry 1 November 26, 2011 13:11
Mass source, Momentum source theory. diffo FLUENT 4 August 21, 2009 11:26
Problem with Mass source, Momentum source theory diffo Fluent UDF and Scheme Programming 0 August 20, 2009 07:10
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug unoder OpenFOAM Installation 11 January 30, 2008 21:30


All times are GMT -4. The time now is 23:03.