|
[Sponsors] |
Need to integrate wallShearStress calculations into a solver |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 19, 2014, 10:49 |
Need to integrate wallShearStress calculations into a solver
|
#1 | |
Member
Fei Fan
Join Date: Jun 2013
Location: NanJing, China
Posts: 54
Rep Power: 12 |
Quote:
I want to calculated volScalarField Shildes with volVectorField wallShearStress. The expression is Shildes=mag(wallShearStress)/(rho*g). Code:
volScalarField rho ( "rho", 1000.0 ); volScalarField shileds ( IOobject ( "shileds", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::NO_WRITE ), mesh, mag(wallShearStress)/(rho*g) ); Code:
pimFoam.C:129:7: error: no matching function for call to ‘Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::GeometricField(const char [4], double)’ pimFoam.C:129:7: note: candidates are: In file included from /home/administrator/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/GeometricField.H:601:0, from /home/administrator/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/GeometricScalarField.H:38, from /home/administrator/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/GeometricFields.H:34, from /home/administrator/OpenFOAM/OpenFOAM-2.3.0/src/finiteVolume/lnInclude/volFields.H:37, from /home/administrator/OpenFOAM/OpenFOAM-2.3.0/src/finiteVolume/lnInclude/surfaceInterpolationScheme.C:30, from /home/administrator/OpenFOAM/OpenFOAM-2.3.0/src/finiteVolume/lnInclude/surfaceInterpolationScheme.H:234, Last edited by wyldckat; September 13, 2014 at 05:59. Reason: Added [CODE][/CODE] |
||
August 20, 2014, 05:38 |
|
#2 |
Member
Fei Fan
Join Date: Jun 2013
Location: NanJing, China
Posts: 54
Rep Power: 12 |
anyone can help me?
|
|
September 9, 2014, 08:32 |
|
#3 |
Member
Fei Fan
Join Date: Jun 2013
Location: NanJing, China
Posts: 54
Rep Power: 12 |
Hi, Bruno Santos: I wantto add the wallshearstress to pimpleFoam solver.the code is:
Code:
while (pimple.correct()) { #include "pEqn.H" } if (pimple.turbCorr()) { turbulence->correct(); } } Info<<"1 step"<<endl; autoPtr<incompressible::RASModel> model; Info<<"2 step"<<endl; const volSymmTensorField Reff(model->devReff()); Info<<"3 step"<<endl; // #include "createPhi.H" // autoPtr<incompressible::RASModel> model; // singlePhaseTransportModel laminarTransport(U, phi); // Info<<"3 step"<<endl; // autoPtr<incompressible::RASModel> model // ( // incompressible::RASModel::New(U, phi, laminarTransport) // ); label patchWallID=mesh.boundaryMesh().findPatchID("bottomWall"); volVectorField wallShearStress //定义剪切应力 ( IOobject ( "wallShearStress", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), mesh, dimensionedVector ( "wallShearStress", sqr(dimLength)/sqr(dimTime), vector::zero ) ); { wallShearStress.boundaryField()[patchWallID] = ( -mesh.Sf().boundaryField()[patchWallID] /mesh.magSf().boundaryField()[patchWallID] ) & Reff.boundaryField()[patchWallID]; } Code:
GAMG: Solving for p, Initial residual = 0.0390428, Final residual = 6.86508e-08, No Iterations 25 time step continuity errors : sum local = 1.61558e-07, global = -3.77072e-08, cumulative = -2.71215e-05 smoothSolver: Solving for epsilon, Initial residual = 0.187626, Final residual = 8.51315e-06, No Iterations 32 smoothSolver: Solving for k, Initial residual = 1, Final residual = 8.18223e-06, No Iterations 45 1 step 2 step --> FOAM FATAL ERROR: object of type N4Foam14incompressible8RASModelE is not allocated From function Foam::autoPtr<T>::operator->() in file /home/administrator/OpenFOAM/OpenFOAM-2.3.0/src/OpenFOAM/lnInclude/autoPtrI.H at line 176. FOAM aborting #0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::error::abort() at ??:? #2 at ??:? #3 at ??:? #4 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #5 at ??:? Aborted (core dumped) Last edited by wyldckat; September 13, 2014 at 06:01. Reason: Added [CODE][/CODE] |
|
September 13, 2014, 06:09 |
|
#4 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128 |
Hi Fei Fan,
I've moved your related posts above from the following threads:
OK, regarding the latest post, what is happening is simple:
Bruno
__________________
|
|
September 23, 2014, 05:54 |
|
#5 | |
Member
Fei Fan
Join Date: Jun 2013
Location: NanJing, China
Posts: 54
Rep Power: 12 |
Quote:
You are right, I have solved it. regards. |
||
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Unexplained Error during Solver Runs | cfb | CFX | 6 | November 9, 2012 15:42 |
Strange residuals of the Density Based Solver | Pat84 | FLUENT | 0 | October 22, 2012 15:59 |
Quarter Burner mesh with periosic condition | SamCanuck | FLUENT | 2 | August 31, 2011 11:34 |
Working directory via command line | Luiz | CFX | 4 | March 6, 2011 20:02 |
why the solver reject it? Anyone with experience? | bearcat | CFX | 6 | April 28, 2008 14:08 |