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

coulpe FAM and FVM

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 26, 2012, 21:30
Default coulpe FAM and FVM
  #1
Member
 
zakir
Join Date: Nov 2011
Posts: 44
Rep Power: 14
zakir hussain is on a distinguished road
Hello everyone
I meet a problem of coupling the FAM and FVM.The following is my code:
Code:
    label patchID = mesh.boundaryMesh().findPatchID("UB");
    forAll (ephis1, faceI)
    {
        
        ephis1[faceI] = ephi.boundaryField()[patchID][faceI];
    }
                    
                 faScalarMatrix CsEqn
                  (
                                        
                    fam::laplacian(Dsigw, ephis) ==(  Dsig*fac::grad(ephis1)&aMesh.faceAreaNormals())       
                   
                   );

                   CsEqn.solve();
                            
          vsm.mapToVolume(ephis, ephi.boundaryField());
But I find that it doesn't work at all during the calculation.Have I coupled the famfield ephis or ephis1 with FVMfield ephi?

regards!

zakir
zakir hussain is offline   Reply With Quote

Old   June 27, 2012, 21:37
Default
  #2
Member
 
zakir
Join Date: Nov 2011
Posts: 44
Rep Power: 14
zakir hussain is on a distinguished road
Hi gschaider
Just as you mentioned in http://www.cfd-online.com/Forums/ope...uld-i-use.html
Code:
What you want is a FAM to FVM-coupling right. Something like
Code:
    
volSurfaceMapping mapper(famField.mesh());

mapper.mapToVolume(famField,  fvmField.boundaryField());
in your code copies the internal field of the famField to the appropriate patches of the fvmField (make sure the patches are of appropriate type ... fixedValue for instance)
if I I set the inputing file of electric potential ephi in 0 dir as :
----------------------------------------------
....
boundary
{
UB
{
type fixedValue;
value 0;
}
....
}
-----------------------------------------
Then I also wrote
Code:
vsm.mapToVolume(ephis, ephi.boundaryField());
in my main program for every time step.

Will the boundary condition value of ephi at UB update every time step?

regards!

zakir

Last edited by zakir hussain; June 29, 2012 at 01:10.
zakir hussain is offline   Reply With Quote

Reply

Tags
fam


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



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