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

problems with surfaceScalaField

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 3, 2014, 15:14
Default problems with surfaceScalaField
  #1
Member
 
ziehjay
Join Date: Jul 2013
Posts: 45
Rep Power: 12
sanjar is on a distinguished road
Hello guys, i am working with DPMFoam based on the Goldschmidt Tutorial. Originally it has a manualInjection but i changed it into a patchInjetction.
After a few errors, which I was able to manage correctly I am realy fighting with the following problem:

Code:
--> FOAM FATAL ERROR: 

    request for surfaceScalarField phi from objectRegistry region0 failed
    available objects of type surfaceScalarField are

3
(
alphaPhic
phic
alphacf
)
Obwiously it is looking for this variable phi in surfaceScalarField.
Actually i dont know how to handle this problem. I tried to change it in my boundary conditions:

Code:
oundaryField
{
    WALL
    {
        type           zeroGradient;
    }
    OUTLET
    {
         type          totalPressure;
    p0        uniform 0;
    U        U;
    psi        none;
    gamma        1;
    phi        phi;
    value        uniform 0;
    }
    EROSIONPLATE
    {
        type            zeroGradient;
    }
    INLET
    {
        type           zeroGradient;
    }
}
sanjar is offline   Reply With Quote

Old   January 7, 2014, 14:42
Default
  #2
Member
 
ziehjay
Join Date: Jul 2013
Posts: 45
Rep Power: 12
sanjar is on a distinguished road
isn't there somebody who could help me...its a pretty serious issue..

thank you guys!
sanjar is offline   Reply With Quote

Old   January 8, 2014, 03:38
Default
  #3
Member
 
Kapa Lilla
Join Date: Mar 2009
Location: Bruxelles, Belgium
Posts: 57
Rep Power: 17
klilla is on a distinguished road
Dear Sanjar,

I do not know the solver you are using, but the error tells you what is the problem. It is looking for the flux field (phi) on the faces, called phi. Now, in your solver you do not have it, but only:

alphaPhic
phic
alphacf

by intuition, most probably phic is your flux, but that you know, I guess.

So what you need to do, instead of defining your flux as phi, change it to phic (or anything else your flux is defined as).

oundaryField
{
WALL
{
type zeroGradient;
}
OUTLET
{
type totalPressure;
p0 uniform 0;
U U;
psi none;
gamma 1;
phi phic;
value uniform 0;
}
EROSIONPLATE
{
type zeroGradient;
}
INLET
{
type zeroGradient;
}
}
I hope this is helping, best,
Lilla
klilla is offline   Reply With Quote

Old   January 8, 2014, 06:42
Default
  #4
Member
 
ziehjay
Join Date: Jul 2013
Posts: 45
Rep Power: 12
sanjar is on a distinguished road
Hey Lilla,

thank you very much for your response. I appreciate it very much.
To keep my answer short: I already changed my phi into phic and also into the other two types of my surfacescalarField.

But the error still exists. Thats why i am still on this post

Thank you at all!!!

Best regards, Sanjar
sanjar is offline   Reply With Quote

Old   January 8, 2014, 07:53
Default
  #5
Member
 
Kapa Lilla
Join Date: Mar 2009
Location: Bruxelles, Belgium
Posts: 57
Rep Power: 17
klilla is on a distinguished road
I see. I went to your solvers code, here you define the pressure earlier in the createField.H file than the phic. So you actually do not yet have phic, while you already want to use it for your BC on p. My idea, is that you need to move the definition of phic between Uc and p.

But this is just a suggestion to try.

Best,
Lilla
klilla is offline   Reply With Quote

Old   January 8, 2014, 08:02
Default
  #6
Member
 
ziehjay
Join Date: Jul 2013
Posts: 45
Rep Power: 12
sanjar is on a distinguished road
Hi Lilla,

thank you for that advice. Actually i dont know what you really mean with "moving". Which steps would you recommend?

BTW: During our conversation here i updated my OF 2.2.x and started again my case with the updated Goldschmidt-tutorial. But is still did not work. (If there is somebody who ha salso the same problem)

Best, Sanjar
sanjar is offline   Reply With Quote

Old   January 8, 2014, 08:07
Default
  #7
Member
 
Kapa Lilla
Join Date: Mar 2009
Location: Bruxelles, Belgium
Posts: 57
Rep Power: 17
klilla is on a distinguished road
Sorry, I was too short. So go to the source code of your solver and open the createFields.H file.

There you have the definition of Uc and p. After the p you have the definition of phic:


Info<< "Reading/calculating continuous-phase face flux field phic\n"
<< endl;


