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 Tree10Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 4, 2022, 17:36
Default
  #41
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 zhangmu View Post
Dear Guanjiang:

I am trying installing libacoustic in openfoam7 in Ubuntu, but after running ./wmakeAll.sh
it shows that

dell-123@Precision-7920-Tower:~/Downloads/libAcoustics-master/OpenFOAM-4.1$ ./wmakeAll.sh wmake libso . make: *** No rule to make target '/opt/openfoam7/src/OpenFOAM/lnInclude/Xfer.H', needed by 'Make/linux64GccDPInt32Opt/SoundObserver/SoundObserver.C.dep'. Stop. make: *** No rule to make target '/opt/openfoam7/src/OpenFOAM/lnInclude/Xfer.H', needed by 'Make/linux64GccDPInt32Opt/FileInterface/FileInterface.C.dep'. Stop.

After checking the directory /opt/openfoam7/src/OpenFOAM/lnInclude/, there is no file named Xfer.H, how do you solve this problem in of6?

Best regards
Mu
04.01.2022
Hi,

I made some changes in \Make\file and \Make\options, But I am not sure is that works in your case.

file is changed to :

SoundObserver/SoundObserver.C
FoamFourierAnalysis/FoamFftwDriver.C

/* Acoustic analogies */
analogies/AcousticAnalogy/AcousticAnalogy.C
analogies/Curle/Curle.C
analogies/FfowcsWilliamsHawkings/fwhFormulation.C
analogies/FfowcsWilliamsHawkings/Farassat1AFormulation.C
analogies/FfowcsWilliamsHawkings/GTFormulation.C
analogies/FfowcsWilliamsHawkings/FfowcsWilliamsHawkings.C

/* Coupling with BEM and FFT */

samplingBEM/sampledSurface/writers/gmsh/gmshSurfaceWriter.C
samplingBEM/soundPressureSampler/soundPressureSampler.C

LIB = $(FOAM_USER_LIBBIN)/libAcoustics

and options is changed to :
fftw_root=$(FOAM_USER_LIBBIN)/fftw-3.3.3

EXE_INC = \
-I$(LIB_SRC)/fileFormats/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/functionObjects/forces/lnInclude \
-I$(LIB_SRC)/surfMesh/lnInclude \
-I$(fftw_root)/include

LIB_LIBS = \
-lcompressibleTransportModels \
-lsampling \
-lturbulenceModels \
-lincompressibleTurbulenceModels \
-lcompressibleTurbulenceModels \
-lincompressibleTransportModels \
-lfluidThermophysicalModels \
-lspecie \
-lfileFormats \
-lfiniteVolume \
-lmeshTools \
-lforces \
-lsurfMesh \
-L$(fftw_root)/lib \
-lfftw3
guanjiang.chen is offline   Reply With Quote

Old   January 4, 2022, 17:56
Default
  #42
New Member
 
zhang runze
Join Date: Jan 2022
Posts: 4
Rep Power: 4
zhangmu is on a distinguished road
Quote:
Originally Posted by guanjiang.chen View Post
Hi,

I made some changes in \Make\file and \Make\options, But I am not sure is that works in your case.

file is changed to :

SoundObserver/SoundObserver.C
FoamFourierAnalysis/FoamFftwDriver.C

/* Acoustic analogies */
analogies/AcousticAnalogy/AcousticAnalogy.C
analogies/Curle/Curle.C
analogies/FfowcsWilliamsHawkings/fwhFormulation.C
analogies/FfowcsWilliamsHawkings/Farassat1AFormulation.C
analogies/FfowcsWilliamsHawkings/GTFormulation.C
analogies/FfowcsWilliamsHawkings/FfowcsWilliamsHawkings.C

/* Coupling with BEM and FFT */

samplingBEM/sampledSurface/writers/gmsh/gmshSurfaceWriter.C
samplingBEM/soundPressureSampler/soundPressureSampler.C

LIB = $(FOAM_USER_LIBBIN)/libAcoustics

and options is changed to :
fftw_root=$(FOAM_USER_LIBBIN)/fftw-3.3.3

EXE_INC = \
-I$(LIB_SRC)/fileFormats/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/functionObjects/forces/lnInclude \
-I$(LIB_SRC)/surfMesh/lnInclude \
-I$(fftw_root)/include

LIB_LIBS = \
-lcompressibleTransportModels \
-lsampling \
-lturbulenceModels \
-lincompressibleTurbulenceModels \
-lcompressibleTurbulenceModels \
-lincompressibleTransportModels \
-lfluidThermophysicalModels \
-lspecie \
-lfileFormats \
-lfiniteVolume \
-lmeshTools \
-lforces \
-lsurfMesh \
-L$(fftw_root)/lib \
-lfftw3
This is the original files in libAcoustics-master/OpenFOAM-4.1/lib/Make
I checked one by one but they are the same with your post, could you please tell me where did you modified?

file:
SoundObserver/SoundObserver.C
FoamFourierAnalysis/FoamFftwDriver.C

