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

Question about EEqn.H file

Register Blogs Community New Posts Updated Threads Search

Like Tree10Likes
  • 9 Post By alundilong
  • 1 Post By massive_turbulence

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 7, 2014, 23:56
Default Question about EEqn.H file
  #1
New Member
 
Harshad Lalit
Join Date: May 2013
Posts: 26
Rep Power: 12
harshad88 is on a distinguished road
Dear all,

I am trying to develop a new solver for premixed flame simulations using reactingFoam. I have a question about the EEqn.H file in the default code. It reads:

+ (
he.name() == "e"
? fvc::div
(
fvc::absolute(phi/fvc::interpolate(rho), U),
p,
"div(phiv,p)"
)
: -dpdt
)


What is the meaning of fvc::absolute(phi/fvc::interpolate(rho), U), and the line : -dpdt ???

Your help would be really appreciated. Thanks
harshad88 is offline   Reply With Quote

Old   July 8, 2014, 17:26
Default
  #2
Senior Member
 
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 17
wouter is on a distinguished road
Hello harshad88,

I am no expert.
It is part of a C or C++ construct A?b:c meaning
if A is true than b else c in this case c = "-dpdt"

hope this helps
Wouter
wouter is offline   Reply With Quote

Old   July 9, 2014, 11:10
Default
  #3
New Member
 
Harshad Lalit
Join Date: May 2013
Posts: 26
Rep Power: 12
harshad88 is on a distinguished road
Thanks for your reply Wouter.

Could you also tell me what the meaning of fvc::absolute(phi/fvc::interpolate(rho), U) is? I cant understand what this terms corresponds to in the energy equation.

Thanks
harshad88 is offline   Reply With Quote

Old   July 9, 2014, 17:34
Default
  #4
Senior Member
 
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 17
wouter is on a distinguished road
As i wrote I am no expert but I think this means phiv because of the "div(phiv,p)" but I have no clue what this means.

Hope someone else can take over
Wouter
wouter is offline   Reply With Quote

Old   July 10, 2014, 19:25
Default
  #5
Member
 
yijin Mao
Join Date: May 2010
Location: Columbia, MO
Posts: 62
Rep Power: 15
alundilong is on a distinguished road
Quote:
Originally Posted by harshad88 View Post
Thanks for your reply Wouter.

Could you also tell me what the meaning of fvc::absolute(phi/fvc::interpolate(rho), U) is? I cant understand what this terms corresponds to in the energy equation.

Thanks
fvc::absolute(phi/fvc::interpolate(rho), U) return absolute face flux.
if the mesh is moving, it will add up the contribution of moving mesh,
which mean the face flux is
phi/fvc::interpolate(rho) + fvc::meshPhi(U)
;
if static mesh, it will return phi/fvc::interpolate(rho)
alundilong is offline   Reply With Quote

Old   July 10, 2014, 22:07
Default
  #6
Member
 
Daniel
Join Date: Jun 2014
Posts: 60
Rep Power: 11
Dan1788 is on a distinguished road
Thanks Yijin, That was really helpful
Dan1788 is offline   Reply With Quote

Old   February 4, 2019, 09:51
Default
  #7
Senior Member
 
Andrew Somorjai
Join Date: May 2013
Posts: 175
Rep Power: 12
massive_turbulence is on a distinguished road
Quote:
Originally Posted by wouter View Post
Hello harshad88,

I am no expert.
It is part of a C or C++ construct A?b:c meaning
if A is true than b else c in this case c = "-dpdt"

hope this helps
Wouter
Simply called the "ternary operator" as part of C++.
alainislas likes this.
massive_turbulence 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
[swak4Foam] groovyBC in openFOAM-2.0 for parabolic velocity bc ofslcm OpenFOAM Community Contributions 25 March 6, 2017 10:03
what is swap4foam ?? AB08 OpenFOAM 28 February 2, 2016 01:22
patch error OF v2.2.2 mac hewei OpenFOAM Installation 4 November 30, 2013 16:55
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 keepfit ParaView 60 September 18, 2013 03:23
Version 15 on Mac OS X gschaider OpenFOAM Installation 113 December 2, 2009 10:23


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