surfaceScalarField phic
(
IOobject
(
"phic",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
linearInterpolate(Uc) & mesh.Sf()
);

This is the part you need to cut and put between Uc and p definition.

Then save the file and re-compile the solver. I think it should be your problem.
Best,
Lilla
klilla is offline   Reply With Quote

Old   January 8, 2014, 10:26
Default
  #8
Member
 
ziehjay
Join Date: Jul 2013
Posts: 45
Rep Power: 12
sanjar is on a distinguished road
Is it that simple as it seems?
I cut and paste this between p and Uc in my boundary conditions.
But what to do with the values like :

IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE

How to handle these?
greetings sanjar
sanjar is offline   Reply With Quote

Old   January 13, 2014, 18:16
Default
  #9
Member
 
ziehjay
Join Date: Jul 2013
Posts: 45
Rep Power: 12
sanjar is on a distinguished road
hello guys, this is a kind of an update as for the ones who are also struggling wih the solver DPMFoam.

Actually i am not an expert but i am lucky that i get advice and help from Lilla, whose help and person i appreciate very much.

so this is the very first step t get a solution for this problem or at least an adviced path, which is basically an answr of Lilla, and which should be provide for the OF-community:

My problem doesnt come from my BC at all. The problem is mre cause by the naming of the variables as UC and phic. So the source code of the DPMFoam solver was analysed and there was that kind of error.

now i am trying to compile it with the following description by Liila:


"First of all, everything I refer to is starting from the DPMFoam directory.

In my company, we have a general installation, so I inserted the _USER_ tag in the ./Make/files file

"EXE=$(FOAM_USER_APPBIN)/DPMFoam"

The same applies to ./dragModels/Make/files

"EXE=$(FOAM_USER_LIBBIN)/libDPMDragModels"

This last line already tells that the dragmodels are a library to link and not a utility or solver. In order to compile it you have to use the:

"wmake libso"

command. Try to compile it.

Now that you have this library, you need to link in. Open the ./Make/options file. You need to add 2 lines. Now, I do not know what exactly, if you have your own compilation, just the way we work here:

"EXE_INC = \
...
-I./dragModels/lnInclude"

"EXE_LIBS = \
...
-L$(FOAM_USER_LIBBIN)"

with that you should be able to compile the solver, without problem."

If there is somebody who is working on DPMFoam too...maybe we can exhange information ...especially for the success of everybdy who is working on it.

Thank you guys, thank you Lilla!
sanjar is offline   Reply With Quote

Old   January 26, 2014, 13:59
Default
  #10
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings to all!

@sanjar: I was trying to reproduce the problem you had originally reported on this thread, but I don't have enough information to work with. I was doing this because creating a variant of the solver doesn't seem to me to be the best option, but only a workaround.

If possible, can you please provide information on the changes necessary on the tutorial case, so that I can test this as well and can ascertain if there is a bug in OpenFOAM's DPMFoam or not?
The simplest would be for you to:
  1. Change the tutorial "lagrangian/DPMFoam/Goldschmidt" according to what you've done for your case, which reproduces the same reported problem.
  2. Then run foamCleanTutorials inside the modified folder.
  3. Then compress the folder into zip or tar.gz.
  4. Then attach the compressed file on your next post.
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   January 27, 2014, 19:01
Default
  #11
Member
 
ziehjay
Join Date: Jul 2013
Posts: 45
Rep Power: 12
sanjar is on a distinguished road
hello bruno,

my file size exceeds the size in this forum.
can you give me your email adress. i will send it to you via email

I HAVE A BIG PROBLEM NOW!!!

after i executed the command foamCleanTutorials the terminal worked for a few minutes.i worked also in openfoam 2.2.0 and openfoam 2.2.2. which i had installed.
i was wondering about that and also worried. and my worries became true!!!!!!!

i executed another case with icoUnocupledKinematicPArcelFoam which is very important for me and which runs with openfoam2.2.2

after executing simpleFoam the terminal says:

Code:
sanjar@sanjar-Lenovo-U410:~/OpenFOAM/sanjar-2.2.0/run-1/SA/generic/Box_Turbulent_Stroemung$ simpleFoam
simpleFoam: error while loading shared libraries: libmpi.so.1: cannot open shared object file: No such file or directory
WTF???
nothing works anymore! and i need that for my thesis.

i know that i will have a sleepless night!! what should i do??

PLEASE HELP!!!!
sanjar is offline   Reply With Quote

Old   January 28, 2014, 03:31
Default
  #12
Member
 
chenxizhong
Join Date: Feb 2012
Posts: 30
Rep Power: 14
chenxizh is on a distinguished road
sanjar, the error tells you that something is wrong while loading the mpi library,
you may type :
which mpirun
to get if the mpi work well or not
if you used the openmpi in ThiryParty, you may need to go the Thirypary
dir and run ./Allwmake

Quote:
Originally Posted by sanjar View Post
hello bruno,

my file size exceeds the size in this forum.
can you give me your email adress. i will send it to you via email

I HAVE A BIG PROBLEM NOW!!!

after i executed the command foamCleanTutorials the terminal worked for a few minutes.i worked also in openfoam 2.2.0 and openfoam 2.2.2. which i had installed.
i was wondering about that and also worried. and my worries became true!!!!!!!

i executed another case with icoUnocupledKinematicPArcelFoam which is very important for me and which runs with openfoam2.2.2

after executing simpleFoam the terminal says:

Code:
sanjar@sanjar-Lenovo-U410:~/OpenFOAM/sanjar-2.2.0/run-1/SA/generic/Box_Turbulent_Stroemung$ simpleFoam
simpleFoam: error while loading shared libraries: libmpi.so.1: cannot open shared object file: No such file or directory
WTF???
nothing works anymore! and i need that for my thesis.

i know that i will have a sleepless night!! what should i do??

PLEASE HELP!!!!
chenxizh is offline   Reply With Quote

Old   January 28, 2014, 03:39
Default
  #13
Member
 
ziehjay
Join Date: Jul 2013
Posts: 45
Rep Power: 12
sanjar is on a distinguished road
everything is allright (again)

Last edited by sanjar; January 30, 2014 at 08:09.
sanjar is offline   Reply With Quote

Old   June 27, 2015, 13:57
Angry Again DPMFoam problem with RAS turbulence
  #14
Member
 
pici's Avatar
 
Pierluigi Cirrottola
Join Date: Jun 2013
Posts: 52
Rep Power: 12
pici is on a distinguished road
Hi to everybody.
The problem initially reported by sanjar is again back.
Attached I send my example case: the DPMFoam/Goldschmidt tutorial modified to run with RAS turbulence model. As you can see in attached log file, I'm still continuing to receive the same error:

Code:
--> FOAM FATAL ERROR: 
    request for surfaceScalarField phi from objectRegistry region0 failed
    available objects of type surfaceScalarField are
3
(
phi.air
alphaPhic
alphacf
)

    From function objectRegistry::lookupObject<Type>(const word&) const
    in file /home/openfoam/OpenFOAM/OpenFOAM-2.4.0/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 198.
I tried any kind of smart (and stupid) trick, but it doesn't work. I hope that it is only a mistake writing (U|k|epsilon|nut).air and p files on 0/ directory and/or fvshemes and fvsolution file in system/.

I'm using last openFOAM 2.4.0 release.
Thank a lot for any help
Piero
Attached Files
File Type: gz Goldschmidt_RAS.tar.gz (57.1 KB, 12 views)

Last edited by wyldckat; August 20, 2015 at 14:42. Reason: removed text formatting, the font was too large
pici is offline   Reply With Quote

Old   August 20, 2015, 15:07
Default
  #15
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings Piero,

Sorry for the late reply, but only today did I finally manage to look into this.

Attached is the package "Goldschmidt_RAS_24x.tar.gz" that has the case adjusted to work with OpenFOAM 2.4.x. Took me several minutes to fix through all of the missing details.

The only difference for it to work with 2.4.0 is in the file "constant/transportProperties", where there is a typo in the code, which requires this adjustment:
Code:
- continuousPhaseName air;
+ contiuousPhaseName  air;
Best regards,
Bruno
Attached Files
File Type: gz Goldschmidt_RAS_24x.tar.gz (55.0 KB, 19 views)
abdollahi likes this.
__________________
wyldckat is offline   Reply With Quote

Old   August 21, 2015, 06:09
Default
  #16
Member
 
pici's Avatar
 
Pierluigi Cirrottola
Join Date: Jun 2013
Posts: 52
Rep Power: 12
pici is on a distinguished road
Hi Bruno,
thank you very much for your suggestion. I'm just beginning a new job using oF 2.4.0 and it is a very useful hint .
It is very strange that it is possible to find this kind of error, but the code is made by 'humans', isn't?
Ciao
Piero
pici is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
[ICEM] Problems with coedge curves and surfaces tommymoose ANSYS Meshing & Geometry 6 December 1, 2020 11:12
[mesh manipulation] Problems with rotational cyclic boundaries TReviol OpenFOAM Meshing & Mesh Conversion 8 July 11, 2014 03:45
[ICEM] Flow channel meshing problems StefanG ANSYS Meshing & Geometry 19 May 15, 2012 06:44
Two-phase air water flow problems by activating Wall Lubrication Force challenger85 CFX 5 November 5, 2009 05:44
Help required to solve Hydraulic related problems aero CFX 0 October 30, 2006 11:00


All times are GMT -4. The time now is 04:32.