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

adding linearValveLayersFvMesh to library in OF1.7.1

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 4, 2011, 09:05
Default adding linearValveLayersFvMesh to library in OF1.7.1
  #1
New Member
 
Alexandre Deloffre
Join Date: Sep 2010
Posts: 2
Rep Power: 0
AlexDeloffre is on a distinguished road
Hi everyone, happy new year!

I am working with OpenFOAM 1.7.1 and I have noticed that the "topoChangerFvMesh" library does not include the "linearValveLayersFvMesh" model.
In src/topoChangerFvMesh/make/files several .C files are in comment:

topoChangerFvMesh/topoChangerFvMesh.C
rawTopoChangerFvMesh/rawTopoChangerFvMesh.C

/*
linearValveFvMesh/linearValveFvMesh.C
linearValveLayersFvMesh/linearValveLayersFvMesh.C
*/

movingConeTopoFvMesh/movingConeTopoFvMesh.C
/*
mixerFvMesh/mixerFvMesh.C
*/


LIB = $(FOAM_LIBBIN)/libtopoChangerFvMesh

Because I need this feature I have removed */ and recompiled the library using "wmake libso".
The "mixerFvMesh.C" was correctly added but "linearValveLayersFvMesh" and "linearValveFvMesh" were not added.
For "linearValveLayersFvMesh" I get the following error message:

wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file linearValveLayersFvMesh/linearValveLayersFvMesh.C
SOURCE=linearValveLayersFvMesh/linearValveLayersFvMesh.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/opt/openfoam171/src/finiteVolume/lnInclude -I/opt/openfoam171/src/dynamicFvMesh/lnInclude -I/opt/openfoam171/src/dynamicMesh/lnInclude -I/opt/openfoam171/src/meshTools/lnInclude -IlnInclude -I. -I/opt/openfoam171/src/OpenFOAM/lnInclude -I/opt/openfoam171/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/linearValveLayersFvMesh.o
linearValveLayersFvMesh/linearValveLayersFvMesh.C: In member function ‘void Foam::linearValveLayersFvMesh::addZonesAndModifier s()’:
linearValveLayersFvMesh/linearValveLayersFvMesh.C:207: error: ‘addTopologyModifiers’ was not declared in this scope
linearValveLayersFvMesh/linearValveLayersFvMesh.C: At global scope:
linearValveLayersFvMesh/linearValveLayersFvMesh.C:372: error: prototype for ‘void Foam::linearValveLayersFvMesh::update()’ does not match any in class ‘Foam::linearValveLayersFvMesh’
linearValveLayersFvMesh/linearValveLayersFvMesh.H:105: error: candidate is: virtual bool Foam::linearValveLayersFvMesh::update()
make: *** [Make/linuxGccDPOpt/linearValveLayersFvMesh.o] Erreur 1

According to my observation of the others .C and the log I have change "void" to "bool" line 372 of the .C and add "topoChanger_." in front of addTopologyModifiers(tm)".
The new errors appear:

Making dependency list for source file linearValveLayersFvMesh/linearValveLayersFvMesh.C
SOURCE=linearValveLayersFvMesh/linearValveLayersFvMesh.C ; g++ -m32 -Dlinux -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/opt/openfoam171/src/finiteVolume/lnInclude -I/opt/openfoam171/src/dynamicFvMesh/lnInclude -I/opt/openfoam171/src/dynamicMesh/lnInclude -I/opt/openfoam171/src/meshTools/lnInclude -IlnInclude -I. -I/opt/openfoam171/src/OpenFOAM/lnInclude -I/opt/openfoam171/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linuxGccDPOpt/linearValveLayersFvMesh.o
linearValveLayersFvMesh/linearValveLayersFvMesh.C: In member function ‘virtual bool Foam::linearValveLayersFvMesh::update()’:
linearValveLayersFvMesh/linearValveLayersFvMesh.C:381: error: ‘resetMorph’ was not declared in this scope
linearValveLayersFvMesh/linearValveLayersFvMesh.C:382: error: ‘setMorphTimeIndex’ was not declared in this scope
linearValveLayersFvMesh/linearValveLayersFvMesh.C:383: error: no matching function for call to ‘Foam::linearValveLayersFvMesh::updateMesh()’
/opt/openfoam171/src/finiteVolume/lnInclude/fvMesh.H:299: note: candidates are: virtual void Foam::fvMesh::updateMesh(const Foam::mapPolyMesh&)
linearValveLayersFvMesh/linearValveLayersFvMesh.C:394: error: ‘resetMorph’ was not declared in this scope
linearValveLayersFvMesh/linearValveLayersFvMesh.C:395: error: ‘setMorphTimeIndex’ was not declared in this scope
linearValveLayersFvMesh/linearValveLayersFvMesh.C:396: error: no matching function for call to ‘Foam::linearValveLayersFvMesh::updateMesh()’
/opt/openfoam171/src/finiteVolume/lnInclude/fvMesh.H:299: note: candidates are: virtual void Foam::fvMesh::updateMesh(const Foam::mapPolyMesh&)
linearValveLayersFvMesh/linearValveLayersFvMesh.C:398: error: ‘topoChangeMap’ was not declared in this scope
linearValveLayersFvMesh/linearValveLayersFvMesh.C:417: error: no matching function for call to ‘Foam::linearValveLayersFvMesh::updateMesh()’
/opt/openfoam171/src/finiteVolume/lnInclude/fvMesh.H:299: note: candidates are: virtual void Foam::fvMesh::updateMesh(const Foam::mapPolyMesh&)
linearValveLayersFvMesh/linearValveLayersFvMesh.C:424: warning: no return statement in function returning non-void
make: *** [Make/linuxGccDPOpt/linearValveLayersFvMesh.o] Erreur 1

