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

New Boundary Condition

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 30, 2010, 11:24
Default New Boundary Condition
  #1
Senior Member
 
Join Date: Jan 2010
Location: Stuttgart
Posts: 150
Rep Power: 16
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, 09:42
Default
  #2
Senior Member
 
Join Date: Jan 2010
Location: Stuttgart
Posts: 150
Rep Power: 16
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, 15:50
Default Re:
  #3
Member
 
N. A.
Join Date: May 2010
Posts: 64
Rep Power: 15
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, 02:19
Default
  #4
Senior Member
 
Join Date: Jan 2010
Location: Stuttgart
Posts: 150
Rep Power: 16
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, 10:05
Default
  #5
Member
 
Join Date: Oct 2011
Posts: 37
Rep Power: 14
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


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 Off
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 05:05
How exactly the "pressure outlet" bdry condition compute properties on the boundary? yating9901 FLUENT 3 June 28, 2010 12:26
Transient outlet boundary condition problem jwillie2000 CFX 1 December 7, 2009 17:07
How to set boundary condition in Fluent for the fo Peiyong FLUENT 1 November 10, 2006 11:44
How to resolve boundary condition problem? sam FLUENT 2 July 20, 2003 02:19


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