CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Acoustic Solver with openfoam

Register Blogs Community New Posts Updated Threads Search

Like Tree88Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 25, 2018, 04:06
Default
  #101
Member
 
Ilya
Join Date: Dec 2011
Location: Russia
Posts: 97
Blog Entries: 41
Rep Power: 14
skeptik is on a distinguished road
Quote:
Originally Posted by Q.E.D. View Post
Hi skeptik,



thank you for your work on this library!



The last update was a little while ago. So I just wanted to ask whether the libAcoustics library will eventually be updated to OF5.x?


Best wishes
Q.E.D.
Hi.

In any case, follow guys from ISP RAS (Moscow)

https://github.com/unicfdlab

Best wishes!
__________________
practice makes perfect
skeptik is offline   Reply With Quote

Old   August 24, 2018, 04:08
Default Could not find rho
  #102
New Member
 
HBR
Join Date: Jun 2018
Posts: 6
Rep Power: 7
landau is on a distinguished road
Dear All,

First of all I would like to thank the great labour that Skeptik and his group are doing concerning to aeroacoustics.

This is my very first post in this Forum, and I am pretty informed about how to manage common errors that appeared along this thread and others... but specifically this, I can not solve it by myself.

I'm using the library libAcoustics.so during pisoFoam under OF4.1 in a very simple case that runs perfectly without using the library. What is more, I use also other libraries to, for example, calculate the force coefficients of lift/drag.

The source of this error comes from nowhere but from any misuse of this library.

The error I find is the following:
Code:
Starting time loop

forces CurleAnalogy1:
    Not including porosity effects
Curle CurleAnalogy1:
    Not including porosity effects
Reading analogy settings
Time = 0.0001

Courant Number mean: 0.004787024 max: 0.1638222
smoothSolver:  Solving for Ux, Initial residual = 0.0002232178, Final residual = 2.606655e-09, No Iterations 2
smoothSolver:  Solving for Uy, Initial residual = 0.0004308772, Final residual = 1.203743e-08, No Iterations 2
smoothSolver:  Solving for Uz, Initial residual = 0.0001465603, Final residual = 4.982442e-09, No Iterations 2
GAMG:  Solving for p, Initial residual = 0.871151, Final residual = 0.04331954, No Iterations 2
time step continuity errors : sum local = 1.586758e-08, global = -1.57957e-10, cumulative = -1.57957e-10
GAMG:  Solving for p, Initial residual = 0.04690876, Final residual = 0.001487216, No Iterations 3
time step continuity errors : sum local = 1.265232e-09, global = -8.444425e-11, cumulative = -2.424012e-10
GAMG:  Solving for p, Initial residual = 0.006935179, Final residual = 7.817335e-07, No Iterations 14
time step continuity errors : sum local = 6.804893e-13, global = -1.056938e-14, cumulative = -2.424118e-10
smoothSolver:  Solving for nuTilda, Initial residual = 0.001147876, Final residual = 1.686137e-08, No Iterations 2
ExecutionTime = 3.24 s  ClockTime = 3 s

[1]
[2]
[2]
[2] --> FOAM FATAL ERROR:
[2] [3]
[3]
[3] --> FOAM FATAL ERROR:
[3] Could not find rho
[3] [4]
And my file containing the Curle controls:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  4.x                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/

CurleAnalogy1
{
    functionObjectLibs ("libAcoustics.so");
    type                Curle;
    log                 true;//Logging info
    probeFrequency      1;
    patches             ("sphere");
    order               second;
    timeStart           0;
    timeEnd             0.25;
    c0                  341;//Velocity of sound in air
    dRef                4;//Domain ref for 2D computations
    pName               p; //Pressure variable name
    rhoName             rhoInf;//rho;//none
    rhoInf              1.0;
    pInf                0.0;
    CofR                (0 0 0); //origin

    observers
    {
        probeA
        {
            position    (5.0 0.0 0.0);
            pRef        0.0;
            fftFreq     1024;
        }
        probeB
        {
            position    (0.0 2.5 0.0);
            pRef        0.0;
            fftFreq     1024;
        }
    }
}


// ************************************************************************* //
I think that is something related to a redefinition of the variable rho. I tried different possibilities regarding rhoName
1) rho
2) none

and regarding rhoInf
1) 1
2) Different value

I have also tried to use/don't use the forces library unsuccessfully.


Thank you all for your time, and I am sorry if this question has got an obvious answer.

Have a nice day.

Best regards,
HBR

Last edited by landau; August 28, 2018 at 04:07.
landau is offline   Reply With Quote

Old   January 6, 2019, 11:16
Default
  #103
New Member
 
Sam
Join Date: Feb 2018
Posts: 6
Rep Power: 8
xevious is on a distinguished road
Quote:
Originally Posted by skeptik View Post
Hi.

In any case, follow guys from ISP RAS (Moscow)