There are three declaration problems:
resetMorph
setMorphTimeIndex
updateMesh
topoChangeMap
What is odd is that resetMorph and setMorphTimeIndex appear once again after the line 396 but only updateMesh is mentioned.
I have solved the last problem by adding a line I saw in the "mixerFvMesh.C" and above in linearValveLayersFvMesh.C:
autoPtr<mapPolyMesh> topoChangeMap = topoChanger_.changeMesh(true)
How could I solve those problem?
Thank you very much.

Here is the linearValveLayersFvMesh.C
AlexDeloffre is offline   Reply With Quote

Old   January 8, 2011, 08:12
Default
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
Basically, you need to switch to 1.6-ext: all if this is neither developed nor supported by OpenCFD and it is written by me.

If you try to retro-fit, you will hit the several hundred bug fixes that are missing as well.

Hope this helps,

Hrv

P.S. From what I hear, OpenCFD claim this is "future capability", presumably looking for people to pay them to take my code (available for free) and charge for it as a "development project". Hopefully Jenya Collins will log into the Forum and give us all a formal response.
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   January 8, 2011, 08:41
Default
  #3
Senior Member
 
Join Date: Oct 2009
Posts: 140
Rep Power: 17
Peter_600 is on a distinguished road
I was following this thread and think my question fits here.
Since you wrote the topochangerenginemesh class I refer to you (Mr. Jasak).
I would like to use the dieselEngineFoam solver with topochangerenginemesh capability. I wouldlike to use with this solver for instance the accordionenginemesh class for canted valves. How can I adpat it for 1.5-dev and 1.6-ext?
I appreciate your help.
Peter
Peter_600 is offline   Reply With Quote

Old   January 8, 2011, 08:51
Default
  #4
New Member
 
Alexandre Deloffre
Join Date: Sep 2010
Posts: 2
Rep Power: 0
AlexDeloffre is on a distinguished road
Thank you very much Hrv. In deed I was looking for your answer.
I am afraid I can't switch to the 1.6-ext before the end of my internship but you gave me enough informations to explain my problem.
Thank you.

P.S. I will wait for the answer of Jenya Collins.
AlexDeloffre is offline   Reply With Quote

Old   January 8, 2011, 11:09
Default
  #5
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
thanks.

This is what you do: you can easily port the top-level code, there is full compatibilty there. If you need an example, the closest code in 1.6-ext is engineDyMFoam. It *may* already do what you want. The credit for the solver goes to the Milan Boys - if you speak to Tommaso after giving it a try, he can point you in the right direction.

On my side, I promise to merge in the contributions from 1.7.1 asap. There is some Windows work cooking, but we are under control.

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   January 8, 2011, 14:50
Default
  #6
Senior Member
 
Join Date: Oct 2009
Posts: 140
Rep Power: 17
Peter_600 is on a distinguished road
Thank you very much. I will check the engineDyMFoam solver. Nevertheless, I noticed a problem with dieselFoam (OF-1.6-ext) I think you also contribute to this extend version. The tutorial aachenbomb doesn t run to the end. It crashes very early wit the error janaf temp out of range. This is weird. I really would like to use this solver, too. Do you know to whom I can refer for this problem. I think there is something particular wrong with this solver. Other people also noticed that.

Peter
Peter_600 is offline   Reply With Quote

Reply

Tags
linearvalvelayersfvmesh, resetmorph, setmorphtimeindex, topochangerfvmesh, updatemesh


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
problem loading UDF library in parallel cluster Veera Gutti FLUENT 8 July 26, 2016 08:24
Help with chtMultiRegionFoam jbvw96 OpenFOAM Running, Solving & CFD 2 December 26, 2010 18:16
OpenFOAM141dev linking error on IBM AIX 52 matthias OpenFOAM Installation 24 April 28, 2008 16:49
Help! I cann't make library Bowling FLUENT 5 May 12, 2004 05:56
Good library to solve huge linear system Ricardo Bonon Main CFD Forum 3 May 19, 2000 07:24


All times are GMT -4. The time now is 22:17.