CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   coulpe FAM and FVM (https://www.cfd-online.com/Forums/openfoam/103783-coulpe-fam-fvm.html)

zakir hussain June 26, 2012 21:30

coulpe FAM and FVM
 
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 June 27, 2012 21:37

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


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