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

Some Very Basic Questions About icoFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree6Likes
  • 1 Post By MCrossover97
  • 4 Post By dlahaye
  • 1 Post By MCrossover97

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 18, 2020, 13:56
Smile Some Very Basic Questions About icoFoam
  #1
New Member
 
Mohammad Khojastehmehr
Join Date: Jul 2020
Posts: 20
Rep Power: 6
MCrossover97 is on a distinguished road
Hey everybody! I hope you are all doing fine!

I have some basic questions about icoFoam solver. I would be greatly appreciated if you could help me with these:

1. constrainHbyA: I don't know exactly what does (constrainHbyA(rAU*UEqn.H(), U, p) do? I know to calculate HbyA, we multiply rAU by UEqn.H() but my question is what more does this constrainHbyA do and why does it need pressure and velocity fields?

https://develop.openfoam.com/Develop...onstrainHbyA.H
https://develop.openfoam.com/Develop...onstrainHbyA.C

2. constrainPressure(p, U, phiHbyA, rAU): How does this exactly work? it says it is done to:
Code:
Update the pressure BCs to ensure flux consistency
Does it calculate the pressure at boundaries where a fixed value is not specified (zeroGradient BC for example)? if so, how exactly does it ensure flux consistency and why it needs p, U, phiHbyA and rAU?
https://develop.openfoam.com/Develop...rainPressure.H
https://develop.openfoam.com/Develop...rainPressure.C

3. adjustPhi(phiHbyA, U, p):: I've realized if the mass balance doesn't equal zero at boundaries, it will modify the flux at the adjustable boundary conditions (where the velocity does not have a fixed value). What I don't understand is:
why do we adjust the values of phiHbyA and not phi after calculating phi by phi = phiHbyA - pEqn.flux()? what is wrong with just interpolating U values to calculate fluxes at the faces? At the end of the loop, where U is calculated, for example, when the outlet has zeroGradient BC, the velocity at the outlet patch must be equal to the velocity of the boundary mesh and the outlet flux is therefore easily calculated by multiplying outlet patch velocity by area. so when we adjust phi, do we adjust this outlet flux? it is okay to manually change this value to ensure mass balance? It does not make sense to me!
https://develop.openfoam.com/Develop...hi/adjustPhi.H
https://develop.openfoam.com/Develop...hi/adjustPhi.C

After all, it seems I have some problem understanding flux consistency. Any enlightenment would be most welcome!

Thank you all,
Mohammad
nepomnyi likes this.

Last edited by MCrossover97; August 20, 2020 at 15:37.
MCrossover97 is offline   Reply With Quote

Old   December 29, 2020, 13:38
Default
  #2
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 798
Blog Entries: 1
Rep Power: 17
dlahaye is on a distinguished road
Below partial answers only. Definitely requires more attention. More information is at Section 2.2.3 of https://openfoamwiki.net/index.php/S...ssure_equation

1. constrainHbyA

Modifies the mass flux HbyA = rAU*UEqn.H (denoted by mDot on monograph by Moukalled e.a.) on non-assignable velocity boundary patches with data contained in those patches. Not sure why. Not sure whether Rhie-Chow interpolation is included in UEqn.H. Possibly one should look into how UEqn.H is computed. Not sure when a velocity patch is assignable.

Pressure and velocity fields passed as input only.

2. constrainPressure(p, U, phiHbyA, rAU)

Updates the pressure on those boundary patches on which a pressure flux is imposed.

p is passed as argument because p on the boundary is modified. U, phiHbyA and rAU are passed as input only.

3. adjustPhi(phiHbyA, U, p)

Description: For cases which do no have a pressure boundary adjust the balance of fluxes to obey continuity. Return true if the domain is closed.

Last edited by dlahaye; December 29, 2020 at 14:16. Reason: Found additional information after initial post
dlahaye is offline   Reply With Quote

Old   January 6, 2021, 09:50
Default
  #3
New Member
 
Mohammad Khojastehmehr
Join Date: Jul 2020
Posts: 20
Rep Power: 6
MCrossover97 is on a distinguished road
Thank you for your answers, Domenico! I will study the link.
dlahaye likes this.
MCrossover97 is offline   Reply With Quote

Reply

Tags
continuity, icofoam, piso


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
IcoFoam continuity error in 2D transient simulation finch OpenFOAM Running, Solving & CFD 15 June 29, 2016 11:39
[OpenFOAM] Paraview doesn't seem to be picking up data generated by icofoam MikeHersee ParaView 2 January 6, 2015 09:27
FSI problem , Help needed for my basic questions kmgraju CFX 1 July 29, 2011 01:04
Very basic questions for ICEM CFD icemcfd ANSYS 2 December 21, 2010 17:01
LES basic and simple questions. dshawul Main CFD Forum 0 October 4, 2010 11:56


All times are GMT -4. The time now is 22:21.