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

Solving the density equation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 5, 2020, 05:28
Default Solving the density equation
  #1
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
Hi,


in rhoCentralFoam the density equation raises me questions:



Code:
        solve(fvm::ddt(rho) + fvc::div(phi));

There is no need to specify a scheme for div(phi) in rhoCentralFoam, only for tauMC. For discretization the Kurganov or Tadmor scheme should be used. I suppose thats why I dont have to specify it?



Phi is defined in createField.H as:


Code:
surfaceScalarField phi("phi", fvc::flux(rhoU));

and in rhoCentralFoam.C as:


Code:
phi = aphiv_pos*rho_pos + aphiv_neg*rho_neg;

How can it be both?


I would be very glad, if someone could explain me how phi is actually calculated.




Kind regards,
shock77
shock77 is offline   Reply With Quote

Old   August 5, 2020, 10:35
Default
  #2
Senior Member
 
Join Date: Aug 2015
Posts: 494
Rep Power: 14
clapointe is on a distinguished road
You are correct that Kurganov/Tadmor flux reconstruction is used in rhoCentralFoam. The line in createFields is just used to initialize phi; it is computed (and updated) in the solver, ultimately with that line you referenced. I suggest taking a look at the publication associated with the solver : "Implementation of semi‐discrete, non‐staggered central schemes in a colocated, polyhedral, finite volume framework, for high‐speed viscous flows."

Caelan
clapointe is offline   Reply With Quote

Old   August 7, 2020, 08:03
Default
  #3
Senior Member
 
Join Date: Dec 2019
Posts: 215
Rep Power: 7
shock77 is on a distinguished road
Thank you very much for your reply, it already helped me.


I have read the paper and understand how its done mathematically, I am struggling with the implementation in OpenFOAM.




Kind regards



shock77
shock77 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
[solidMechanics] Support thread for "Solid Mechanics Solvers added to OpenFOAM Extend" bigphil OpenFOAM CC Toolkits for Fluid-Structure Interaction 686 December 22, 2022 09:10
chtMultiRegionSimpleFoam turbulent case Aditya Patil OpenFOAM Running, Solving & CFD 6 April 24, 2017 22:13
Floating point exception error lpz_michele OpenFOAM Running, Solving & CFD 53 October 19, 2015 02:50
Compressor Simulation using rhoPimpleDyMFoam Jetfire OpenFOAM Running, Solving & CFD 107 December 9, 2014 13:38
calculation stops after few time steps sivakumar OpenFOAM Running, Solving & CFD 7 March 17, 2013 06:37


All times are GMT -4. The time now is 11:27.