CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Time dependent boundary condition for VOF function (http://www.cfd-online.com/Forums/openfoam/112225-time-dependent-boundary-condition-vof-function.html)

houkensjtu January 24, 2013 04:13

Time dependent boundary condition for VOF function
 
Hi foamer!
I made a axis-sym channel case to simulate bubble flow in small tube and I am using interFoam as my solver.
On the inlet, half of the surface is set as a liquid inlet, so boundary condition for the VOF function(alpha) is constant 1, the other half being air inlet, so the boundary condition for the VOF function(alpha) is constant 0.
Everything was fine when I applied this as fixedValue BC.
Now I want to implement a time-dependent air jet, which means for example, from t=0 to t=1.0, alpha = 0 and after t=1.0, alpha become 1(on inlet).

I applied this by uniformFixedValue like (here is my alpha file in 0/)

airinlet{
type uniformFixedValue;
uniformValue table
(
(0 0)
(1.0 1)
);
}

Then I got the following error:
--> FOAM FATAL ERROR:
object is not allocated

From function const T& Foam::autoPtr<T>::operator()() const
in file /home/houken/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/autoPtrI.H at line 132.

FOAM aborting

#0 Foam::error::printStack(Foam::Ostream&) at ~/OpenFOAM/OpenFOAM-2.1.x/src/OSspecific/POSIX/printStack.C:201
#1 Foam::error::abort() at ~/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/error.C:249
#2 Foam::Ostream& Foam::operator<< <Foam::error>(Foam::Ostream&, Foam::errorManip<Foam::error>) at ~/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/errorManip.H:85
#3 Foam::autoPtr<Foam::DataEntry<double> >::operator()() const at ~/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/autoPtrI.H:137
#4 Foam::uniformFixedValueFvPatchField<double>::unifo rmFixedValueFvPatchField(Foam::uniformFixedValueFv PatchField<double> const&, Foam::DimensionedField<double, Foam::volMesh> const&) at ~/OpenFOAM/OpenFOAM-2.1.x/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValue/uniformFixedValueFvPatchField.C:102
#5 Foam::uniformFixedValueFvPatchField<double>::clone (Foam::DimensionedField<double, Foam::volMesh> const&) const at ~/OpenFOAM/OpenFOAM-2.1.x/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedValue/uniformFixedValueFvPatchField.H:125
#6 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField::GeometricB oundaryField(Foam::DimensionedField<double, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricBoundaryField const&) at ~/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/GeometricBoundaryField.C:198
#7 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricField(Foam::IOobject const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ~/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/GeometricField.C:507
#8 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::oldTime() const at ~/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/GeometricField.C:778
#9 Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::oldTime() at ~/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/GeometricField.C:805
#10
at ~/OpenFOAM/OpenFOAM-2.1.x/applications/solvers/multiphase/interFoam/createFields.H:71
#11 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#12
in "/home/houken/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPDebug/bin/interFoam"
Aborted (core dumped)


Does it means uniformFixedValue could not be applied to alpha? Or I made any mistake on setting it ?

Plz help!

nimasam January 25, 2013 14:34

i offer you using groovyBC, give you much more functionality


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