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

how to use acoustic lib in openfoam

Register Blogs Community New Posts Updated Threads Search

Like Tree12Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 11, 2020, 21:54
Default how to use acoustic lib in openfoam
  #1
New Member
 
zein elserfy
Join Date: May 2018
Posts: 25
Rep Power: 8
zeinelserfy is on a distinguished road
Hi all,

Have anyone used acoustic library developed by unicfdlab?
http://github.com/unicfdlab/libAcoustics

I want to use it for predicting the far-field noise for flow over aerofoil.I have also found the presentation for some tutorials for using it named ofwAcoustics.pdf
https://github.com/unicfdlab/Trainin...ustics-OFv1812

can anyone give some help concerning how to used and it capabilities?
zeinelserfy is offline   Reply With Quote

Old   February 12, 2020, 00:12
Default
  #2
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13
HPE is on a distinguished road
i would dive into trying to use it in some way, and ask more specific questions along the way for the problems that appear.
HPE is offline   Reply With Quote

Old   February 12, 2020, 19:19
Default
  #3
New Member
 
zein elserfy
Join Date: May 2018
Posts: 25
Rep Power: 8
zeinelserfy is on a distinguished road
Quote:
Originally Posted by HPE View Post
i would dive into trying to use it in some way, and ask more specific questions along the way for the problems that appear.
have to use it before?I am afraid of spending time on it without being able to use it.

is it reliable tool to use?
Jean Yue likes this.
zeinelserfy is offline   Reply With Quote

Old   February 13, 2020, 02:45
Default
  #4
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13
HPE is on a distinguished road
never used it.
HPE is offline   Reply With Quote

Old   May 18, 2020, 03:45
Default
  #5
Senior Member
 
mkraposhin's Avatar
 
Matvey Kraposhin
Join Date: Mar 2009
Location: Moscow, Russian Federation
Posts: 355
Rep Power: 21
mkraposhin is on a distinguished road
Quote:
Originally Posted by zeinelserfy View Post
Hi all,

Have anyone used acoustic library developed by unicfdlab?
http://github.com/unicfdlab/libAcoustics

I want to use it for predicting the far-field noise for flow over aerofoil.I have also found the presentation for some tutorials for using it named ofwAcoustics.pdf
https://github.com/unicfdlab/Trainin...ustics-OFv1812

can anyone give some help concerning how to used and it capabilities?
The library libAcoustics was developed to simulate far-field acoustics using Curle and FWH analogies with integral approach. The library was verified for monopole, dipole source and it was validated for multiple free jet flows. I would recommend you to use latest - OF1912 version. If you find bugs, please report them to issues on GitHub.
HPE, guanjiang.chen, Tj_m3 and 1 others like this.
mkraposhin is offline   Reply With Quote

Old   May 18, 2020, 17:41
Default
  #6
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13
HPE is on a distinguished road
sorry - mistaken - thus deleted. Great work, thank you!
HPE is offline   Reply With Quote

Old   October 7, 2020, 19:51
Default
  #7
New Member
 
Tommy
Join Date: May 2020
Location: United States
Posts: 6
Rep Power: 6
Tj_m3 is on a distinguished road
Quote:
Originally Posted by mkraposhin View Post
The library libAcoustics was developed to simulate far-field acoustics using Curle and FWH analogies with integral approach. The library was verified for monopole, dipole source and it was validated for multiple free jet flows. I would recommend you to use latest - OF1912 version. If you find bugs, please report them to issues on GitHub.

Hi Matvey,

Many thanks for making this library available! I am trying to use it to compute airfoil noise for a low mach number flow, using the FWH analogy. I am running into some trouble using the library with an incompressible solver (pimplefoam).

The error occurs when reading the velocity field:
"request for volScalarField rho from objectRegistry region0 failed"

I have set a uniform volScalarField "rho" in the "0" folder, but it doesn't appear to be read by the library. I was wondering if you had any advice on using libAcoustics.so with an incompressible solver.

