Open wuuyuan opened 1 year ago
here is additional comment.
I also run my own flow_past_cylinder case to obtain the p_Fluct and the same situation occurs as well.
as you can see, the p_Fluct at $\theta=0$ has the mean value far away from 0, but the p_Fluct at $\theta=90$ has 0 mean value, which makes the directivity shown below:
however, when I use "p_fluct = p_fluct - mean(p_fluct)" in post-processing, the directivity could fit in the right image :
And I am pretty sure that I set the internalField as 0 and I am using pimpleFoam solver in OpenFoam
here is my case set:
/--------------------------------- C++ -----------------------------------\ | ========= | | | \ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \ / O peration | Version: v2012 | | \ / A nd | Website: www.openfoam.com | | \/ M anipulation | | *---------------------------------------------------------------------------/ FoamFile { version 2.0; format ascii; class volScalarField; object p; } // //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0;
boundaryField { INLET { type zeroGradient;
}
OULET
{
type fixedValue;
value $internalField;
}
WALL
{
type zeroGradient;
}
CYLINDER
{
type zeroGradient;
}
FRONT
{
type empty;
}
BACK
{
type empty;
}
/--------------------------------- C++ -----------------------------------\ | ========= | | | \ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \ / O peration | Version: v2012 | | \ / A nd | Website: www.openfoam.com | | \/ M anipulation | | *---------------------------------------------------------------------------/ FoamFile { version 2.0; format ascii; class volVectorField; object U; } // //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0.3 0 0);
boundaryField { INLET { type fixedValue; value uniform (0.3 0 0);//0.3 } OULET { type zeroGradient;
}
WALL
{
type slip;
}
CYLINDER
{
type movingWallVelocity;
value uniform (0 0 0);
}
FRONT
{
type empty;
}
BACK
{
type empty;
}
Farassat1A-Patch { type FfowcsWilliamsHawkings; formulationType Farassat1AFormulation;
patches ();
interpolationScheme cell;
surfaces
(
CYLINDER
{
type patch;
patches (CYLINDER);
interpolate false;
}
);
cleanFreq 100;
fixedResponseDelay true;
responseDelay 0.01;
nonUniformSurfaceMotion true;
Ufwh (.0 .0 .0);
U0 (.0 .0 .0);
}
libs ("libAcoustics.so");
log true;
probeFrequency 1;
timeStart 200;
timeEnd 1000;
writeFft false;
c0 1500;
pName p;
pInf 0;//for pisoFoam
rhoName rho;
rho rhoInf;
rhoInf 1000;
CofR (0 0 0);
observers
{
// r = 50
N3_1
{
position (50 0 1);
pRef 0.000020;
fftFreq 1024;
}
...
/--------------------------------- C++ -----------------------------------\ | ========= | | | \ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \ / O peration | Version: v2012 | | \ / A nd | Website: www.openfoam.com | | \/ M anipulation | | *---------------------------------------------------------------------------/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object controlDict; } // //
application pimpleFoam;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 1000;
deltaT 5e-4;
writeControl adjustableRunTime;
writeInterval 0.1;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable true;
adjustTimeStep yes;
maxCo 0.9;
functions {
}
The E1 point is located in near field and is needed to compare pressure with direct calculation. If you are using the pimple or piso algorithm you need to set pInf equal to 0. This tutorial was created to show how to use and configure libacoustics for similar problems. Library validation cases can be found in the Tests folder. You may also be interested in the answers to these questions: https://github.com/unicfdlab/libAcoustics/issues/75#issue-1213514406 https://github.com/unicfdlab/libAcoustics/issues/78#issue-1240059897
Regards, AE
The E1 point is located in near field and is needed to compare pressure with direct calculation. If you are using the pimple or piso algorithm you need to set pInf equal to 0. This tutorial was created to show how to use and configure libacoustics for similar problems. Library validation cases can be found in the Tests folder. You may also be interested in the answers to these questions: #75 (comment) #78 (comment)
Regards, AE
thank you for replying, however, in the case that I have tried above, I have already set ping equal to 0, but the mean value of p_fluct at E1 is not equal to 0, what else can I do in the setting file?
and here is my setting of pInf in common setting:
hi, I am running the VortexShed tutorial case in OpenFoam v20 and libacoustic in v20. But the p_Fluct of one observation point calculated by FWH method has non-zero mean value, which confuse me that the acoustic pressure should oscillate around the 0 rather than a non-zero value. how can I get the right value in this case?
here is the output .dat file and I used MATLAB to draw it:
as we can see that the point E1's p_Fluct has the non-zero mean value, it it right ?