CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Slip boundary around circles (https://www.cfd-online.com/Forums/openfoam-solving/58485-slip-boundary-around-circles.html)

zhoubinwx October 2, 2008 15:49

Dear all, About the 1st que
 
Dear all,

About the 1st question my post on Sep 21, that is:

The three point coordinates are (4.41226e-05,5.79779e-05), (4.71079e-05,6.24456e-05), (4.2272e-05,5.92143e-05);
The circle center coordinate is:-(4.469e-05,6.083e-05)-----this is correct, I have compared with gmsh geo file
The diamter of the circle is:5.81612e-06-----however, the diameter should be 5.93 micrometer (I am sure the equation to calculate diameter is right: 2*sqrt(....)).

In order to check why, I plot the following pictures, Pic 1 from Gmsh geometry, Pic 2 with the output information.

http://www.cfd-online.com/OpenFOAM_D...ges/1/9416.png
Pic 1

http://www.cfd-online.com/OpenFOAM_D...ges/1/9417.png
Pic 2

Finding:
I need to check if the one point coordinate of three points are the point on the circle?

I could not find them in the file constant/polyMesh/points!!! is the point the middle of the circle points? (I guess)

I have two png figures. I find point 1143 coordinate is: (4.25934e-05 5.87334e-05 0)
while our one point output (the one near point 12) is: (4.41226e-05,5.79779e-05,5e-06), while
point 12 is: (4.469e-05 5.7865e-05 0)

The way I get these three points:

const vectorField & pp = patch().Cf();
vector p0, p1, p2;
if (pp.size() >= 3)
{
p0 = pp[0];
p1 = pp[1];
p2 = pp[2];
}

I could not fully understand this numerical discrepancy. would you please give me any hint?

Thank you for your attention.

Bin

zhoubinwx October 3, 2008 04:26

After test, I know that my way
 
After test, I know that my way to get the point coordinate is wrong,
const vectorField & pp = patch().Cf();

I must find a way out.

zhoubinwx October 4, 2008 12:12

Today I compared the Gmsh poin
 
Today I compared the Gmsh points coordinates with the file "points", at last I am sure:

const vectorField & pp = patch().Cf();

could return the middle point of each mesh face.

Then I think since the function Cf() could get the point coordinate, I many use the way it used.

I find "makeFaceCentresAndAreas" in "primitiveMeshFaceCentresAndAreas.C",

Then I use the way it used:
-------------------
vector p0, p1, p2;
const pointField& p=points();
const faceList& fs = faces();
forAll (fs, facei)
{
const labelList& f = fs[facei];
p0=p[f[0]];
p1=p[f[1]];
p2=p[f[2]];
}
--------------------
when I compile, I get:
--------------------
error: 'points' was not declared in this scope
error: 'faces' was not declared in this scope

Since we are already in the "circleSlip" type, I do not want to use
label patchID = mesh.boundaryMesh().findPatchID("circle");
to specify the patch.Otherwise we need many findPatchID("circle1"), findPatchID("circle2")....;

This is not what I want, just like the slip already in OpenFOAM, whenever sb want circleSlip boundary, it could get the points on the circle.

If you have any hints about this, i.e. how to get the point coordinates, I would like to thank you in advance.

I must conquer this even though I may not good at OpenFOAM.

Thank you for attention.

Best regards,

bin

zhoubinwx October 5, 2008 15:38

Could I ask in OpenFOAM, which
 
Could I ask in OpenFOAM, which plane we are using for the 2-D models? Is it in the front(z=0)? in the back(z=1e-5)? or in the middle plane(5e-6)?

Best regards,

Bin

zhoubinwx October 6, 2008 06:12

It is solved about how to get
 
It is solved about how to get the diameter for a circle patch.

If anyone needs this, just write to me: zhoubinwx@hotmail.com

let me go on with the boundary condition setting, and hope to finish soon and correctly.

Bin

zhoubinwx October 9, 2008 12:49

Dear foamers, After I imple
 
Dear foamers,

After I implement my boundary, the simulation goes on for several minutes, but then I get an error, please allow me to post it here, to see if some friends have experience dealing with this.

The error is:
#0 Foam::error::printStack(Foam:http://www.cfd-online.com/OpenFOAM_D...part/proud.gifstream&) in "/home/zhou/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/home/zhou/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#2 Uninterpreted: [0xffffe420]
#3 Foam::PBiCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/home/zhou/OpenFOAM/OpenFOAM-1.5/lib/linuxGccDPOpt/libOpenFOAM.so"
#4 Foam::fvMatrix<foam::vector<double> >::solve(Foam::Istream&) in "/home/zhou/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/simpleFoam"
#5 Foam::lduMatrix::solverPerformance Foam::solve<foam::vector<double> >(Foam::tmp<foam::fvmatrix<foam::vector<double> > > const&) in "/home/zhou/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/simpleFoam"
#6 main in "/home/zhou/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/simpleFoam"
#7 __libc_start_main in "/lib/libc.so.6"
#8 Foam::regIOobject::readIfModified() in "/home/zhou/OpenFOAM/OpenFOAM-1.5/applications/bin/linuxGccDPOpt/simpleFoam"

If you know, please let me know.

Really appreciate your attention.

Best regards,

Bin

Kelvin_mk June 29, 2011 17:39

volVectorField_Tangential Component
 
Dear Zhou Bin,

I try to find tangential component of gradient. I read all of your posts. Did you define tangential components of any vector as a volVectorField. You wrote previous post,

volVectorField U_t=U_n*(n&U)

How can you define it???

This thread is very old maybe you got it so I want to ask you?

Thank you for your helping.

:confused:

afeworkimussie March 1, 2013 06:49

Hi,
as we all know all of us learn from mistakes others committed while dealing with CFD. That is why we visit the site to get ideas and to learn from others mistakes and to share our mistakes and ideas. Hence, I would like you to post how you solve your problem as I encounter the same error flag message with s similar act to implement a rampedFixedValue BC.

Cheers!

afeworkimussie March 1, 2013 06:55

Quote:

Originally Posted by zhoubinwx (Post 201771)
Hi, in order to know the step to implement simple boundary condition on models, I use ramped boundary condition, on the base of the boundary "oscillatingFixedValue".

However, when I wmake, I get the error:
Making dependency list for source file icoFoamRamped.C
could not open file rampedFixedValueFVPatchFiedls.H for source file icoFoamRamped.C
make: *** No rule to make target `rampedFixedValueFvPatchFields.dep', needed by `Make/linuxGccDPOpt/dependencies'. Stop.

I do not know how could I solve this problem. Is here anyone who could get me out?

Thank you

Hello, Please , inform what was the problem and how did you solve it!

Thanks!

afeworkimussie March 1, 2013 06:59

Quote:

Originally Posted by zhoubinwx (Post 201772)
Hi, the above problem is solved.

Now when I do as follows:
--------------------------
cp -r $FOAM_TUTORIALS/icoFoam/cavity ~/OpenFOAM/zhou-1.5/applications/icoFoamRamped/cavityRamped
cd cavityRamped/
cd 0
gedit U &
--------------------------
movingWall
{
type rampedFixValue
refValueLow (0 0 0);
refValueHigh (10 0 0);
startRamp 0.1;
endRamp 0.4;
}
--------------------------
I have changed the movingwall boundary with our modified ramped boundary, then
icoFoamRamped> log &
I get error:
----------------------------
Cannot find 'value' entry on patch movingWall of field U in file "/home/zhou/OpenFOAM/zhou-1.5/applications/icoFoamRamped/cavityRamped/0/U"
which is required to set the values of the generic patch field.
(Actual type rampedFixValue)

Please add the 'value' entry to the write function of the user-defined boundary-condition
or link the boundary-condition into libfoamUtil.so

file: /home/zhou/OpenFOAM/zhou-1.5/applications/icoFoamRamped/cavityRamped/0/U::moving Wall from line 37 to line 41.

From function genericFvPatchField::genericFvPatchField(const fvPatch&, const Field&, const dictionary&)
in file fields/fvPatchFields/basic/generic/genericFvPatchField.C at line 72.

FOAM exiting
--------------------------

I go deep into the file "rampedFixedValueFvPatchField.C", and could not find anything wrong.

Could I ask for any suggestion about this?

Thank you.

Best regards,

Bin


I think you make a mistake in writing the boundary type you just created as rampedFixValue rather than rampedFixedValue , hopefully that may be one cause from what can be sen from the displayed code.

Cheers!

afeworkimussie March 2, 2013 06:59

Quote:

Originally Posted by zhoubinwx (Post 201771)
Hi, in order to know the step to implement simple boundary condition on models, I use ramped boundary condition, on the base of the boundary "oscillatingFixedValue".

However, when I wmake, I get the error:
Making dependency list for source file icoFoamRamped.C
could not open file rampedFixedValueFVPatchFiedls.H for source file icoFoamRamped.C
make: *** No rule to make target `rampedFixedValueFvPatchFields.dep', needed by `Make/linuxGccDPOpt/dependencies'. Stop.

I do not know how could I solve this problem. Is here anyone who could get me out?

Thank you

Hi there,
what was the problem and how did you solve it?


All times are GMT -4. The time now is 12:38.