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

the format of adding volVectorField term into equation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 15, 2017, 14:47
Post the format of adding volVectorField term into equation
  #1
Member
 
Linyan X
Join Date: Dec 2015
Posts: 43
Rep Power: 10
linyanx is on a distinguished road
Dear OpenFOAMers,

I have a quick question regarding the volVectorField. How can we implement the volVectorField term into the equation?

Like, for example, UEqn.H in interMixingFoam. After defining a volVectorField in createField.H named 'F'. I want to add the force term(which is a vector term) into the UEqn.H, written as 'interpolate(F)'. But the system will always complain about the format of this vector term.

My UEqn.H is partially quoted below:
Quote:
UEqn
==
fvc::reconstruct
(
(
mixture.surfaceTensionForce()
- ghf*fvc::snGrad(rho)
- fvc::snGrad(p_rgh)
+ interpolate(F) ----The term I want to add.
) * mesh.magSf()
)
Hence, I look over all the source code in openfoam's solver package, but still have no idea of the solution. Really appreciate your help.

Regards,
Linyan
linyanx is offline   Reply With Quote

Old   March 16, 2017, 09:27
Default Solved:outside of reconstruct statement
  #2
Member
 
Linyan X
Join Date: Dec 2015
Posts: 43
Rep Power: 10
linyanx is on a distinguished road
Thanks to Fanny's kindly answer here. The volVectorField F is supposed to be ok when it was written at the right side of the UEqn. Hence, the code is corrected as follow:
PHP Code:
solve
        
(
            
UEqn
         
==
            
fvc::reconstruct
            
(
                (
                    
mixture.surfaceTensionForce()
                  - 
ghf*fvc::snGrad(rho)
                  - 
fvc::snGrad(p_rgh)
                ) * 
mesh.magSf()
            )
//*               Modified on Mar/16            *//
            
F
//*               Modified on Mar/16            *//
        
); 
linyanx 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
Adding a source term to k and epsilon equation for buoyancy rajeshkunwar OpenFOAM Running, Solving & CFD 2 April 19, 2019 07:41
Adding a Source Term to Pressure equation pEqn in SimpleFoam oscar_urri OpenFOAM 11 February 22, 2018 17:52
adding a constant volumetric source term to transport equation in a particular region cfdonline2mohsen OpenFOAM Programming & Development 15 February 16, 2017 09:55
Source term energy equation for reactive flows DaIN Main CFD Forum 0 October 6, 2011 15:11
bouyancy term in epsilon equation Michael Main CFD Forum 1 June 25, 1999 10:20


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