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

rhoCentralFoam transport equation

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree6Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   December 9, 2013, 15:46
Default
  #21
New Member
 
Bryan Schmidt
Join Date: Sep 2013
Posts: 18
Rep Power: 4
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, 15:50
Default
  #22
Member
 
Chris
Join Date: Aug 2012
Location: Calgary, Alberta, Canada
Posts: 73
Rep Power: 5
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, 23 views)
ChrisA is offline   Reply With Quote

Old   December 9, 2013, 19:48
Default
  #23
New Member
 
Bryan Schmidt
Join Date: Sep 2013
Posts: 18
Rep Power: 4
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, 19:52
Default
  #24
Member
 
Chris
Join Date: Aug 2012
Location: Calgary, Alberta, Canada
Posts: 73
Rep Power: 5
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, 20:10
Default
  #25
New Member
 
Bryan Schmidt
Join Date: Sep 2013
Posts: 18
Rep Power: 4
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: 364
Rep Power: 6
chriss85 is on a distinguished road
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:
Adding source terms to rhoCentralFoam

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: 364
Rep Power: 6
chriss85 is on a distinguished road
No ideas?
chriss85 is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
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 07: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 20:53


All times are GMT -4. The time now is 20:16.