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

adding div(phi)

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 31, 2012, 09:11
Default adding div(phi)
  #1
New Member
 
Nabil MEAH
Join Date: Apr 2012
Posts: 8
Rep Power: 14
bluemind is on a distinguished road
Hello everybody,

I'm currently working on the implementation of the some equations within the twoLiquidMixingFoam solver and I am facing some trouble when I try to add (in bold) an extra term in this transport equation :

fvScalarMatrix fracVolLVEqn
(
fvm::ddt(fracVolLV)
+ fvm::div(phi, fracVolLV)
- fvm::laplacian
(
Dab + alphatab*turbulence->nut(), fracVolLV,
"laplacian(Dab,fracVolLV)"
)
== fvm::div(phi, fracVolTot)


);

fracVolLVEqn.solve();



(fracVolLV =alpha1 (volumetric fraction of liquid) + alpha2 (volumetric fraction of vapor)
fracVolTot=alpha1 + alpha2+ alpha3 (volumetric fraction of air) ) equal to 1


When I compile, I don't have any errors however when I run the program I have the following error message :

--> FOAM FATAL ERROR:
incompatible fields for operation
[fracVolLV] == [fracVolTot]


Does anyone know how can I solve the problem ?

Thank you for the help,
bluemind is offline   Reply With Quote

Old   May 31, 2012, 09:22
Default
  #2
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30
akidess will become famous soon enough
Try using fvc::div.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   May 31, 2012, 09:48
Default
  #3
New Member
 
Nabil MEAH
Join Date: Apr 2012
Posts: 8
Rep Power: 14
bluemind is on a distinguished road
Thank you for the answer, I have already tried to use fvc :: div (), and the program works (even if the calculation diverge at some point). But I'm confused about using an explicit resolution for this term whereas the other terms are resolved implicitly.
bluemind is offline   Reply With Quote

Old   May 31, 2012, 09:54
Default
  #4
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30
akidess will become famous soon enough
You can only have one solution variable per equation. If you use fvm, the solver will see fracVolLV and fracVolTot as solution variables which cannot work.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   May 31, 2012, 09:58
Default
  #5
New Member
 
Nabil MEAH
Join Date: Apr 2012
Posts: 8
Rep Power: 14
bluemind is on a distinguished road
Thank you for the explanation I understand better now
bluemind 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
problem with Min/max rho tH3f0rC3 OpenFOAM 8 July 31, 2019 10:48
Adding a new viscosity model ICL OpenFOAM Running, Solving & CFD 20 April 10, 2017 23:44
car Cd drops after adding inlet and outlet? wh88 FLUENT 0 October 19, 2011 14:23
Help with chtMultiRegionFoam jbvw96 OpenFOAM Running, Solving & CFD 2 December 26, 2010 18:16
Problem setting with chtmultiregionFoam Antonin OpenFOAM Running, Solving & CFD 3 July 20, 2009 07:52


All times are GMT -4. The time now is 22:02.