thank you!
Tommy Malkus
Tj_m3 is offline   Reply With Quote

Old   October 8, 2020, 06:28
Default
  #8
Senior Member
 
mkraposhin's Avatar
 
Matvey Kraposhin
Join Date: Mar 2009
Location: Moscow, Russian Federation
Posts: 355
Rep Power: 21
mkraposhin is on a distinguished road
Hello, when you use pimpleFoam, you have to specify value of density in the dictionary where other properties of the acoustic analogy are given:


Code:
rho rhoInf; //indicates that you must use constant value for density

rhoInf 1; //value of density
Placing "rho" in the 0/ directory does nothing, because this field is not created in pimpleFoam solver.
lpz456 and thanat like this.
mkraposhin is offline   Reply With Quote

Old   October 9, 2020, 15:00
Default
  #9
New Member
 
Tommy
Join Date: May 2020
Location: United States
Posts: 6
Rep Power: 6
Tj_m3 is on a distinguished road
Quote:
Originally Posted by mkraposhin View Post
Hello, when you use pimpleFoam, you have to specify value of density in the dictionary where other properties of the acoustic analogy are given:


Code:
rho rhoInf; //indicates that you must use constant value for density

rhoInf 1; //value of density
Placing "rho" in the 0/ directory does nothing, because this field is not created in pimpleFoam solver.
Got it! thanks a lot for the quick reply

-Tommy
Tj_m3 is offline   Reply With Quote

Old   November 9, 2020, 16:00
Default
  #10
New Member
 
Tommy
Join Date: May 2020
Location: United States
Posts: 6
Rep Power: 6
Tj_m3 is on a distinguished road
Quote:
Originally Posted by mkraposhin View Post
Hello, when you use pimpleFoam, you have to specify value of density in the dictionary where other properties of the acoustic analogy are given:


Code:
rho rhoInf; //indicates that you must use constant value for density

rhoInf 1; //value of density
Placing "rho" in the 0/ directory does nothing, because this field is not created in pimpleFoam solver.
Hi Matvey,

I had a few more quick questions if you don't mind:

1) Is there a way to run libAcoustics after a finished run, i.e. if the pressure on the FWH surface has been stored. I am running relatively large LES cases and was hoping I could run the FWH on the stored data.

2) How does the value of dRef scale pFluct for a 3D simulation/what should this be set at for a 3D sim? It seems like it is scaling the output of as 1/dRef^2.

I have dRef=1 but am off by a scale factor when validating against an experiment with a different span length. My SPL spectrum is suspiciously off by a factor of 10*log(span), but this could very well be another error in the scaling somewhere which I am chasing down


thanks again
Tommy
Tj_m3 is offline   Reply With Quote

Old   November 10, 2020, 10:41
Default
  #11
Senior Member
 
mkraposhin's Avatar
 
Matvey Kraposhin
Join Date: Mar 2009
Location: Moscow, Russian Federation
Posts: 355
Rep Power: 21
mkraposhin is on a distinguished road
Quote:
Originally Posted by Tj_m3 View Post
Hi Matvey,

I had a few more quick questions if you don't mind:

1) Is there a way to run libAcoustics after a finished run, i.e. if the pressure on the FWH surface has been stored. I am running relatively large LES cases and was hoping I could run the FWH on the stored data.

2) How does the value of dRef scale pFluct for a 3D simulation/what should this be set at for a 3D sim? It seems like it is scaling the output of as 1/dRef^2.

I have dRef=1 but am off by a scale factor when validating against an experiment with a different span length. My SPL spectrum is suspiciously off by a factor of 10*log(span), but this could very well be another error in the scaling somewhere which I am chasing down


thanks again
Tommy

Hi,



1) we have this in plans, we still don't have enough time for the implementation
2) dRef can be used only for 2D simulations -- it is and attempt to normalize results, obtained in 2D OpenFOAM simulations by the depth in empty direction. For 3D it must -1.
lpz456 likes this.
mkraposhin is offline   Reply With Quote