https://github.com/unicfdlab

Best wishes!



Hello skeptik!


Thank you very much for the development of libAcoustics! I have a few concerns:



I am currently trying to compute the noise of a rotating propeller using fw-h. I wanted to use a faceZone i created around the propeller as the control fw-h surface, but the functionObject only accepts patches? I would like to know if the library can be updated to accept faceZones also.


Also, it would be awesome if the probeFrequency would be modified to accept actual dt independent of the simulation timestep instead of 1.


I tried to get the library to work with openfoam v1712, but i got a slew of errors during compilation errors. Are there any plans to extend the compatibility of these libraries to other versions?




Again, thanks for working on libAcoustics!
xevious is offline   Reply With Quote

Old   March 27, 2019, 14:55
Default
  #104
New Member
 
Albert
Join Date: Mar 2014
Posts: 2
Rep Power: 0
Mecsocse is on a distinguished road
Dear all,

Thank you very much for the development of libAcoustics! I want to use it to calculate a 3D HVAC car System.

What solver would you use for the calculation? I think a rhoPimpleFoam would be a good choice.

Are there recommendations on what is better or makes more sense to use in my case?

Thank you very much!
Mecsocse is offline   Reply With Quote

Old   October 31, 2019, 21:07
Default
  #105
Senior Member
 
Brett
Join Date: May 2013
Posts: 212
Rep Power: 13
Bdew8556 is on a distinguished road
Hey guys,

I was wondering if you had any thoughts on this? its the same topic.

wmake and compiling
Bdew8556 is offline   Reply With Quote

Old   March 17, 2020, 05:16
Default with which equations?
  #106
Member
 
niewiemnic
Join Date: Jan 2018
Location: Niemcy
Posts: 80
Rep Power: 8
spalartallmaras is on a distinguished road
Quote:
Originally Posted by skeptik View Post
It's similar like calculating forces and coefficients via libforces.so in controlDict
Is pressure calculated by linearised Euler-equations?
spalartallmaras is offline   Reply With Quote

Old   March 17, 2020, 11:34
Default
  #107
New Member
 
Alireza Maleki
Join Date: Aug 2017
Location: United State
Posts: 20
Rep Power: 8
alireza94 is on a distinguished road
Quote:
Originally Posted by spalartallmaras View Post
Is pressure calculated by linearised Euler-equations?
Hi

I do not think so. Using LEE to simulate the propagation of acoustic signals is much complicated and even the Ansys software does not use this method. I far as I know, this library uses integral surface methods to simulate the acoustic signals.
Integral surface methods, like Farassat or Kirchhoff method, use a data surface to simulate the signal.

I hope it would be helpful
alireza94 is offline   Reply With Quote

Old   May 4, 2020, 13:18
Default digitef-dev-1912?
  #108
Member
 
niewiemnic
Join Date: Jan 2018
Location: Niemcy
Posts: 80
Rep Power: 8
spalartallmaras is on a distinguished road
Hi,

I want to use this code

https://github.com/unicfdlab/libAcoustics

but does anybody know where can I find digitef-dev-1912?

"OpenFOAM+ v.1912 is in the digitef-dev-1912 branch of the repository"
spalartallmaras is offline   Reply With Quote

Old   May 29, 2020, 08:11
Default
  #109
New Member
 
Mustafa
Join Date: Jun 2015
Location: Aachen
Posts: 26
Rep Power: 10
stamufa is on a distinguished road
@spalartallmaras just click on branch on the left and in the dropdown select the 1912 repo instead of the master
stamufa is offline   Reply With Quote

Old   February 24, 2021, 17:36
Default
  #110
Member
 
Guanjiang Chen
Join Date: Apr 2020
Location: Bristol, United Kingdom
Posts: 54
Rep Power: 6
guanjiang.chen is on a distinguished road
Quote:
Originally Posted by DAPHNE View Post
Dear Ilya and all,

Thank you so much for sharing the information.
From the presentation material ( OFW-Seoul-Kraposhin-AcousticTrack-5 pdf) given for Curle implementation discussed in slide 9 the expression used for
acoustic pressure is p'= 1/4IIc0_ * x/r^2 *[ (df/dt) + c0 f/r].

But in the Curle .C at line 288
scalar coeff1 = 1. / 4. / Foam::constant::mathematical:: pi / c0_ / c0_ ;

forAll (observers_, iObs)
{
SoundObserver& obs = observers_[iObs];
vector l = obs.position() - c_;
scalar r = mag(l);
scalar oap = l & (dFdT + c0_ * F / r) * coeff1 / r /r;
if (dRef_ > 0.0)
{
oap /= dRef_;
}
obs.apressure(oap);
}

}
}
It is clear that oap is the expression to find the p' value. But in the expression for oap, at the denominator we have c0_^2 , which is computed from the coeff1 expression. Is there any approximation made?Could you please explain is there any approximation like nearfield or farfield behind this approximation?

