CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > 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 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: 5
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: 5
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
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
swak4Foam-groovyBC build problem zxj160 OpenFOAM 18 July 30, 2013 13: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 10:26
Problem with Mass source, Momentum source theory diffo Fluent UDF and Scheme Programming 0 August 20, 2009 06: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 02:13.