|
[Sponsors] |
October 5, 2013, 22:43 |
|
#21 | ||
Member
赵庆良
Join Date: Aug 2013
Posts: 56
Rep Power: 13 |
Dear dkxls:
Thank you for your previous replies! I think I still have to use "absoluteEnthalpy".I am new to OpenFOAM.I had a great progress by your help about my problem ,But if I would like to solve my problemcompletely, your help is necessary for me. According to your "myThermos.C",I add the following codes into "myThermos.C": Code:
makeReactionMixtureThermo ( psiThermo, psiReactionThermo, hePsiThermo, homogeneousMixture, gasHaThermoPhysics ); makeReactionMixtureThermo ( psiThermo, psiReactionThermo, hePsiThermo, inhomogeneousMixture, gasHaThermoPhysics ); makeReactionMixtureThermo ( psiThermo, psiReactionThermo, hePsiThermo, veryInhomogeneousMixture, gasHaThermoPhysics ); Quote:
thermoType { type hePsiThermo; mixture reactingMixture; transport sutherland; thermo janaf; energy absoluteEnthalpy; equationOfState perfectGas; specie specie; },so I add the codes: Code:
makeReactionMixtureThermo ( psiThermo, psiReactionThermo, hePsiThermo, reactingMixture, gasHaThermoPhysics ) Quote:
myThermo.zip |
|||
December 9, 2013, 13:26 |
|
#22 | ||
New Member
Bryan Schmidt
Join Date: Sep 2013
Posts: 18
Rep Power: 13 |
Quote:
I'm trying to create a thermo model that combines hConst thermodynamics with Sutherland transport for a multiComponentMixture. I edited a couple lines in the files you provided to do this, but when I try to wmake I get the following error: Quote:
Also I'm not clear how to link a solver against a new library, do you think you could give me a quick step-by-step? Thanks. -B |
|||
December 10, 2013, 04:23 |
|
#23 |
Senior Member
Armin
Join Date: Feb 2011
Location: Helsinki, Finland
Posts: 156
Rep Power: 19 |
Can you upload your modified version?
The error looks rather strange as a thermo shouldn't pull in any dependencies on AMI or the like. |
|
December 10, 2013, 04:28 |
|
#24 |
Senior Member
Armin
Join Date: Feb 2011
Location: Helsinki, Finland
Posts: 156
Rep Power: 19 |
I posted earlier some instructions on how to include a lib in a solver (or even a case):
http://www.cfd-online.com/Forums/ope...tml#post452252 http://www.cfd-online.com/Forums/ope...tml#post451937 |
|
December 10, 2013, 13:18 |
|
#25 |
New Member
Bryan Schmidt
Join Date: Sep 2013
Posts: 18
Rep Power: 13 |
Sure, I just changed a couple lines from the files you uploaded to reflect the model I want to use.
|
|
December 11, 2013, 05:28 |
|
#26 |
Senior Member
Armin
Join Date: Feb 2011
Location: Helsinki, Finland
Posts: 156
Rep Power: 19 |
I checked your code and it seems fine.
I also don't get any compilation error, it just compiles fine! Just to make sure: 1. You need OpenFOAM version 2.2.x 2. Compiling is done like this: Code:
cd path/to/myThermo wmake libso Code:
EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude \ -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ -I$(LIB_SRC)/ODE/lnInclude \ -I$(LIB_SRC)/combustionModels/lnInclude EXE_LIBS = \ -L$(FOAM_USER_LIBBIN) \ -lfiniteVolume \ -lfvOptions \ -lmeshTools \ -lsampling \ -lcompressibleTurbulenceModel \ -lcompressibleRASModels \ -lcompressibleLESModels \ -lreactionThermophysicalModels \ -lspecie \ -lfluidThermophysicalModels \ -lchemistryModel \ -lODE \ -lcombustionModels \ -lmyThermo |
|
December 11, 2013, 13:26 |
|
#27 |
New Member
Bryan Schmidt
Join Date: Sep 2013
Posts: 18
Rep Power: 13 |
Thanks, I'm still getting the same error. The full message looks like this:
Code:
~/OpenFOAM/bschmidt-2.2.0/src/thermoPhysicalModels/myThermo$ wmake libso wmakeLnInclude: linking include files to ./lnInclude Making dependency list for source file myThermos.C could not open file cyclicAMILduInterfaceField.H for source file myThermos.C could not open file cyclicAMILduInterface.H for source file myThermos.C could not open file cyclicAMIPolyPatch.H for source file myThermos.C SOURCE=myThermos.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam220/src/finiteVolume/lnInclude -I/opt/openfoam220/src/thermophysicalModels/basic/lnInclude -I/opt/openfoam220/src/thermophysicalModels/specie/lnInclude -I/opt/openfoam220/src/thermophysicalModels/reactionThermo/lnInclude -IlnInclude -I. -I/opt/openfoam220/src/OpenFOAM/lnInclude -I/opt/openfoam220/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/myThermos.o In file included from /opt/openfoam220/src/finiteVolume/lnInclude/jumpCyclicAMIFvPatchField.H:47:0, from /opt/openfoam220/src/finiteVolume/lnInclude/fixedJumpAMIFvPatchField.H:71, from /opt/openfoam220/src/finiteVolume/lnInclude/fixedJumpAMIFvPatchFields.H:29, from /opt/openfoam220/src/thermophysicalModels/basic/lnInclude/heThermo.C:32, from /opt/openfoam220/src/thermophysicalModels/basic/lnInclude/heThermo.H:320, from /opt/openfoam220/src/thermophysicalModels/basic/lnInclude/hePsiThermo.H:39, from myThermos.C:30: /opt/openfoam220/src/finiteVolume/lnInclude/cyclicAMIFvPatchField.H:62:40: fatal error: cyclicAMILduInterfaceField.H: No such file or directory compilation terminated. make: *** [Make/linux64GccDPOpt/myThermos.o] Error 1 |
|
December 11, 2013, 14:39 |
|
#28 |
Senior Member
Armin
Join Date: Feb 2011
Location: Helsinki, Finland
Posts: 156
Rep Power: 19 |
OK, sounds a bit strange. I doubt that it has something to do with the OF version (I never used 2.2.0 though, I upgraded directly from 2.0.x to a 2.2.x git version newer than 2.2.1).
Are these files (cyclicAMILduInterfaceField.H, ...) listed in your myThermos.dep file? In mine they are not, actually there is no *AMI*.H file at all in my myThermos.dep. Just to make sure: You ran 'wclean' in the 'myThermo' directory? And there is no old 'myThermos.dep' left? (You can savely remove the *.dep files, wmake will generate new ones.) Otherwise, I have no idea since I cannot reproduce your error. |
|
December 11, 2013, 14:58 |
|
#29 |
New Member
Bryan Schmidt
Join Date: Sep 2013
Posts: 18
Rep Power: 13 |
Those files are not in my dependency file, and I always run wclean before wmake. The only *AMI* files in myThermos.dep are *AMIFvPatch* files. I was trying to trace back from the error message what line of code was calling for this *AMILdu* file, but I can't find it.
Maybe you can help me with this: why does the Make/options file need to include a link to the $LIB_SRC/finiteVolume/lnInclude folder? I can't find anything in the .C file or .H file that link to anything there. Maybe that will help me find where the erroneous call to *AMILdu* is being made. |
|
December 11, 2013, 17:10 |
|
#30 |
Senior Member
Armin
Join Date: Feb 2011
Location: Helsinki, Finland
Posts: 156
Rep Power: 19 |
The files you include in your lib will include themselves new dependencies and you need to tell the compiler where to find them.
Something you could try is to change the options file to match the one in the thermo library: https://github.com/OpenFOAM/OpenFOAM...o/Make/options |
|
December 11, 2013, 17:44 |
|
#31 |
New Member
Bryan Schmidt
Join Date: Sep 2013
Posts: 18
Rep Power: 13 |
Ha! That worked! I only had to include one more line in the file,
Code:
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude |
|
July 25, 2017, 03:29 |
|
#32 |
New Member
Join Date: Jan 2016
Posts: 15
Rep Power: 10 |
Hi dkxls,
Have you shared your code to calculate the mixture viscosity and conductivity to public. "For mixture I use the formulations due to Wilke (viscosity) and Mathur (conductivity)" If you can share the code with me, it will be very helpful. And many thanks in advance. Zhong |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] Multi species mass transport library [update] | novyno | OpenFOAM Community Contributions | 111 | November 10, 2021 00:37 |
flow solver won't recognize custom library | hakonbar | OpenFOAM Programming & Development | 2 | April 7, 2014 09:09 |
Compiled library vs. inInclude Files, DSMC solver crashes after run | GPesch | OpenFOAM Programming & Development | 8 | April 18, 2013 08:17 |
defining custom convetive terms | CFD user | CFX | 1 | February 22, 2009 23:40 |
OpenFOAM141dev linking error on IBM AIX 52 | matthias | OpenFOAM Installation | 24 | April 28, 2008 16:49 |