|
[Sponsors] | |||||
Implement a non-orthogonal correction on the boundary snGrad |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|
|
#1 |
|
New Member
anonymous
Join Date: Aug 2019
Posts: 4
Rep Power: 8 ![]() |
Hi,
I’m a newbie to OpenFOAM, and have a problem with implementing a non-orthogonal correction on the boundary. The reason why I wanted to do so is this forum. (snGradCorrection) I tried to modify fixedValueFvPatchField.C and make fixedValue to override snGrad, but a lot of error occurred. I spent a lot of time on that, but I couldn’t solve it. (It should be involved to usage of member function.) Does anyone know a solution to this? I’m using OpenFOAM 6. Thanks in advance. |
|
|
|
|
|
|
|
|
#2 |
|
Senior Member
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 17 ![]() |
In my version of FOAM, the fvPatchField<Type> class defiens the snGrad member, which is virtual:
Code:
virtual tmp<Field<Type> > snGrad() const; |
|
|
|
|
|
|
|
|
#3 | ||
|
New Member
anonymous
Join Date: Aug 2019
Posts: 4
Rep Power: 8 ![]() |
Hello Santiago.
I'm very grateful for your fast response. Quote:
I copied “fixedValue” to my src directory ($WM_PROJECT_USER_DIR/src) and work there. Quote:
Actually, I had tried to revise fvPatchField (copied it to my own directory), but I couldn’t compile it. I replaced “fvPatchField” to “myFvPatchField” and implement non-orthogonal correction to snGrad() in myFvPatchField.C. (Because “calculatedFvPatchField.H” is included in fvPatchField.H, I added “myCalculated” (copied from “calculated” ).) Attached log is as shown in this. Code:
wmake libso .
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file myCalculatedmyFvPatchFields.C
Making dependency list for source file myFvPatchFields.C
g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3 -DNoRepository -ftemplate-depth-100 -I/work/opt/local/apps/gcc/4.8.5/impi/2019.4.243/openfoam/6/OpenFOAM-6/src/finiteVolume/lnInclude -IlnInclude -I. -I/work/opt/local/apps/gcc/4.8.5/impi/2019.4.243/openfoam/6/OpenFOAM-6/src/OpenFOAM/lnInclude -I/work/opt/local/apps/gcc/4.8.5/impi/2019.4.243/openfoam/6/OpenFOAM-6/src/OSspecific/POSIX/lnInclude -fPIC -c myFvPatchField_withCorrection_200927/myFvPatchFields.C -o Make/linux64GccDPInt32Opt/myFvPatchField_withCorrection_200927/myFvPatchFields.o
g++ -std=c++11 -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -Wno-attributes -O3 -DNoRepository -ftemplate-depth-100 -I/work/opt/local/apps/gcc/4.8.5/impi/2019.4.243/openfoam/6/OpenFOAM-6/src/finiteVolume/lnInclude -IlnInclude -I. -I/work/opt/local/apps/gcc/4.8.5/impi/2019.4.243/openfoam/6/OpenFOAM-6/src/OpenFOAM/lnInclude -I/work/opt/local/apps/gcc/4.8.5/impi/2019.4.243/openfoam/6/OpenFOAM-6/src/OSspecific/POSIX/lnInclude -fPIC -c myCalculated/myCalculatedmyFvPatchFields.C -o Make/linux64GccDPInt32Opt/myCalculated/myCalculatedmyFvPatchFields.o
In file included from /work/opt/local/apps/gcc/4.8.5/impi/2019.4.243/openfoam/6/OpenFOAM-6/src/OpenFOAM/lnInclude/typeInfo.H:57:0,
from /work/opt/local/apps/gcc/4.8.5/impi/2019.4.243/openfoam/6/OpenFOAM-6/src/OpenFOAM/lnInclude/token.H:46,
from /work/opt/local/apps/gcc/4.8.5/impi/2019.4.243/openfoam/6/OpenFOAM-6/src/OpenFOAM/lnInclude/UListIO.C:28,
from /work/opt/local/apps/gcc/4.8.5/impi/2019.4.243/openfoam/6/OpenFOAM-6/src/OpenFOAM/lnInclude/UList.C:233,
from /work/opt/local/apps/gcc/4.8.5/impi/2019.4.243/openfoam/6/OpenFOAM-6/src/OpenFOAM/lnInclude/UList.H:484,
from /work/opt/local/apps/gcc/4.8.5/impi/2019.4.243/openfoam/6/OpenFOAM-6/src/OpenFOAM/lnInclude/List.H:43,
from /work/opt/local/apps/gcc/4.8.5/impi/2019.4.243/openfoam/6/OpenFOAM-6/src/OpenFOAM/lnInclude/wordList.H:42,
from /work/opt/local/apps/gcc/4.8.5/impi/2019.4.243/openfoam/6/OpenFOAM-6/src/OpenFOAM/lnInclude/patchIdentifier.H:38,
from /work/opt/local/apps/gcc/4.8.5/impi/2019.4.243/openfoam/6/OpenFOAM-6/src/OpenFOAM/lnInclude/polyPatch.H:42,
from /work/opt/local/apps/gcc/4.8.5/impi/2019.4.243/openfoam/6/OpenFOAM-6/src/finiteVolume/lnInclude/fvPatch.H:39,
from lnInclude/myFvPatchField.H:47,
from myCalculated/myCalculatedmyFvPatchField.H:50,
from myCalculated/myCalculatedmyFvPatchFields.H:29,
from myCalculated/myCalculatedmyFvPatchFields.C:26:
/work/opt/local/apps/gcc/4.8.5/impi/2019.4.243/openfoam/6/OpenFOAM-6/src/OpenFOAM/lnInclude/className.H:99:5: error: expected constructor, destructor, or type conversion before ‘template’
template<> \
^
/work/opt/local/apps/gcc/4.8.5/impi/2019.4.243/openfoam/6/OpenFOAM-6/src/OpenFOAM/lnInclude/className.H:112:5: note: in expansion of macro ‘defineTemplateTypeNameWithName’
defineTemplateTypeNameWithName(Type, Type::typeName_())
^
/work/opt/local/apps/gcc/4.8.5/impi/2019.4.243/openfoam/6/OpenFOAM-6/src/OpenFOAM/lnInclude/className.H:135:5: note: in expansion of macro ‘defineNamedTemplateTypeName’
defineNamedTemplateTypeName(Type); \
^
lnInclude/myFvPatchField.H:674:5: note: in expansion of macro ‘defineNamedTemplateTypeNameAndDebug’
defineNamedTemplateTypeNameAndDebug \
^
/work/opt/local/apps/gcc/4.8.5/impi/2019.4.243/openfoam/6/OpenFOAM-6/src/OpenFOAM/lnInclude/fieldTypes.H:52:5: note: in expansion of macro ‘myMakeTemplatePatchTypeField’
Macro(vector, __VA_ARGS__) \
^
lnInclude/myFvPatchField.H:686:5: note: in expansion of macro ‘FOR_ALL_FIELD_TYPES’
FOR_ALL_FIELD_TYPES(myMakeTemplatePatchTypeField, type)
^
myCalculated/myCalculatedmyFvPatchFields.C:43:1: note: in expansion of macro ‘myMakePatchFields’
myMakePatchFields(myCalculated);
^
/work/opt/local/apps/gcc/4.8.5/impi/2019.4.243/openfoam/6/OpenFOAM-6/src/OpenFOAM/lnInclude/className.H:99:5: error: expected constructor, destructor, or type conversion before ‘template’
template<> \
^
/work/opt/local/apps/gcc/4.8.5/impi/2019.4.243/openfoam/6/OpenFOAM-6/src/OpenFOAM/lnInclude/className.H:112:5: note: in expansion of macro ‘defineTemplateTypeNameWithName’
defineTemplateTypeNameWithName(Type, Type::typeName_())
^
/work/opt/local/apps/gcc/4.8.5/impi/2019.4.243/openfoam/6/OpenFOAM-6/src/OpenFOAM/lnInclude/className.H:135:5: note: in expansion of macro ‘defineNamedTemplateTypeName’
defineNamedTemplateTypeName(Type); \
^
lnInclude/myFvPatchField.H:674:5: note: in expansion of macro ‘defineNamedTemplateTypeNameAndDebug’
defineNamedTemplateTypeNameAndDebug \
^
/work/opt/local/apps/gcc/4.8.5/impi/2019.4.243/openfoam/6/OpenFOAM-6/src/OpenFOAM/lnInclude/fieldTypes.H:53:5: note: in expansion of macro ‘myMakeTemplatePatchTypeField’
Macro(sphericalTensor, __VA_ARGS__) \
^
lnInclude/myFvPatchField.H:686:5: note: in expansion of macro ‘FOR_ALL_FIELD_TYPES’
FOR_ALL_FIELD_TYPES(myMakeTemplatePatchTypeField, type)
^
myCalculated/myCalculatedmyFvPatchFields.C:43:1: note: in expansion of macro ‘myMakePatchFields’
myMakePatchFields(myCalculated);
^
/work/opt/local/apps/gcc/4.8.5/impi/2019.4.243/openfoam/6/OpenFOAM-6/src/OpenFOAM/lnInclude/className.H:99:5: error: expected constructor, destructor, or type conversion before ‘template’
template<> \
^
/work/opt/local/apps/gcc/4.8.5/impi/2019.4.243/openfoam/6/OpenFOAM-6/src/OpenFOAM/lnInclude/className.H:112:5: note: in expansion of macro ‘defineTemplateTypeNameWithName’
defineTemplateTypeNameWithName(Type, Type::typeName_())
^
/work/opt/local/apps/gcc/4.8.5/impi/2019.4.243/openfoam/6/OpenFOAM-6/src/OpenFOAM/lnInclude/className.H:135:5: note: in expansion of macro ‘defineNamedTemplateTypeName’
defineNamedTemplateTypeName(Type); \
^
lnInclude/myFvPatchField.H:674:5: note: in expansion of macro ‘defineNamedTemplateTypeNameAndDebug’
defineNamedTemplateTypeNameAndDebug \
^
/work/opt/local/apps/gcc/4.8.5/impi/2019.4.243/openfoam/6/OpenFOAM-6/src/OpenFOAM/lnInclude/fieldTypes.H:54:5: note: in expansion of macro ‘myMakeTemplatePatchTypeField’
Macro(symmTensor, __VA_ARGS__) \
^
lnInclude/myFvPatchField.H:686:5: note: in expansion of macro ‘FOR_ALL_FIELD_TYPES’
FOR_ALL_FIELD_TYPES(myMakeTemplatePatchTypeField, type)
^
myCalculated/myCalculatedmyFvPatchFields.C:43:1: note: in expansion of macro ‘myMakePatchFields’
myMakePatchFields(myCalculated);
^
/work/opt/local/apps/gcc/4.8.5/impi/2019.4.243/openfoam/6/OpenFOAM-6/src/OpenFOAM/lnInclude/className.H:99:5: error: expected constructor, destructor, or type conversion before ‘template’
template<> \
^
/work/opt/local/apps/gcc/4.8.5/impi/2019.4.243/openfoam/6/OpenFOAM-6/src/OpenFOAM/lnInclude/className.H:112:5: note: in expansion of macro ‘defineTemplateTypeNameWithName’
defineTemplateTypeNameWithName(Type, Type::typeName_())
^
/work/opt/local/apps/gcc/4.8.5/impi/2019.4.243/openfoam/6/OpenFOAM-6/src/OpenFOAM/lnInclude/className.H:135:5: note: in expansion of macro ‘defineNamedTemplateTypeName’
defineNamedTemplateTypeName(Type); \
^
lnInclude/myFvPatchField.H:674:5: note: in expansion of macro ‘defineNamedTemplateTypeNameAndDebug’
defineNamedTemplateTypeNameAndDebug \
^
/work/opt/local/apps/gcc/4.8.5/impi/2019.4.243/openfoam/6/OpenFOAM-6/src/OpenFOAM/lnInclude/fieldTypes.H:55:5: note: in expansion of macro ‘myMakeTemplatePatchTypeField’
Macro(tensor, __VA_ARGS__)
^
lnInclude/myFvPatchField.H:686:5: note: in expansion of macro ‘FOR_ALL_FIELD_TYPES’
FOR_ALL_FIELD_TYPES(myMakeTemplatePatchTypeField, type)
^
myCalculated/myCalculatedmyFvPatchFields.C:43:1: note: in expansion of macro ‘myMakePatchFields’
myMakePatchFields(myCalculated);
^
myCalculated/myCalculatedmyFvPatchFields.C:43:32: error: expected constructor, destructor, or type conversion before ‘;’ token
myMakePatchFields(myCalculated);
^
make: *** [Make/linux64GccDPInt32Opt/myCalculated/myCalculatedmyFvPatchFields.o] Error 1
Thank you very much. |
|||
|
|
|
|||
|
|
|
#4 |
|
New Member
anonymous
Join Date: Aug 2019
Posts: 4
Rep Power: 8 ![]() |
Hi,
I’m terribly sorry, I failed to attach the files (revised library and log(compile error)) on my last post. Thanks in advance. |
|
|
|
|
|
![]() |
| Tags |
| boundary, fixedvalue, non-orthogonal correction, openfoam 6, sngrad |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| sliding mesh problem in CFX | Saima | CFX | 46 | September 11, 2021 08:38 |
| UDF for Automatic Solution Initialization for previous case data file | gartz89 | Fluent UDF and Scheme Programming | 6 | March 30, 2020 08:38 |
| Centrifugal fan | j0hnny | CFX | 13 | October 1, 2019 14:55 |
| Wrong flow in ratating domain problem | Sanyo | CFX | 17 | August 15, 2015 07:20 |
| New topic on same subject - Flow around race car | Tudor Miron | CFX | 15 | April 2, 2004 07:18 |