CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Programming & Development (
-   -   "Coulomb"-type BC (

ckroener November 6, 2009 07:21

"Coulomb"-type BC
Hello Foamers,

i would like to use a Coulomb-Type BC for the simulation of a collapse of a granular column with interFoam.

Therefore, i want to mimic a kind of stick-slip BC by utilizing the partSlip BC and introducing a calculated valueFraction.

The flow at the boundary should feel an additional friction term F_c=-u_t/|u_t|*tan(delta)*N, where delta is the bottom friction angle, N the normal force acting on the Boundary and u_t is the velocity at the patch.

The change in velocity due to this force could be callculated, by assuming free slip, and correcting the velocity by:

u_t=u_fs - deltaT*u_fs/|u_fs| *tan(delta)*pressure*area

so i would like to calculte the valueFraction by:


else{ valueFraction=0;}

Now I have some questions:
1) Is it legal to handle the bottom friction in this way? Or is there a better way to introduce an bottom frition law?

2) I'm new to OpenFoam and, therefore, have some problems with the fundamental basics of implementing the BC.

a) Can I use


    const Field<scalar>& magS=patch().magSf();
    const fvPatchField<scalar>& pp=patch().lookupPatchField<volScalarField, scalar> ("p");
    const fvPatchField<scalar>& rhop=patch().lookupPatchField<volScalarField, scalar>("rho");
    scalar dt=runTime.deltaT();

to get the the values of p,rho and the area of the patch?

b) And to calculate the valueFraction could I use:


    valueFractionCalc_ = dt/mag(*this)*tandelta_*magS*pp*rhop;
    else{valueFractionCalc_ =0;}

Any advice?

Thanks a lot!


ckroener November 12, 2009 13:55

The code is now partly working, i have now used:

    const Field<scalar>& pp = this->patch().lookupPatchField
        reinterpret_cast<const volScalarField*>(NULL),
        reinterpret_cast<const scalar*>(NULL)
    scalar deltaTime = this->db().time().deltaT().value();
    scalarField area = this->patch().magSf();
    Field<scalar> magVel=max(1e-30,mag((*this)));
    Field<scalar> newValueFraction_;
    newValueFraction_ = min(1.,max(0.,tanDe_*deltaTime/magVel*pp*area));

so now i have created a newValueFracation_ which uses a tanDe_ read from dictionary. The Simulation seems to run fine, but now I have some problems with paraFoam...
But I will try to check if the BC is somehow meaningfull :rolleyes:


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