CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   boundary condition icofoam: how to make a ramp (http://www.cfd-online.com/Forums/openfoam-solving/95884-boundary-condition-icofoam-how-make-ramp.html)

cfd-noob January 6, 2012 06:22

boundary condition icofoam: how to make a ramp
 
hey,
I hope I am in the right forum here.
I want to change the icofoam case in the tutorial in a way that the upper wall doesn't has the speed of "1" at the beginning.

So I need "timeVaryingUniformFixedValue". But to use that type I need to write "EXE_LIBS = -lcfdTools" into the Make/options file and than recompile it. (This is what I have read so far).

First of all, ist that true?
And second, I am using Ubuntu. So with "sudo gedit" I was able to change the file in "opt/openfoam210/applications/solvers"...
But how do I recompile it from there? Or am I doing everything wrong here :-(

Thanks for every answer

anon_a January 6, 2012 11:40

Hello

In order to apply different boundary conditions you don't need to compile anything, you just have to modify the files in the directory 0 (please read the manual :-) ).

In general, in order to apply timeVaryingUniformFixedValue you would do the following:

i) open 0/U with an editor and change the field
movingWall
{
type timeVaryingUniformFixedValue;
fileName "time-series";
outOfBounds clamp;
}

ii) create a file in the main directory of the case called "time-series" and place the time and velocity values like this
(
(0. (0 0 0))
(1. (1 0 0))
)

More information on this BC
http://www.cfd-online.com/Forums/ope...foam-15-a.html
http://www.cfd-online.com/Forums/ope...value-b-c.html
http://www.cfd-online.com/Forums/ope...ixedvalue.html
http://www.cfd-online.com/Forums/ope...ixedvalue.html

Compilation is performed with "wmake" or "wmake libso" (again, read the manual).
But you don't really need this right now.

Regards,
S.P.

cfd-noob January 6, 2012 15:40

Thank you very much, but it doesn't work.

Here is the problem:

Quote:

FOAM FATAL IO ERROR:
Unknown patchField type timeVaryingUniformFixedValue for patch type wall

Valid patchField types are :

59
(
SRFFreestreamVelocity
SRFVelocity
activeBaffleVelocity
activePressureForceBaffleVelocity
advective
calculated
codedFixedValue
codedMixed
cyclic
cyclicAMI
cyclicSlip
cylindricalInletVelocity
directionMixed
empty
fixedGradient
fixedInternalValue
fixedNormalSlip
fixedValue
flowRateInletVelocity
fluxCorrectedVelocity
freestream
inletOutlet
mapped
mappedField
mappedFixedInternalValue
mappedFixedPushedInternalValue
mappedFlowRate
mappedVelocityFlux
mixed
movingWallVelocity
nonuniformTransformCyclic
oscillatingFixedValue
outletInlet
outletMappedUniformInlet
partialSlip
pressureDirectedInletOutletVelocity
pressureDirectedInletVelocity
pressureInletOutletParSlipVelocity
pressureInletOutletVelocity
pressureInletUniformVelocity
pressureInletVelocity
pressureNormalInletOutletVelocity
processor
processorCyclic
rotatingPressureInletOutletVelocity
rotatingWallVelocity
sliced
slip
supersonicFreestream
surfaceNormalFixedValue
swirlFlowRateInletVelocity
symmetryPlane
timeVaryingMappedFixedValue
translatingWallVelocity
turbulentInlet
uniformFixedValue
waveTransmissive
wedge
zeroGradient
)
The Problem is, icoFoam does not have the type "timeVaryingUniformFixedValue". To use this type, I have to modify icoFoam e.g. putting the library cfdtools in it. And than I have to compile it, so that icoFoam has the library can can use this type.

And I don't know how to do that.

anon_a January 6, 2012 15:57

Ok, now your problem is much clearer!
I didn't realize there were such changes in v2.1.0.

Here, take a look at this:
http://www.openfoam.org/version2.1.0...conditions.php
"uniformFixedValue" is what you are looking for
(I guess it's the part with the "table")

cfd-noob January 6, 2012 18:19

Thank you very much.

I didn't realize that the new version can't work with the old tutorials.
This is how I solve it now:
Quote:

movingWall
{
type uniformFixedValue;
uniformValue tableFile;
tableFileCoeffs
{
fileName "$FOAM_CASE/ramp"
outOfBounds clamp;
}

}
No recompilation was necessary.


All times are GMT -4. The time now is 23:24.