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

coulpe FAM and FVM

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

Reply
 
LinkBack Thread Tools Display Modes
Old   June 26, 2012, 21:30
Default coulpe FAM and FVM
  #1
Member
 
zakir
Join Date: Nov 2011
Posts: 43
Rep Power: 4
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: 43
Rep Power: 4
zakir hussain is on a distinguished road
Hi gschaider
Just as you mentioned in what kind of boundary condition should I use
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

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



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