Old   January 27, 2021, 13:26
Default
  #12
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 zeinelserfy View Post
Hi all,

Have anyone used acoustic library developed by unicfdlab?
http://github.com/unicfdlab/libAcoustics

I want to use it for predicting the far-field noise for flow over aerofoil.I have also found the presentation for some tutorials for using it named ofwAcoustics.pdf
https://github.com/unicfdlab/Trainin...ustics-OFv1812

can anyone give some help concerning how to used and it capabilities?
just compile it and run the tutorials. I run the 3d monopole in openfoam 2, and the dipole3D in openfoam 4.
guanjiang.chen is offline   Reply With Quote

Old   February 21, 2021, 19:35
Default
  #13
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 mkraposhin View Post
Hi,



1) we have this in plans, we still don't have enough time for the implementation
2) dRef can be used only for 2D simulations -- it is and attempt to normalize results, obtained in 2D OpenFOAM simulations by the depth in empty direction. For 3D it must -1.
Hi Kraposhin,

I have a question. How do you produce triSurface for the FWH calculation? Which software is chosen? I use UG NX, but the trisurface is too coarse, having only few triangle surfaces.

Thanks,
Guanjiang
Jean Yue likes this.
guanjiang.chen is offline   Reply With Quote

Old   March 2, 2021, 16:33
Default Could anyone pls provide me a case of turbulence and laminar flow
  #14
New Member
 
thanat
Join Date: Mar 2021
Posts: 13
Rep Power: 5
thanat is on a distinguished road
Could anyone provide me a tutorial cases for turbulence and laminar flow through a rigid surface integrate with acoustic library. I use openFoam v2012. I spent so much time with it but still not used to it yet. So, I hope anyone can provide me some cases for me to learn about it more easier.
Thanks in advance
thanat is offline   Reply With Quote

Old   March 3, 2021, 10:34
Default
  #15
New Member
 
thanat
Join Date: Mar 2021
Posts: 13
Rep Power: 5
thanat is on a distinguished road
--> FOAM FATAL ERROR: (openfoam-2012)
Could not find rho:rho

From void Foam::functionObjects::forces::initialise()
in file forces/forces.C at line 235.

FOAM exiting






I have this issue when i used acoustic lib
Do you have any ideas about it `?
thanat is offline   Reply With Quote

Old   March 3, 2021, 14:27
Default
  #16
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 thanat View Post
--> FOAM FATAL ERROR: (openfoam-2012)
Could not find rho:rho

From void Foam::functionObjects::forces::initialise()
in file forces/forces.C at line 235.

FOAM exiting






I have this issue when i used acoustic lib
Do you have any ideas about it `?
rho rhoInf; //indicates that you must use constant value for density

rhoInf 1; //value of density

I think this can help. delete your rho in 0 and constant folder.
guanjiang.chen is offline   Reply With Quote

Old   March 8, 2021, 19:46
Default Flow past a cylinder
  #17
Member
 
Guanjiang Chen
Join Date: Apr 2020
Location: Bristol, United Kingdom
Posts: 54
Rep Power: 6
guanjiang.chen is on a distinguished road
Hi,

I am trying to use acoustic analogy methods to a LES case of flow past a cylinder. I have tried the curle and Farassate1A methods. The observers are set around the cylinder with a distance of 100D from the origin. For the results of curle, the frequency of the tonal peak seems right, but the results of farassat are totally different. I think there may be something wrong in my fwh set. What I think may have problems are interpolationScheme, nonUniformSurfaceMotion, responseDelay. Maybe my control surface is not good. Could anyone give me some suggestions?

[IMG]D:\case\transfer\openfoamonline\libacoustic\comput ational domain and control surface.tif[/IMG]

[IMG]D:\case\transfer\openfoamonline\libacoustic\curle vs farassat.tif[/IMG]

