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

rhoCentralFoam transport equation

Register Blogs Community New Posts Updated Threads Search

Like Tree14Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 9, 2013, 14:46
Default
  #21
New Member
 
Bryan Schmidt
Join Date: Sep 2013
Posts: 18
Rep Power: 12
Bryan S is on a distinguished road
Found it, I was missing #include "psiCombustionModel.H" in the main .C file. wmake worked successfully! Would you mind telling me what your chemistryProperties and combustionProperties would look like if you didn't want to model any reactions (i.e. passive scalar only)? I tried copying mine from the reactingFoam tutorial and changing "chemistry" to "off" in chemistryProperties and setting "active" to "false" in combustionProperties but the solver crashed immediately with
Quote:
terminate called after throwing an instance of 'std::bad_cast'
what(): std::bad_cast
Aborted (core dumped)
Any idea what's going on? Thanks!
-B
Bryan S is offline   Reply With Quote

Old   December 9, 2013, 14:50
Default
  #22
Member
 
Chris
Join Date: Aug 2012
Location: Calgary, Alberta, Canada
Posts: 77
Rep Power: 13
ChrisA is on a distinguished road
Here's a copy of my chemistryProperties and combustionProperties files, they should get you started.
Attached Files
File Type: zip chemistryproperties.zip (1.1 KB, 77 views)
ChrisA is offline   Reply With Quote

Old   December 9, 2013, 18:48
Default
  #23
New Member
 
Bryan Schmidt
Join Date: Sep 2013
Posts: 18
Rep Power: 12
Bryan S is on a distinguished road
Thanks Chris, that helped. I was able to work with my constant/ and system/ files and I successfully took 1 timestep forward before getting this:

Code:
...
Starting time loop

Mean and max Courant Numbers = 0.281002 0.96
deltaT = 0.000414938
Time = 0.000414938

diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
diagonal:  Solving for rhoUx, Initial residual = 0, Final residual = 0, No Iterations 0
diagonal:  Solving for rhoUy, Initial residual = 0, Final residual = 0, No Iterations 0
diagonal:  Solving for rhoE, Initial residual = 0, Final residual = 0, No Iterations 0
diagonal:  Solving for rhoYi, Initial residual = 0, Final residual = 0, No Iterations 0
smoothSolver:  Solving for Gas1, Initial residual = 1.62351e-14, Final residual = 1.62351e-14, No Iterations 0
diagonal:  Solving for rhoYi, Initial residual = 0, Final residual = 0, No Iterations 0
smoothSolver:  Solving for Gas2, Initial residual = 1.62707e-14, Final residual = 1.62707e-14, No Iterations 0
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigSegv::sigHandler(int) at ??:?
#2   in "/lib/x86_64-linux-gnu/libc.so.6"
#3  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::operator=(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&) at ??:?
#4  
 at ??:?
#5  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#6  
 at ??:?
Segmentation fault (core dumped)

This error looks familiar. I've gotten sigHandler errors before and I've never been able to fix them. Is there an easy fix or is it time to give up and try something else? Thanks.
-B
Bryan S is offline   Reply With Quote

Old   December 9, 2013, 18:52
Default
  #24
Member
 
Chris
Join Date: Aug 2012
Location: Calgary, Alberta, Canada
Posts: 77
Rep Power: 13
ChrisA is on a distinguished road
Hard to say what's giving you a segmentation fault, looks like its solved all of your equations (your new Y equations included), try finding out what line is causing the fault (if you can) check your BC's etc. etc. Try reducing the courant number as well, things get shaky at Co = 1 with rhocentral from my experience. My cases run at 0.3-0.5.
ChrisA is offline   Reply With Quote

Old   December 9, 2013, 19:10
Default
  #25
New Member
 
Bryan Schmidt
Join Date: Sep 2013
Posts: 18
Rep Power: 12
Bryan S is on a distinguished road
Yeah... It's time for me to hang up my hat on this one. I'm going to try to post-process the passive scalar equation in MATLAB. Thanks for all your help Chris. If you ever get a working version of your solver to the point that you'd feel like sharing it, I'd love to get a copy of it. Best,
-B
Bryan S is offline   Reply With Quote

Old   July 18, 2014, 07:52
Default
  #26
Senior Member
 
Join Date: Oct 2013
Posts: 397
Rep Power: 18
chriss85 will become famous soon enough
I have been looking into related problems right now, and the YEqn posted by Chris has been quite helpful to me so far.

In my case I have one default gas and I'm producing two others. Do I also need a transport equation for my default gas then?
I have added the mass source terms to the total density as well as to the single transport equations, so the total mass should be conserved as far as I can see. Then I'm basically saying Y0 = 1 - Y1 - Y2. Is this approach sufficient or should I solve for the default gas as well?

On another topic, I'm currently in the process of switching from a sonicFoam-based solver to a rhoCentralFoam-based one, and it's unclear to me how I need to treat additional source terms in impulse and energy equations, i.e. forces and energy sources/sinks (from radiation and electrical current).

In sonicFoam I could just add them as source terms, but here I don't know if they should be added in predictor and/or corrector steps, and if some kind of central scheme is required for them.

I have also posted this in the following thread:
http://www.cfd-online.com/Forums/ope...tml#post502094

If anyone can shed some light on this I would be very grateful.
chriss85 is offline   Reply With Quote

Old   July 24, 2014, 09:21
Default
  #27
Senior Member
 
Join Date: Oct 2013
Posts: 397
Rep Power: 18
chriss85 will become famous soon enough
No ideas?
chriss85 is offline   Reply With Quote

Old   October 7, 2016, 09:36
Default
  #28
Member
 
Reza khodadadi
Join Date: Apr 2011
Location: https://t.me/pump_upp
Posts: 32
Rep Power: 15
reza_65 is on a distinguished road
Send a message via ICQ to reza_65 Send a message via AIM to reza_65 Send a message via Yahoo to reza_65
Quote:
Originally Posted by Henning86 View Post
This Implementation should work for v2.2.2 it was easier than i tought

in version 2.1.1 you have to create an new class
Hi Henning,

I am wondering why you did not add any source term for combustion in the energy equation? if you solve just a cold flow it can be reasonable but for reacting flow this equations are missing combustion source term! So, it should not work for reacting flow!

Cheers,
Reza
reza_65 is offline   Reply With Quote

Old   January 15, 2020, 08:12
Default
  #29
Member
 
Tommaso M.
Join Date: Sep 2018
Location: Milan, Italy
Posts: 67
Rep Power: 7
TommyM is on a distinguished road
Looking at the files provided by Henning, is the YEqn properly placed in the .C file?
As far as I know, the species concentration equation has to be solved between momentum and energy equation, while here it is solved last.
This is my opinion, but maybe I am missing something.


Tommy
TommyM 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
Solving Transport equation for additional variable using CFX creddy_trddc CFX 11 April 2, 2015 21:07
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 06:27
error message cuteapathy CFX 14 March 20, 2012 06:45
UDF Transport equation for transition momentum thickness Reynolds number Wantami FLUENT 0 April 9, 2011 02:50
Is it possible to use divergence in the source term of an scalar transport equation? jannnesss CFX 0 January 8, 2010 19:53


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