Thanks in advance.
Hi Daphne,

Could you please share the OFW-Seoul-Kraposhin-AcousticTrack-5 pdf with me? I search it but don't find it.

Thanks,
Guanjiang
guanjiang.chen is offline   Reply With Quote

Old   February 24, 2021, 18:50
Default
  #111
Member
 
Guanjiang Chen
Join Date: Apr 2020
Location: Bristol, United Kingdom
Posts: 54
Rep Power: 6
guanjiang.chen is on a distinguished road
Quote:
Originally Posted by landau View Post
Dear All,

First of all I would like to thank the great labour that Skeptik and his group are doing concerning to aeroacoustics.

This is my very first post in this Forum, and I am pretty informed about how to manage common errors that appeared along this thread and others... but specifically this, I can not solve it by myself.

I'm using the library libAcoustics.so during pisoFoam under OF4.1 in a very simple case that runs perfectly without using the library. What is more, I use also other libraries to, for example, calculate the force coefficients of lift/drag.

The source of this error comes from nowhere but from any misuse of this library.

The error I find is the following:
Code:
Starting time loop

forces CurleAnalogy1:
    Not including porosity effects
Curle CurleAnalogy1:
    Not including porosity effects
Reading analogy settings
Time = 0.0001

Courant Number mean: 0.004787024 max: 0.1638222
smoothSolver:  Solving for Ux, Initial residual = 0.0002232178, Final residual = 2.606655e-09, No Iterations 2
smoothSolver:  Solving for Uy, Initial residual = 0.0004308772, Final residual = 1.203743e-08, No Iterations 2
smoothSolver:  Solving for Uz, Initial residual = 0.0001465603, Final residual = 4.982442e-09, No Iterations 2
GAMG:  Solving for p, Initial residual = 0.871151, Final residual = 0.04331954, No Iterations 2
time step continuity errors : sum local = 1.586758e-08, global = -1.57957e-10, cumulative = -1.57957e-10
GAMG:  Solving for p, Initial residual = 0.04690876, Final residual = 0.001487216, No Iterations 3
time step continuity errors : sum local = 1.265232e-09, global = -8.444425e-11, cumulative = -2.424012e-10
GAMG:  Solving for p, Initial residual = 0.006935179, Final residual = 7.817335e-07, No Iterations 14
time step continuity errors : sum local = 6.804893e-13, global = -1.056938e-14, cumulative = -2.424118e-10
smoothSolver:  Solving for nuTilda, Initial residual = 0.001147876, Final residual = 1.686137e-08, No Iterations 2
ExecutionTime = 3.24 s  ClockTime = 3 s

[1]
[2]
[2]
[2] --> FOAM FATAL ERROR:
[2] [3]
[3]
[3] --> FOAM FATAL ERROR:
[3] Could not find rho
[3] [4]
And my file containing the Curle controls:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  4.x                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/

CurleAnalogy1
{
    functionObjectLibs ("libAcoustics.so");
    type                Curle;
    log                 true;//Logging info
    probeFrequency      1;
    patches             ("sphere");
    order               second;
    timeStart           0;
    timeEnd             0.25;
    c0                  341;//Velocity of sound in air
    dRef                4;//Domain ref for 2D computations
    pName               p; //Pressure variable name
    rhoName             rhoInf;//rho;//none
    rhoInf              1.0;
    pInf                0.0;
    CofR                (0 0 0); //origin

    observers
    {
        probeA
        {
            position    (5.0 0.0 0.0);
            pRef        0.0;
            fftFreq     1024;
        }
        probeB
        {
            position    (0.0 2.5 0.0);
            pRef        0.0;
            fftFreq     1024;
        }
    }
}


// ************************************************************************* //
I think that is something related to a redefinition of the variable rho. I tried different possibilities regarding rhoName
1) rho
2) none

and regarding rhoInf
1) 1
2) Different value

I have also tried to use/don't use the forces library unsuccessfully.


Thank you all for your time, and I am sorry if this question has got an obvious answer.

Have a nice day.

Best regards,
HBR
Hi,

This post may be helpful.
how to use acoustic lib in openfoam

Regards,
Guanjiang
raj kumar saini likes this.

Last edited by guanjiang.chen; February 26, 2021 at 17:21.
guanjiang.chen 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
Working directory via command line Luiz CFX 4 March 6, 2011 20:02
Running Problem using Openfoam solver cfd_staruser OpenFOAM 5 August 14, 2009 02:28
64bitrhel5 OF installation instructions mirko OpenFOAM Installation 2 August 12, 2008 18:07
why the solver reject it? Anyone with experience? bearcat CFX 6 April 28, 2008 14:08
OpenFOAM Training and Workshop Zagreb 2628Jan2006 hjasak OpenFOAM 1 February 2, 2006 21:07


All times are GMT -4. The time now is 11:20.