/* Acoustic analogies */
analogies/AcousticAnalogy/AcousticAnalogy.C
analogies/Curle/Curle.C
analogies/FfowcsWilliamsHawkings/fwhFormulation.C
analogies/FfowcsWilliamsHawkings/Farassat1AFormulation.C
analogies/FfowcsWilliamsHawkings/GTFormulation.C
analogies/FfowcsWilliamsHawkings/FfowcsWilliamsHawkings.C

/* Coupling with BEM and FFT */

samplingBEM/sampledSurface/writers/gmsh/gmshSurfaceWriter.C
samplingBEM/soundPressureSampler/soundPressureSampler.C

LIB = $(FOAM_USER_LIBBIN)/libAcoustics

options:
fftw_root=$(FOAM_USER_LIBBIN)/fftw-3.3.3

EXE_INC = \
-I$(LIB_SRC)/fileFormats/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/functionObjects/forces/lnInclude \
-I$(LIB_SRC)/surfMesh/lnInclude \
-I$(fftw_root)/include

LIB_LIBS = \
-lcompressibleTransportModels \
-lsampling \
-lturbulenceModels \
-lincompressibleTurbulenceModels \
-lcompressibleTurbulenceModels \
-lincompressibleTransportModels \
-lfluidThermophysicalModels \
-lspecie \
-lfileFormats \
-lfiniteVolume \
-lmeshTools \
-lforces \
-lsurfMesh \
-L$(fftw_root)/lib \
-lfftw3
zhangmu is offline   Reply With Quote

Old   January 4, 2022, 18:14
Default
  #43
Member
 
Guanjiang Chen
Join Date: Apr 2020
Location: Bristol, United Kingdom
Posts: 54
Rep Power: 6
guanjiang.chen is on a distinguished road
Sorry, I compiled version 2.3 and version 4 to Openfoam 6, and I forget which one I changed. I have attached them. If they don't work, maybe you can try to check your environment. I couldn't do this on a computer because it didn't have fftw-3.
Attached Files
File Type: zip make file.zip (1.7 KB, 9 views)
guanjiang.chen is offline   Reply With Quote

Old   May 1, 2022, 08:44
Default
  #44
Member
 
Join Date: Jun 2019
Posts: 41
Rep Power: 6
Voulet is on a distinguished road
the Xfer method have been removed by this commit :

https://github.com/OpenFOAM/OpenFOAM...1c806ff2dd24ea


faces.xfer() is now move(faces)
__________________
« Debugging is what CFD is about. 5 minutes to modify your code, 5 months to find why it does not work anymore. »
Voulet is offline   Reply With Quote

Old   August 15, 2022, 13:09
Default
  #45
Member
 
Join Date: May 2010
Posts: 69
Rep Power: 15
hewei is on a distinguished road
Quote:
Originally Posted by guanjiang.chen View Post
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
Hello guanjian,

I run the example of cylinder case in version v2112 , in the acousticData folder, there is only time, pressure fluctuation data on the overserved points. There is no Freq, and spl. Could you help me to figure out what is the problem? thanks!

hewei
hewei is offline   Reply With Quote

Old   November 26, 2022, 17:38
Default
  #46
Member
 
Guanjiang Chen
Join Date: Apr 2020
Location: Bristol, United Kingdom
Posts: 54
Rep Power: 6
guanjiang.chen is on a distinguished road
Hi,

This may be a modification of the new version. As you already have time and pressure fluctuations. You can calculate spl or PSD using matlab.
https://www.mathworks.com/matlabcent...vel-calculator

Regards,
Guanjiang
guanjiang.chen is offline   Reply With Quote

Old   November 28, 2022, 06:13
Default
  #47
Member
 
Join Date: May 2010
Posts: 69
Rep Power: 15
hewei is on a distinguished road
Hi Guanjiang,

I solved it by activating the "writeFfft"in commonSettings file. Either I can calculate spl equation using the p' value. Thank you very much!
regards,
W.
Quote:
Originally Posted by guanjiang.chen View Post
Hi,

This may be a modification of the new version. As you already have time and pressure fluctuations. You can calculate spl or PSD using matlab.
https://www.mathworks.com/matlabcent...vel-calculator

Regards,
Guanjiang
guanjiang.chen likes this.
hewei is offline   Reply With Quote

Old   September 29, 2023, 03:50
Default compile error libAcoustics
  #48
Member
 
Ervin Adorean
Join Date: Mar 2009
Posts: 76
Rep Power: 17
adorean is on a distinguished road
Hello,

I want to compile libAcoustics-digitef-dev-2112 on OpenFOAM-v2112.
I get error /usr/bin/ld cannot find -lrandomProcesses.

Can someone please help me out?

Thank you!

Ervin
adorean 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 03:18
Acoustic analysis using openfoam 1994bm OpenFOAM Running, Solving & CFD 0 February 15, 2015 02:36
acoustic pressure , velocity, etc. study using openfoam suniljain OpenFOAM 0 January 19, 2010 05:52
Modified OpenFOAM Forum Structure and New Mailing-List pete Site News & Announcements 0 June 29, 2009 05:56
OpenFOAM Debian packaging current status problems and TODOs oseen OpenFOAM Installation 9 August 26, 2007 13:50


All times are GMT -4. The time now is 14:34.