CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Bugs (https://www.cfd-online.com/Forums/openfoam-bugs/)
-   -   Minor bug in CrankNicholsonDdtScheme (https://www.cfd-online.com/Forums/openfoam-bugs/62585-minor-bug-cranknicholsonddtscheme.html)

henry May 8, 2007 09:07

Description: The second time-
 
Description:
The second time-step of a run using the CrankNicholsonDdtScheme is not exactly correct. The attached fix resolves this problem and improves the handling of restarts and supports the change from other schemes to the CrankNicholsonDdtScheme scheme during a run.

Solver/Application:
All using this second-order temporal derivative.

Source file:
OpenFOAM-1.4/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicholsonDdtScheme/CrankNicholsonDdtScheme.[HC]

Platform:
All.

Version:
1.4

Fix:
http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif CrankNicholsonDdtScheme.H
http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif CrankNicholsonDdtScheme.C

kumar May 15, 2007 05:00

Iam installing OpenFOAM SW on
 
Iam installing OpenFOAM SW on a 64bit AMD machine with 2 processors. I did all the steps suggested by Hrvoje Jasak and everything worked.
(I mean the only test cases). I must say that I have to add different PATH for LIBRARY definitions to get the libraries get linked.Iam installing the SW for a user. I must say that I have NOT yet compiled the program on my machine till now.Iam installing OpenFOAM-1.4 on my machine.I want to know is there any tests which I can do to test the installation of SW? I did the the following test from icoFoam directory:
blockMesh . cavity
icoFoam . cavity
Both worked without error.
I have another question regarding the startup of
FoamX command. When I start the script I get the following error:

$strace FoamX

+ jdkhome=/usr/java/jdk1.4
+ '[' '!' -z /home/l_kumar/OpenFOAM/linux64/j2sdk1.4.2_05 ']'
+ jdkhome=/home/l_kumar/OpenFOAM/linux64/j2sdk1.4.2_05
+ '[' -z /home/l_kumar/OpenFOAM/linux64/j2sdk1.4.2_05 ']'
+ '[' '!' -x /home/l_kumar/OpenFOAM/linux64/j2sdk1.4.2_05/bin/java ']'
+ '[' -z /home/l_kumar/OpenFOAM/jobControl ']'
+ '[' '!' -d /home/l_kumar/OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4/apps/FoamX ']'
+ '[' '!' -r /home/l_kumar/OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4/apps/FoamX/FoamXClient.cfg ']'
++ getValue /home/l_kumar/OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4/apps/FoamX/FoamXClient.cfg org.omg.CORBA.ORBInitialHost
+++ grep '^[ \t]*org.omg.CORBA.ORBInitialHost[ \t]*=' /home/l_kumar/OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4/apps/FoamX/FoamXClient.cfg
+++ sed -e 's/^[ \t]*org.omg.CORBA.ORBInitialHost[ \t]*=//'
+++ head -1
++ val=
++ '[' -z '' ']'
++ return 1
+ HOSTNAME=
+ '[' 1 -ne 0 ']'
++ uname -n
+ HOSTNAME=pc4989
++ getValue /home/l_kumar/OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4/apps/FoamX/FoamXClient.cfg org.omg.CORBA.ORBInitialPort
+++ grep '^[ \t]*org.omg.CORBA.ORBInitialPort[ \t]*=' /home/l_kumar/OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4/apps/FoamX/FoamXClient.cfg
+++ sed -e 's/^[ \t]*org.omg.CORBA.ORBInitialPort[ \t]*=//'
+++ head -1
++ val=
++ '[' -z '' ']'
++ return 1
+ HOSTPORT=
+ '[' 1 -ne 0 ']'
+ HOSTPORT=1234
+ argPort=
+ argHost=
+ args=
+ '[' '' ']'
+ XHB_PID=
+ trap cleanup 0 2 3 15
+ '[' '' -o '' ']'
+ '[' -r /home/l_kumar/OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4/apps/FoamX/ns.ref ']'
+ killFoamX
+ runFoamXHB
+ XHB_PID=2142
+ '[' 2142 ']'
+ '[' '!' -f /home/l_kumar/OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4/apps/FoamX/ns.ref ']'
+ sleep 1
Starting NameServer with inet:pc4989:1234 ...
nsd: error while loading shared libraries: libcrypto.so.0.9.7: cannot open shared object file: No such file or directory
+ '[' '!' -f /home/l_kumar/OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4/apps/FoamX/ns.ref ']'
+ sleep 1
+ '[' '!' -f /home/l_kumar/OpenFOAM/OpenFOAM-1.4/.OpenFOAM-1.4/apps/FoamX/ns.ref ']'
.
.
.

The above message repeats many times. I would like to know how I can overcome this error and what is the contents of the file "ns.ref". I donot have this file in the above directory.

I will appreciate very much your hrlp.

Regards,
Kumar

msrinath80 May 18, 2007 13:01

Hello Henry, If I'm only us
 
Hello Henry,

If I'm only using icoFoam and interFoam (both in parallel), is there any way I can avoid recompiling everything? What libraries do need to be recompiled after using your updated CrankNicholsonDdtScheme.* files.

Thanks!

henry May 18, 2007 14:35

All the ddt functions are run-
 
All the ddt functions are run-time selectable and hence built into the finiteVolume library so you only need to recompile that library.

Henry

cedric_duprat May 22, 2007 09:23

Hello Henry, I download your
 
Hello Henry,
I download your last version of CrankNicholsonDdtScheme.* and copy it in the folder:
OpenFOAM/OpenFOAM-1.3/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicholsonDdt Scheme/.
then I compiles with wmake in OpenFOAM/OpenFOAM-1.3/src/finiteVolume following your advices to pUI|
but, I have an error message :
" (...)
lnInclude/CrankNicholsonDdtScheme.C:120: error: 'const class Foam::Time' has no member named 'startTimeIndex'
lnInclude/CrankNicholsonDdtScheme.C:121: error: 'const class Foam::Time' has no member named 'startTimeIndex'
lnInclude/CrankNicholsonDdtScheme.C:131: error: 'store' is not a member of 'Foam::regIOobject'
lnInclude/CrankNicholsonDdtScheme.C:149: error: 'store' is not a member of 'Foam::regIOobject'
make: *** [Make/linuxGcc4DPOpt/pressureTransmissiveFvPatchScalarField.o] Error 1
"
I use OF v 1.3, is it the reason of the problem ?
or maybe I made something wrong ...
OUPS !! I've got a doubt now ... is your modifications only for v 1.4 of OF ?

Thanks

Cedric

henry May 22, 2007 11:52

Yes the modification is for Op
 
Yes the modification is for OpenFOAM-1.4


All times are GMT -4. The time now is 02:03.