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

Arguments of implicit divergence-term

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 30, 2014, 12:11
Default Arguments of implicit divergence-term
  #1
New Member
 
chubb87
Join Date: May 2011
Posts: 21
Rep Power: 14
chubb87 is on a distinguished road
Hi all,

I need to implement an equation (which approximates the Jacobian in a Newton method) containing the following terms:

Code:
fvm::ddt(rho) + 1/eps*(fvc::div(phi_old) - fvm::div(phi_old+eps*(phi-phi_old),rho)
But the last fvm-term is a problem. I want to solve that term for rho. That means the specified flux "phi_old + eps*(phi-phi_old)" will be multiplied by rho. But only the second part (current phi) contains (the current) rho.

I already tried something like

Code:
fvm::ddt(rho) + 1/eps*(fvc::div(phi_old) - fvm::div(phi_old/phi_rho+eps*(phiU-phi_old/phi_rho)),rho)
but that does not seem to work.
Any ideas? Do I have to approximate the second divergence term?

Thanks in advance.
chubb87 is offline   Reply With Quote

Old   October 31, 2014, 07:19
Default
  #2
Senior Member
 
Join Date: Oct 2013
Posts: 397
Rep Power: 18
chriss85 will become famous soon enough
The variable which is solved for always appears in the second argument of the fvm operators.
You should maybe think about using the linearity of the divergence operator to separate the terms, and use an explicit divergence (fvc::div) for phi_old ?
chriss85 is offline   Reply With Quote

Old   November 1, 2014, 08:33
Default
  #3
New Member
 
chubb87
Join Date: May 2011
Posts: 21
Rep Power: 14
chubb87 is on a distinguished road
Okay, that's what I tried as well. I was unsure if this is valid though, since this would lead to cancellation of most terms (even epsilon drops out!) and thus would not make sense.
If I use linearity but keep those terms the calculation might still be valid (I guess). It does not work as expected yet (density increases), but the problem may be somewhere else.
chubb87 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
[ANSYS Meshing] Help with element size sandri_92 ANSYS Meshing & Geometry 14 November 14, 2018 07:54
implicit - scalar product source term in momentum equation vinch OpenFOAM Running, Solving & CFD 0 October 28, 2014 14:57
Divergence problem Smaras FLUENT 13 February 21, 2013 05:03
How to install CGNS under windows xp? lzgwhy Main CFD Forum 1 January 11, 2011 18:44
CGNS lib and Fortran compiler manaliac Main CFD Forum 2 November 29, 2010 06:25


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