|
[Sponsors] |
unexpected call for rho in modified buoyantBoussinesqSimpleFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 13, 2012, 04:58 |
unexpected call for rho in modified buoyantBoussinesqSimpleFoam
|
#1 |
Senior Member
Roman Thiele
Join Date: Aug 2009
Location: Eindhoven, NL
Posts: 374
Rep Power: 20 |
Hej,
I have slightly modified buoyantBoussinesqSimpleFoam in order to implement a different way of calculating the temperature equation Therefore the main file looks like this now Code:
Info<< "\nStarting time loop\n" << endl; while (simple.loop()) { Info<< "Time = " << runTime.timeName() << nl << endl; // Pressure-velocity SIMPLE corrector { #include "UEqn.H" #include "AHFMEqn.H" // new #include "TEqn.H" #include "pEqn.H" } turbulence->correct(); runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" << " ClockTime = " << runTime.elapsedClockTime() << " s" << nl << endl; } Info<< "End\n" << endl; Code:
SIMPLE: convergence criteria field p_rgh tolerance 1e-08 field T tolerance 1e-06 field U tolerance 1e-06 Starting time loop Time = 1 DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 0.0281127014, No Iterations 1 DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 0.0281177952, No Iterations 1 DILUPBiCG: Solving for theta2, Initial residual = 0.999994784, Final residual = 0.0182097574, No Iterations 1 DILUPBiCG: Solving for T, Initial residual = 1, Final residual = 0.0280023891, No Iterations 1 do p_rghEqn setup --> FOAM FATAL ERROR: request for volScalarField rho from objectRegistry region0 failed available objects of type volScalarField are Code:
{ volScalarField rAU("rAU", 1.0/UEqn().A()); surfaceScalarField rAUf("(1|A(U))", fvc::interpolate(rAU)); U = rAU*UEqn().H(); UEqn.clear(); phi = fvc::interpolate(U) & mesh.Sf(); adjustPhi(phi, U, p_rgh); surfaceScalarField buoyancyPhi(rAUf*ghf*fvc::snGrad(rhok)*mesh.magSf()); phi -= buoyancyPhi; while (simple.correctNonOrthogonal()) { Info << "do p_rghEqn setup\n" << endl; // modification for debugging fvScalarMatrix p_rghEqn ( fvm::laplacian(rAUf, p_rgh) == fvc::div(phi) // here comes the error ); Info << "done p_rghEqn setup\n" << endl; // modification for debugging Does anybody know why and how the solver wants to look up rho?
__________________
~roman |
|
April 13, 2012, 17:47 |
|
#2 |
New Member
Nikhil
Join Date: Sep 2011
Posts: 11
Rep Power: 14 |
Hello Roman,
I am no expert in OpenFOAM and have not worked with "buoyantBoussinesqSimpleFoam" before, but I came across this error "request for volScalarField rho from objectRegistry region0 failed" when I modified interFoam to incorporate a new BC for dynamic contact angle. I don't know which part of the code is calling 'rho', but I guess because of your modifications it is being called and you don't have rho in the objectregistry. If that is the case all you need to do is add rho as volScalarField in createFields.H file. Since this is not a multi-phase flow rho is not a volScalarField, but it would be interesting to see if that will let your code overcome or figure out the source of this error. Hope this helps. Please let me know if this woks. Nikhil |
|
April 14, 2012, 08:32 |
solution found
|
#3 |
Senior Member
Roman Thiele
Join Date: Aug 2009
Location: Eindhoven, NL
Posts: 374
Rep Power: 20 |
Hej,
I found the solution. It has to do with the boundary condition for pressure. The pressure boundary condition buoyantPressure calls rho therefore the boundary condition has to be given with the correct call for rho as in Code:
wall { type buoyantPressure; rho rhok; }
__________________
~roman |
|
Tags |
heat flux model |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
compiling error(s) in a modified twoPhaseEulerFoam solver | foamer | OpenFOAM | 14 | June 20, 2014 08:51 |
2D CFD code using SIMPLE algorithm | bfan | Main CFD Forum | 3 | June 22, 2002 22:01 |
How to use q1 and ground file? | zheh | Phoenics | 5 | September 9, 2001 05:01 |
Open source CFD code development, possible? | Dr. Yazid Bindar | Main CFD Forum | 27 | July 18, 2000 00:18 |
Who's ok for an Open Source CFD project ? | Viet | Main CFD Forum | 16 | July 26, 1999 15:57 |