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

How to implement equation of mixture fraction and variance of mixture fraction?

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

Like Tree2Likes
  • 2 Post By niklas

Reply
 
LinkBack Thread Tools Display Modes
Old   April 23, 2012, 04:13
Default How to implement equation of mixture fraction and variance of mixture fraction?
  #1
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,506
Blog Entries: 6
Rep Power: 26
Tobi will become famous soon enoughTobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi all,

I am using OF for two years now and wanna get deeper into the code and wanna make a new solver using an old one and transform the steady equations into the time dependent equations.

Okay my problem for now is, that I am not sure if I interpret the *Eqn.H files correct. I read a few threats here in the forum which helped me a lot but now I need your help.
I added an attachment with my problem. There you can see my solving equations. I just wanna have a look at the differential equations but I think that I transformed them not right, or?

Further more I do not know what "Sp" means.

Thx in advance.

Regards Tobi
Attached Files
File Type: pdf mixtureFraction.pdf (90.9 KB, 42 views)
Tobi is offline   Reply With Quote

Old   April 23, 2012, 08:17
Default
  #2
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 1,141
Rep Power: 20
akidess will become famous soon enough
fvm::Sp denotes an implicit source term. You can ignore it when translating code into equations, it's purely related to numerics.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
*Join the OpenFOAM stackexchange Q&A site: http://area51.stackexchange.com/prop...oHPxcPqde7HtA2
akidess is online now   Reply With Quote

Old   April 23, 2012, 09:32
Default
  #3
Super Moderator
 
niklas's Avatar
 
Niklas Nordin
Join Date: Mar 2009
Location: Stockholm, Sweden
Posts: 693
Rep Power: 21
niklas will become famous soon enoughniklas will become famous soon enough
suppose you want to solve this equation

dU/dt = A + BU

implemented like
fvm:ddt(U) == A + B*U

using euler scheme,
this results in

U^n - U^{n-1} = dt*A + dt*B*U^{n-1}
=>
U^n = dt*A + (dt*B + 1)*U_{n-1}

implemented like this
fvm::ddt(U) == A + fvm::Sp(B, U)

this results in
U^n - U^{n-1} = dt*A + dt*B*U^n
=>
(1 - dt*B)*U^n = dt*A + U^{n-1}

so the first implementation is explicit treatment of the B*U term, while the other is implicit treatment.
Hope this makes it clearer

This also makes it possible to do some 'cheating' of large explicit source-terms by linearizing them

again...
dU/dt = A + B*U = A*1 + B*U + A*(U/U) + B*U

which can be implemented like
fvm::ddt(U) = fvm:Sp(A/U, U) + B*U

which in turn is treated numerically like
U^{n} - U ^{n-1} = dt*(A*U^n / U^{n-1} + B*U^{n-1})
so you see now that A is no longer multiplied by 1, but by something else, which for the
converged solution hopefully is 1 and have a stabilizing effect on the solver.
sylvester and Tobi like this.
niklas is offline   Reply With Quote

Old   April 24, 2012, 04:24
Default
  #4
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,506
Blog Entries: 6
Rep Power: 26
Tobi will become famous soon enoughTobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi nicklas,

thanks for your good explanation!
I used your statement and generated a file (attachment). can you have a look at the file?

I am interessted in the last line I added. Thats my understanding of your post.


The second file is a transformation from openfoam equation code into scalar equation. Is that correct? Its a while ago that I used grad, div and laplacian.

thx in advance
tobi
Attached Files
File Type: pdf schemes.pdf (85.5 KB, 42 views)
File Type: pdf Niklas2.pdf (79.4 KB, 28 views)
File Type: pdf Niklas1.pdf (96.1 KB, 29 views)
Tobi is offline   Reply With Quote

Old   December 1, 2015, 14:23
Default
  #5
Senior Member
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,506
Blog Entries: 6
Rep Power: 26
Tobi will become famous soon enoughTobi will become famous soon enough
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi all,

I just want to comment, that the "Schemes.pdf" file is incorrect.
__________________
Best regards,
Tobias Holzmann

Some interesting OpenFOAM tutorials and videos on www.Holzmann-cfd.de
Tobi 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
libOpenSMOKE Tobi OpenFOAM Programming & Development 507 March 4, 2016 05:30
What is mixture fraction variance? Hugo FLUENT 3 April 20, 2015 21:24
the 2 equation of flamelet model. AdidaKK CFX 0 October 17, 2009 05:33


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