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

Adding source term to u eq

Register Blogs Community New Posts Updated Threads Search

Like Tree15Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 19, 2009, 05:07
Default
  #21
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
programmers guide : Sf is face area vectors (Table 2.1), & is inner product (Table 1.2)
mattijs is offline   Reply With Quote

Old   March 19, 2010, 14:38
Default
  #22
New Member
 
Alton Luder III
Join Date: Oct 2009
Location: Michigan
Posts: 22
Rep Power: 17
sleepdeprivation is on a distinguished road
See http://www.tfd.chalmers.se/~hani/kur...7/rhiechow.pdf

U = rUA*UEqn.H(); isn't U, its half the update to U. U is used as a storage location
U-=rUA*fvc::grad(p); completes the update to U
so in total U = rUA*UEqn.H() - rUA*fvc::grad(p); but you have to find pressure first
sleepdeprivation is offline   Reply With Quote

Old   November 30, 2010, 12:58
Default
  #23
Member
 
George Pichurov
Join Date: Jul 2010
Posts: 52
Rep Power: 16
jorkolino is on a distinguished road
Quote:
Originally Posted by alberto View Post
You're right. Just shorter:

volScalarField myVectorField("myVectorField", myVector & mesh.C());

Regards,
Alberto
What shall I put instead of myVector? The program complains that transportProperties is not defined in this scope, so I need to set myVector here, directly.

regards
jorkolino is offline   Reply With Quote

Old   September 22, 2014, 11:24
Post add source term to momentum
  #24
Member
 
Arash Mahboubidoust
Join Date: Jun 2013
Location: Iran
Posts: 58
Rep Power: 13
arashfluid is on a distinguished road
Send a message via Yahoo to arashfluid
Hi,
I have added a source term to the momentum equation in foam-extend-3.1 FSI solver and encountered the following error:


/home/arash/foam/arash-3.1/lib/linux64GccDPOpt/libfluidStructureInteraction.so: undefined reference to `Foam::flowModels::icoFlow::Fy() const'
/home/arash/foam/arash-3.1/lib/linux64GccDPOpt/libfluidStructureInteraction.so: undefined reference to `Foam::flowModels::icoFlow::E() const'
/home/arash/foam/arash-3.1/lib/linux64GccDPOpt/libfluidStructureInteraction.so: undefined reference to `Foam::flowModels::icoFlow::F() const'
/home/arash/foam/arash-3.1/lib/linux64GccDPOpt/libfluidStructureInteraction.so: undefined reference to `Foam::flowModels::icoFlow::xx() const'
/home/arash/foam/arash-3.1/lib/linux64GccDPOpt/libfluidStructureInteraction.so: undefined reference to `Foam::flowModels::icoFlow::yy() const'
/home/arash/foam/arash-3.1/lib/linux64GccDPOpt/libfluidStructureInteraction.so: undefined reference to `Foam::flowModels::icoFlow::Ey() const'
/home/arash/foam/arash-3.1/lib/linux64GccDPOpt/libfluidStructureInteraction.so: undefined reference to `Foam::flowModels::icoFlow::Fx() const'
/home/arash/foam/arash-3.1/lib/linux64GccDPOpt/libfluidStructureInteraction.so: undefined reference to `Foam::flowModels::icoFlow::centers() const'
/home/arash/foam/arash-3.1/lib/linux64GccDPOpt/libfluidStructureInteraction.so: undefined reference to `Foam::flowModels::icoFlow::sw() const'
/home/arash/foam/arash-3.1/lib/linux64GccDPOpt/libfluidStructureInteraction.so: undefined reference to `Foam::flowModels::icoFlow::Ex() const'
collect2: ld returned 1 exit status
make: *** [/home/arash/foam/arash-3.1/applications/bin/linux64GccDPOpt/fsiFoam] Error 1


what's problem?
arashfluid is offline   Reply With Quote

Old   September 1, 2016, 16:05
Default
  #25
New Member
 
Elnaz Norouzi
Join Date: Jan 2016
Posts: 5
Rep Power: 10
cikas is on a distinguished road
Hello every one

I am trying to simulate a permeable wall with add source term in mass equation. I separated the cells near the wall and add source term as UDF. But the results shows that it does not work because the difference between inlet and outlet mass flow rate is not equal to integral of source term for all separated cells.Please help me.

Cikas
cikas is offline   Reply With Quote

Old   October 21, 2016, 09:11
Default
  #26
New Member
 
Fujiang Yu
Join Date: Jan 2014
Posts: 12
Rep Power: 12
yfjok22 is on a distinguished road
Dear Elnaz,

I'm working on similar problem
Would you give some details, so that maybe I could help you
yfjok22 is offline   Reply With Quote

Old   June 3, 2022, 08:27
Default
  #27
Member
 
Uttam
Join Date: May 2020
Location: Southampton, United Kingdom
Posts: 35
Rep Power: 6
openfoam_aero is on a distinguished road
Hi Sambatra.
I know this is an old post but I’m replying to it for the benefit of others.
UEqn.A() (access function?)
So basically this is the function that belongs to the UEqn object. The UEqn object has the matrix of coefficients once the equation that is held by it is discretised. Now this matrix can be split into a diagonal matrix (containing only diagonal entries) A. The reason this is done is because it is easy to calculate the inverse of a diagonal matrix. Assume the discretised form to be MU = -grad(p). Split MU = AU - H where U is the vector of velocities, A is the diagonal matrix and H is the matrix of what remains. Substituting, you get AU = H - grad(p). Now A^-1AU = A^-1H - A^-1grad(p) = H/A - grad(p)/A. Therefore
U = H/A - grad(p)/A. This equation is written in OpenFOAM as UEqn.H()/UEqn.A() - FVC::grad(p)/UEqn.A(). Coming to your next question
fvc::interpolate(U) & mesh.Sf() - this is to calculate the flux at the cell face. You know that in OpenFOAM, values are stored in the cell centres. They have to be interpolated onto the cell faces if the fluxes have to be calculated. That expression literally translates to U.nDS where U is the interpolated velocity, mesh.Sf() is the area vector at a given cell face.
openfoam_aero is offline   Reply With Quote

Reply


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
Adding Source term of a new field at the inlet vatant OpenFOAM Running, Solving & CFD 0 October 14, 2006 16:42
Adding Source term of a new field at the inlet vatant OpenFOAM Running, Solving & CFD 0 October 14, 2006 16:39
Adding a momentum source term segersson OpenFOAM Running, Solving & CFD 5 March 3, 2006 00:06
Adding a source term to continuity eqn(UDF) Sebeci FLUENT 0 April 20, 2003 04:12
adding source term confusion tedmcc CFX 4 September 27, 2001 06:05


All times are GMT -4. The time now is 13:01.