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

UEqn without pressure term

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

Reply
 
LinkBack Thread Tools Display Modes
Old   February 20, 2012, 06:27
Default UEqn without pressure term
  #1
Member
 
Join Date: Jun 2011
Posts: 35
Rep Power: 6
mikeP is on a distinguished road
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?
mikeP is offline   Reply With Quote

Old   February 21, 2012, 08:25
Default
  #2
Member
 
Join Date: Jun 2011
Posts: 35
Rep Power: 6
mikeP is on a distinguished road
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
File Type: png Untitled.png (4.7 KB, 7 views)
mikeP is offline   Reply With Quote

Old   February 21, 2012, 14:13
Default
  #3
Senior Member
 
Nima Sam
Join Date: Sep 2009
Location: Tehran, Iran
Posts: 1,123
Blog Entries: 1
Rep Power: 14
nimasam is on a distinguished road
Send a message via Yahoo to nimasam
try this :
Quote:
fvScalarMatrix alphaEqn
(
fvm::ddt(alpha)
+ fvc::div(phi,alpha)
);
solve(alphaEqn);
phi here is U & mesh.Sf()
nimasam is offline   Reply With Quote

Old   February 21, 2012, 15:47
Default
  #4
Member
 
Join Date: Jun 2011
Posts: 35
Rep Power: 6
mikeP is on a distinguished road
I modified it as
linearInterpolate(alpha*U) & mesh.Sf()
in order to get phase flux. I am not sure if this makes sense.
mikeP 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
Pulsatile pressure inlet with pressure outlet a.lynchy FLUENT 3 March 23, 2012 14:45
pressure transient term? Romek CFX 4 April 19, 2011 21:19
Pressure work term in turbulent K.E. equation lost.identity Main CFD Forum 0 March 8, 2011 13:21
UDF to define or adjust pressure??? engahmed FLUENT 0 July 6, 2010 17:19
Pressure enigma. Sara Main CFD Forum 22 July 30, 2009 04:46


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