Code:
CurleAnalogy1
    {
	functionObjectLibs ("libAcoustics.so");
	
	type		Curle;
	
	log		true;
	
	order		second;

	probeFrequency	2;
	
	patches ("CYLINDER");
	
	interpolationScheme  cell;
	
	surfaces
        (                                                                    
                CYLINDER
        	{
                    type            patch;
                    patches         ("CYLINDER");
                    interpolate     false;
                }
	);
	
	timeStart	1.4;
	
	timeEnd		2;
	
	c0		340;
	
	dRef		-1;

	pInf		0.0;
	
	pName		p;
	
	rho		rhoInf;
	
	rhoInf		1.205;
	
	CofR (0 0 0);
	
	cleanFreq 100;

	writeFft true;

	observers
        {
        	R-1
		{
			position	(-2 0 0);
			pRef		2.0e-5;
			fftFreq		1024;
		}
		
		R-2
		{
			position	( -1.931852e+00  5.176381e-01  0 );
			pRef		2.0e-5;
			fftFreq		1024;
		}
		R-3
		{
			position	( -1.732051e+00  1  0 );
			pRef		2.0e-5;
			fftFreq		1024;
		}
		R-4
		{
			position	( -1.414214e+00  1.414214e+00  0 );
			pRef		2.0e-5;
			fftFreq		1024;
		}
		R-5
		{
			position	( -1  1.732051e+00  0 );
			pRef		2.0e-5;
			fftFreq		1024;
		}
		R-6
		{
			position	( -5.176381e-01  1.931852e+00  0 );
			pRef		2.0e-5;
			fftFreq		1024;
		}
		R-7
		{
			position	( -1.225150e-16  2  0 );
			pRef		2.0e-5;
			fftFreq		1024;
		}
		R-8
		{
			position	( 5.176381e-01  1.931852e+00  0 );
			pRef		2.0e-5;
			fftFreq		1024;
		}
		R-9
		{
			position	( 1  1.732051e+00  0 );
			pRef		2.0e-5;
			fftFreq		1024;
		}
		R-10
		{
			position	( 1.414214e+00  1.414214e+00  0 );
			pRef		2.0e-5;
			fftFreq		1024;
		}
		R-11
		{
			position	( 1.732051e+00  1  0 );
			pRef		2.0e-5;
			fftFreq		1024;
		}
		R-12
		{
			position	( 1.931852e+00  5.176381e-01  0 );
			pRef		2.0e-5;
			fftFreq		1024;
		}
		R-13
		{
			position	( 2  2.450300e-16  0 );
			pRef		2.0e-5;
			fftFreq		1024;
		}
	}
		
		
	}

	
    }
