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

Update phi

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 6, 2018, 06:19
Unhappy Update phi
  #1
Senior Member
 
krishna kant
Join Date: Feb 2016
Location: Hyderabad, India
Posts: 133
Rep Power: 10
kk415 is on a distinguished road
Hi Foamers,


My main problem is I am interpolating fields(velocity,pressure) from a coarser mesh to finer mesh. The interpolation increases error in continuity equation because the interpolated velocity field is no longer a divergence free field.


Thus, to improve the correction in phi I am updating phi as following:


phis= linearInterpolate (Us) & solidRegions[0].Sf();
forAll( solidRegions[0].owner() , iface ) {
/// Get the left and right cell index
const label& leftCell = solidRegions[0].owner()[iface];
const label& rightCell = solidRegions[0].neighbour()[iface];
phis[iface]=phis[iface]+solidRegions[0].magSf()[iface]*(ps[leftCell]-ps[rightCell]/mag(solidRegions[0].C()[leftCell]-solidRegions[0].C()[rightCell]));
//Info << iface <<endl;
}


Us and ps are interpolated value from another mesh.
This update further increases the error in continuity error

My first doubt is whether I am updating in correct face of phi or not? I only want to update the internal faces.


Any help and suggestion would be deeply appreciated.
kk415 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
How to update phi in Fractional Step Method Carlen OpenFOAM Programming & Development 1 March 19, 2019 08:31
Question about phi jeanpinto24| OpenFOAM Pre-Processing 0 April 15, 2017 04:13
Correction procedure on a non-orthogonal skewed Mesh me.ouda OpenFOAM Programming & Development 0 January 18, 2017 09:05
mixerVesselAMI2D's mass is not balancing sharonyue OpenFOAM Running, Solving & CFD 6 June 10, 2013 09:34
Update: New reconstructPar utility (No phi and *_0 fields) lakeat OpenFOAM Post-Processing 0 November 20, 2012 15:34


All times are GMT -4. The time now is 18:08.