# UEqn without pressure term

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 February 20, 2012, 06:27 UEqn without pressure term #1 Member   Join Date: Jun 2011 Posts: 35 Rep Power: 6 Hello, I have a momentum transport equation which is not pressure-driven, in addition to the continuity equation. Instead it has gravity and drag terms as the driving force. I can include it into OpenFOAM as: div(phi,U) == gravity + drag However, I can not include the continuity equation with this one. The solver does not compile when I try fvm::div(phi) or fvc::div(phi) I know that in simple algorithm, the continuity equation is included in the pressure equation. But i don't have to solve for pressure, it is not anywhere in the equations. How can I do it?

February 21, 2012, 08:25
#2
Member

Join Date: Jun 2011
Posts: 35
Rep Power: 6
I need to include the equation shown in attachment, which is a mass conservation equation, where "a" is phase volume fraction in a multiphase flow.

I defined "a" as a volScalarField.

When I do at as:
Code:
```fvScalarMatrix alphaEqn
(
fvm::ddt(alpha)
+ fvm::div(alpha,U)
);
solve(alphaEqn);```
I get:
error: no matching function for call to ‘div(Foam::volScalarField&, Foam::volVectorField&)’

I suppose, I can not use two volume fields as argument in fvm::div

Then I switch to
Code:
```fvScalarMatrix alphaEqn
(
fvm::ddt(alpha)
+ fvc::div(phi)
);
solve(alphaEqn);```
where phi is defined as linearInterpolate(alpha*U) & mesh.Sf()
This time solver converges, but when I solve my case, it gives floating point exception if my internal field value for "a" is different than the voundary condition value.
Attached Images
 Untitled.png (4.7 KB, 7 views)

February 21, 2012, 14:13
#3
Senior Member

Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,123
Blog Entries: 1
Rep Power: 14
try this :
Quote:
 fvScalarMatrix alphaEqn ( fvm::ddt(alpha) + fvc::div(phi,alpha) ); solve(alphaEqn);
phi here is U & mesh.Sf()

 February 21, 2012, 15:47 #4 Member   Join Date: Jun 2011 Posts: 35 Rep Power: 6 I modified it as linearInterpolate(alpha*U) & mesh.Sf() in order to get phase flux. I am not sure if this makes sense.

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post a.lynchy FLUENT 3 March 23, 2012 14:45 Romek CFX 4 April 19, 2011 21:19 lost.identity Main CFD Forum 0 March 8, 2011 13:21 engahmed FLUENT 0 July 6, 2010 17:19 Sara Main CFD Forum 22 July 30, 2009 04:46

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

 Contact Us - CFD Online - Top