|
[Sponsors] |
November 26, 2015, 01:29 |
adding energy equation to interFoam
|
#1 |
Senior Member
Elham
Join Date: Oct 2009
Posts: 184
Rep Power: 16 |
Hi,
I am trying to add energy equation to interFoam. So I made a new library called myincompressibleTwoPhaseMixture and a solver called interTempFoam as suggested by http://www.wolfdynamics.com/images/c...erTempFoam.pdf. I could successfully compile the library in openFoam 2.3.0 but I cannot compile the solver. I got the following error: /usr/bin/ld: cannot find -lmyincompressibleTwoPhaseMixture collect2: error: ld returned 1 exit status make: *** [/home/elham/OpenFOAM/OpenFOAM-2.3.0/platforms/linux64GccDPOpt/bin/interTempFoam] Error 1 I have attached my library and solver. I will be really appreciate if anyone can give me clue. |
|
November 28, 2015, 09:15 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Quick answer:
|
|
November 28, 2015, 11:23 |
|
#3 |
Member
ali alkebsi
Join Date: Jan 2012
Location: Strasbourg, France
Posts: 82
Rep Power: 14 |
http://www.cfd-online.com/Forums/ope...interfoam.html
you can check the 6th and 7th discussion in this link where i explained what to add to the make file of your solver and modified library Last edited by kebsiali; November 28, 2015 at 12:24. Reason: adding info |
|
December 7, 2015, 08:30 |
|
#4 |
New Member
Perry Uhlig
Join Date: Oct 2015
Location: Germany
Posts: 13
Rep Power: 10 |
Hello,
you can have a look at my thread. I got interTempFoam compiled using OF 2.4.0. Unfortunately the new solver creates temperature fields that contain obvious mistakes. http://www.cfd-online.com/Forums/ope...m-2-4-0-a.html |
|
March 4, 2016, 11:44 |
error while compiling libaray
|
#5 |
New Member
Rimsha
Join Date: Jan 2016
Posts: 25
Rep Power: 10 |
Hi all,
nice to see so much discussion and support, I am trying to compile the lib after altering it using this guide to implement temperature equation in interFoam http://www.wolfdynamics.com/images/c...erTempFoam.pdf however I am unable to wmake my lib as it keeps giving me this error. This is what happens when i command wmake Code:
wmake libso >logs Make/options:7:12: warning: backslash-newline at end of file [enabled by default] LIB_LIBS = \ ^ wmakeLnInclude: linking include files to ./lnInclude Making dependency list for source file singlePhaseTransportModel/singlePhaseTransportModel.C Making dependency list for source file transportModel/transportModel.C Making dependency list for source file viscosityModels/HerschelBulkley/HerschelBulkley.C Making dependency list for source file viscosityModels/BirdCarreau/BirdCarreau.C Making dependency list for source file viscosityModels/CrossPowerLaw/CrossPowerLaw.C Making dependency list for source file viscosityModels/powerLaw/powerLaw.C Making dependency list for source file viscosityModels/Newtonian/Newtonian.C Making dependency list for source file viscosityModels/viscosityModel/viscosityModelNew.C Making dependency list for source file viscosityModels/viscosityModel/viscosityModel.C make: *** No rule to make target `Make/linux64GccDPInt32Opt/myIncompressibleTwoPhaseMixture/myIncompressibleTwoPhaseMixture.C.dep', needed by `Make/linux64GccDPInt32Opt/myIncompressibleTwoPhaseMixture/myIncompressibleTwoPhaseMixture.o'. Stop. Code:
viscosityModels/viscosityModel/viscosityModel.C viscosityModels/viscosityModel/viscosityModelNew.C viscosityModels/Newtonian/Newtonian.C viscosityModels/powerLaw/powerLaw.C viscosityModels/CrossPowerLaw/CrossPowerLaw.C viscosityModels/BirdCarreau/BirdCarreau.C viscosityModels/HerschelBulkley/HerschelBulkley.C transportModel/transportModel.C singlePhaseTransportModel/singlePhaseTransportModel.C myIncompressibleTwoPhaseMixture/myIncompressibleTwoPhaseMixture.C LIB = $(FOAM_USER_LIBBIN)/libmyIncompressibleTransportModels Code:
EXE_INC = \ -I.. \ -I../twoPhaseMixture/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude LIB_LIBS = \ -ltwoPhaseMixture \ -lfiniteVolume \ help will be much appreciated Thanks Rimsha Last edited by wyldckat; March 6, 2016 at 10:34. Reason: Added [CODE][/CODE] markers |
|
March 6, 2016, 16:17 |
|
#6 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Quick request @Rimsha: Please provide the source code package that you're using. I ask this because it will be a lot quicker to help you if you do this.
In addition, please keep in mind that you seem to be using OpenFOAM 3.0, which has some big differences from OpenFOAM 2.3.0, including in its build process.
__________________
|
|
March 6, 2016, 16:25 |
|
#7 | |
New Member
Rimsha
Join Date: Jan 2016
Posts: 25
Rep Power: 10 |
Quote:
Hiya, thank you very much for your reply, it is highly appreciated. May i know where i can find this source code, do you mean the lib code that i am trying to wmake? I am sorry if this sounds stupid but i am very new to this software. |
||
March 6, 2016, 16:32 |
|
#8 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Yes
Quick example, run the following command from within your source code folder: Code:
wclean all cd .. Code:
tar -czf the_package_name.tar.gz the_library_folder |
|
March 6, 2016, 16:35 |
|
#9 | |
New Member
Rimsha
Join Date: Jan 2016
Posts: 25
Rep Power: 10 |
Quote:
unfortunately i am not in the office at the moment however first thing tomorrow morning i will do that and attach the file. |
||
March 7, 2016, 16:20 |
|
#10 | |
New Member
Rimsha
Join Date: Jan 2016
Posts: 25
Rep Power: 10 |
Quote:
Hiya, I have attached the lib above. Basically I am trying to add temperature heat capacity to interFoam however there are two approaches one could take Method 1: before editing solver and adding the equation, I have to alter "incompressibletwophasemixture" file however instead of altering the file, i got an additional file called twoPhaseThermalMixture.C and H where new variable related to heat capacity (cp) Prandl number and diffusion coefficient (kappa in the file). This file is then linked to "incompressibletwophasemixture" file using the file in make folder and also in "incompressibletwophasemixture.C" it is included in the beginning. However with this approah I am getting error where nothing in C file of twoPhaseThermalMixture.C is being recognized when i wmake libso. i attach the log file log.txt Method 2 In second method I have followed this tutorial http://www.wolfdynamics.com/images/c...erTempFoam.pdf In this approach you can edit "incompressibletwophasemixture.C" and "incompressibletwophasemixture.H" to include all the new variables that are included in twoPhaseThermalMixture.C and twoPhaseThermalMixture.H in method 1. once that is done you can just make this library again however this also gives ridiculous errors therefore i am not sure what to do. Hope I was able to explain my problem well, I am extremely grateful for your effort to help me. My OpenFoam is 3.0.1 i am not sure if that is the case why this library alterations are not working. here are the files for 2nd approach and the log file is included incompressible_Ap2.tar.gz Rimsha |
||
March 28, 2016, 11:11 |
|
#11 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Hi Rimsha,
Sorry, but only today did I finally managed to take a look into your questions. Nonetheless, I've checked other posts you've made since then and it seems that you've already solved your problem? I'm referring to the posts you made in the following threads:
Bruno
__________________
|
|
January 29, 2017, 14:14 |
|
#12 | |
Senior Member
|
Quote:
Just try adding this code into your options file: Code:
-L$(FOAM_USER_LIBBIN) \
__________________
Learn OpenFOAM in Persian SFO (StarCCM+ FLUENT OpenFOAM) Project Team Member Complex Heat & Flow Simulation Research Group If you can't explain it simply, you don't understand it well enough. "Richard Feynman" |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Source Term due to evaporation in energy transport equation | styleworker | OpenFOAM Programming & Development | 3 | September 7, 2022 03:09 |
Adding Energy Equation for porousSimpleFoam | yesaswi92 | OpenFOAM Programming & Development | 20 | April 13, 2018 08:17 |
Definition of energy equation using UDF | aestas | Fluent UDF and Scheme Programming | 15 | April 28, 2015 03:33 |
Questions about the energy equation | aestas | Fluent UDF and Scheme Programming | 5 | April 6, 2014 11:28 |
SIMPLE and energy equation convergence | Fabio | Main CFD Forum | 0 | June 1, 2007 06:06 |