Code:
smallLEStrisurface_farassat
{        
	type		FfowcsWilliamsHawkings;

	functionObjectLibs ("libAcoustics.so");        

	log		true;
        
        probeFrequency	2;
        
        timeStart	1.4;//0.0001;
        
        timeEnd		2;
        
        c0		340;
        
        dRef		-1; //a coefficients for 2D case; set -1 for 3D cases
        
        pName		p;
        
        pInf		0;

        rho		rhoInf;
        
        rhoInf		1.205;
        
        CofR (0 0 0);
        
	writeFft	true;
        
        patches ("CYLINDER");

        interpolationScheme cell;//////
        
        surfaces
        (
                CYLINDER1
                {
                    type            sampledTriSurfaceMesh;
                    surface         smallLES_trisurface_refine2.stl;
                    source          cells;
                    interpolate     false;
                }
        );
        
        nonUniformSurfaceMotion false;////////
        U0		(7.572614108 0 0);
        Ufwh		(.0 .0 .0);
        
        cleanFreq 100;
        formulationType Farassat1AFormulation;
        fixedResponseDelay true;
        responseDelay   1e-3;/////////

	observers
        {
        	R-1
		{
			position	(-2 0 0);
			pRef		2.0e-5;
			fftFreq		1024;
		}
		
		R-2
		{
			position	( -1.931852e+00  5.176381e-01  0 );
			pRef		2.0e-5;
			fftFreq		1024;
		}
		R-3
		{
			position	( -1.732051e+00  1  0 );
			pRef		2.0e-5;
			fftFreq		1024;
		}
		R-4
		{
			position	( -1.414214e+00  1.414214e+00  0 );
			pRef		2.0e-5;
			fftFreq		1024;
		}
		R-5
		{
			position	( -1  1.732051e+00  0 );
			pRef		2.0e-5;
			fftFreq		1024;
		}
		R-6
		{
			position	( -5.176381e-01  1.931852e+00  0 );
			pRef		2.0e-5;
			fftFreq		1024;
		}
		R-7
		{
			position	( -1.225150e-16  2  0 );
			pRef		2.0e-5;
			fftFreq		1024;
		}
		R-8
		{
			position	( 5.176381e-01  1.931852e+00  0 );
			pRef		2.0e-5;
			fftFreq		1024;
		}
		R-9
		{
			position	( 1  1.732051e+00  0 );
			pRef		2.0e-5;
			fftFreq		1024;
		}
		R-10
		{
			position	( 1.414214e+00  1.414214e+00  0 );
			pRef		2.0e-5;
			fftFreq		1024;
		}
		R-11
		{
			position	( 1.732051e+00  1  0 );
			pRef		2.0e-5;
			fftFreq		1024;
		}
		R-12
		{
			position	( 1.931852e+00  5.176381e-01  0 );
			pRef		2.0e-5;
			fftFreq		1024;
		}
		R-13
		{
			position	( 2  2.450300e-16  0 );
			pRef		2.0e-5;
			fftFreq		1024;
		}
	}

}
guanjiang.chen is offline   Reply With Quote

Old   March 8, 2021, 19:56
Default
  #18
Member
 
Guanjiang Chen
Join Date: Apr 2020
Location: Bristol, United Kingdom
Posts: 54
Rep Power: 6
guanjiang.chen is on a distinguished road
These are attached files for my former message.
Attached Images
File Type: jpg curle vs farassat.jpg (95.4 KB, 143 views)
File Type: jpg computational domain and control surface.jpg (106.6 KB, 87 views)
Attached Files
File Type: txt fwhControl.txt (2.3 KB, 50 views)
File Type: txt curleControl.txt (1.8 KB, 34 views)
guanjiang.chen is offline   Reply With Quote

Old   March 9, 2021, 05:49
Default
  #19
New Member
 
thanat
Join Date: Mar 2021
Posts: 13
Rep Power: 5
thanat is on a distinguished road
Can you tell me how to plot SPL with the strouhal number. Is there any essential functions, which needs to declare in the system file ?. Also can i change the SPL data into frequency domain, If i can then which function need to be used in openfoam
thanat is offline   Reply With Quote

Old   March 9, 2021, 06:22
Default
  #20
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 thanat View Post
Can you tell me how to plot SPL with the strouhal number. Is there any essential functions, which needs to declare in the system file ?. Also can i change the SPL data into frequency domain, If i can then which function need to be used in openfoam
Hi thanat,

After simulation finished, you can find the result in the acousticData folder. For each observer, there is a file which has Freq, p', spl. just drawing it is OK. What makes me confused is that the spl in the file shows a symmetry distribution in the frequency range.

Regards,
Guanjiang
guanjiang.chen is offline   Reply With Quote

Reply

Tags
acoustics, libacoustics, openfoam


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
OpenFOAM v3.0.1 Training, London, Houston, Berlin, Jan-Mar 2016 cfd.direct OpenFOAM Announcements from Other Sources 0 January 5, 2016 04:18
Acoustic analysis using openfoam 1994bm OpenFOAM Running, Solving & CFD 0 February 15, 2015 03:36
acoustic pressure , velocity, etc. study using openfoam suniljain OpenFOAM 0 January 19, 2010 06:52
Modified OpenFOAM Forum Structure and New Mailing-List pete Site News & Announcements 0 June 29, 2009 06:56
OpenFOAM Debian packaging current status problems and TODOs oseen OpenFOAM Installation 9 August 26, 2007 14:50


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