|
[Sponsors] |
How to add a wall momentum source to a solver |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 6, 2013, 19:43 |
How to add a wall momentum source to a solver
|
#1 |
New Member
Join Date: May 2012
Posts: 17
Rep Power: 14 |
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 |
|
February 6, 2013, 20:32 |
|
#2 |
New Member
Join Date: May 2012
Posts: 17
Rep Power: 14 |
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()); |
|
Tags |
boundaryfield, internalfield, momentum, source, wall |
|
|
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 |