CFD Online URL
[Sponsors]
Home > Forums > OpenFOAM Pre-Processing

New Boundary Condition

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

Reply
 
LinkBack Thread Tools Display Modes
Old   August 30, 2010, 12:24
Default New Boundary Condition
  #1
Senior Member
 
Join Date: Jan 2010
Location: Stuttgart
Posts: 122
Rep Power: 6
Chrisi1984 is on a distinguished road
Hi all,

I want to create a new boundary conditon, that combines inletOutlet and timeVaryingUniformFixedValue.

Therfore I followed this instructions http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2008/implementBoundaryCondition.pdf. But when I only copy one existing boundary and then try to compile it. I allways get errors because of redefinitions like this:
Quote:
SOURCE=inletOutletFvPatchField.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -I/cfd/CFD/PROGRAMME/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude -IlnInclude -I. -I/cfd/CFD/PROGRAMME/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/cfd/CFD/PROGRAMME/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/inletOutletFvPatchField.o
inletOutletFvPatchField.C:41: error: redefinition of ‘Foam::inletOutletFvPatchField<Type>::inletOutletF vPatchField(const Foam::fvPatch&, const Foam:imensionedField<Type, Foam::volMesh>&)’
inletOutletFvPatchField.C:41: error: ‘Foam::inletOutletFvPatchField<Type>::inletOutletF vPatchField(const Foam::fvPatch&, const Foam:imensionedField<Type, Foam::volMesh>&)’ previously declared here
inletOutletFvPatchField.C:59: error: redefinition of ‘Foam::inletOutletFvPatchField<Type>::inletOutletF vPatchField(const Foam::inletOutletFvPatchField<Type>&, const Foam::fvPatch&, const Foam:imensionedField<Type, Foam::volMesh>&, const Foam::fvPatchFieldMapper&)’
inletOutletFvPatchField.C:59: error: ‘Foam::inletOutletFvPatchField<Type>::inletOutletF vPatchField(const Foam::inletOutletFvPatchField<Type>&, const Foam::fvPatch&, const Foam:imensionedField<Type, Foam::volMesh>&, const Foam::fvPatchFieldMapper&)’ previously declared here
inletOutletFvPatchField.C:72: error: redefinition of ‘Foam::inletOutletFvPatchField<Type>::inletOutletF vPatchField(const Foam::fvPatch&, const Foam:imensionedField<Type, Foam::volMesh>&, const Foam::dictionary&)’
inletOutletFvPatchField.C:72: error: ‘Foam::inletOutletFvPatchField<Type>::inletOutletF vPatchField(const Foam::fvPatch&, const Foam:imensionedField<Type, Foam::volMesh>&, const Foam::dictionary&)’ previously declared here
inletOutletFvPatchField.C:100: error: redefinition of ‘Foam::inletOutletFvPatchField<Type>::inletOutletF vPatchField(const Foam::inletOutletFvPatchField<Type>&)’
inletOutletFvPatchField.C:100: error: ‘Foam::inletOutletFvPatchField<Type>::inletOutletF vPatchField(const Foam::inletOutletFvPatchField<Type>&)’ previously declared here
inletOutletFvPatchField.C:112: error: redefinition of ‘Foam::inletOutletFvPatchField<Type>::inletOutletF vPatchField(const Foam::inletOutletFvPatchField<Type>&, const Foam:imensionedField<Type, Foam::volMesh>&)’
inletOutletFvPatchField.C:112: error: ‘Foam::inletOutletFvPatchField<Type>::inletOutletF vPatchField(const Foam::inletOutletFvPatchField<Type>&, const Foam:imensionedField<Type, Foam::volMesh>&)’ previously declared here
inletOutletFvPatchField.C:122: error: redefinition of ‘void Foam::inletOutletFvPatchField<Type>::updateCoeffs( )’
inletOutletFvPatchField.C:122: error: ‘virtual void Foam::inletOutletFvPatchField<Type>::updateCoeffs( )’ previously declared here
inletOutletFvPatchField.C:143: error: redefinition of ‘void Foam::inletOutletFvPatchField<Type>::write(Foam::O stream&) const’
inletOutletFvPatchField.C:143: error: ‘virtual void Foam::inletOutletFvPatchField<Type>::write(Foam::O stream&) const’ previously declared here
inletOutletFvPatchField.C:161: error: redefinition of ‘void Foam::inletOutletFvPatchField<Type>:perator=(con st Foam::fvPatchField<Type>&)’
inletOutletFvPatchField.C:161: error: ‘virtual void Foam::inletOutletFvPatchField<Type>:perator=(con st Foam::fvPatchField<Type>&)’ previously declared here
What's wrong?

Can anybody help me?

Best regards Chrisi
Chrisi1984 is offline   Reply With Quote

Old   September 1, 2010, 10:42
Default
  #2
Senior Member
 
Join Date: Jan 2010
Location: Stuttgart
Posts: 122
Rep Power: 6
Chrisi1984 is on a distinguished road
Hi,

I am now abled to compile the original boundary conditions!!

But I have problems in combining the two boundaries. I want that the inletValue is read out of a file with time depending values, like in timeVaryingUniformFixedValue.

How can I do this?

Regards Chrisi
Chrisi1984 is offline   Reply With Quote

Old   September 8, 2010, 16:50
Default Re:
  #3
Member
 
N. A.
Join Date: May 2010
Posts: 64
Rep Power: 6
N. A. is on a distinguished road
Chris,

Were you able to solve this problem? Even I am looking to give time-varying boundary conditions. I know I can give for lagrangian particles as it is given in dieselFoam, but dont know how to give for boundary conditions in gas-phase.

Also do you know how can we impose mass flow boundary conditions.

Thanks,
Nir
N. A. is offline   Reply With Quote

Old   September 9, 2010, 03:19
Default
  #4
Senior Member
 
Join Date: Jan 2010
Location: Stuttgart
Posts: 122
Rep Power: 6
Chrisi1984 is on a distinguished road
Hi,

I implemented my bc by using groovyBC.

Quote:
type groovyBC;
gradientExpression "gradT";
fractionExpression "(phi > 0) ? 0 : 1";
timelines (
{
name Temp;
outOfBounds repeat;
fileName "$FOAM_CASE/rb_p_T";
}
);
variables "gradT=0;";
valueExpression "Temp";
value uniform 900;
Details about this contirbutions can be found here: http://openfoamwiki.net/index.php/Co...s_are_defined:

You can also make bc incorporating the mass-flow. Therefor you can take flowRateInletVelocity for example. Or for time depending mass-flow take timeVaryingFlowRateInletVelocity.

I hope I could help you.

Regards Chrisi
Chrisi1984 is offline   Reply With Quote

Old   November 8, 2011, 11:05
Default
  #5
Member
 
Join Date: Oct 2011
Posts: 36
Rep Power: 5
Peter Müller is on a distinguished road
Hello Chrisi

I'm quite new in openFoam and I also try to create an own bc. I receive the same error as you with the redefinitions. What have you done to get rid of these errors?

Thanks Peter
Peter Müller is offline   Reply With Quote

Reply

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Boundary Conditions Thomas P. Abraham Main CFD Forum 20 July 7, 2013 06:05
How exactly the "pressure outlet" bdry condition compute properties on the boundary? yating9901 FLUENT 3 June 28, 2010 13:26
Transient outlet boundary condition problem jwillie2000 CFX 1 December 7, 2009 18:07
How to set boundary condition in Fluent for the fo Peiyong FLUENT 1 November 10, 2006 12:44
How to resolve boundary condition problem? sam FLUENT 2 July 20, 2003 03:19


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