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

Problem with a new solver

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 26, 2004, 12:33
Default Hello all. I have created a n
  #1
Constantinos Zervides (Zervides)
Guest
 
Posts: n/a
Hello all. I have created a new solver and i wanted to compile it. Everything was done based on the instractions of the user guide. I managed to reach the point where i had to link the new user defined libraries to excisting applications. I have done everything as it says in the user guide page U-80 but when i run wmake libso in the /home/foam/user2.2/applications/foamUser directory i get the following:
/home/mpp03cz/foam/foam2.2/wmake/wmakeLnInclude: linking include files to /home/mpp03cz/foam/mpp03cz2.2/applications/src/foamUser/lnInclude

Making dependency list for source file libfoamUser.C
libso
SOURCE_DIR=.
SOURCE=libfoamUser.C ; g++ -Dlinux -DlinuxGcc3OptLAM -DscalarMachine -DoptSolvers -DUSEMPI -Wall -O2 -DNoRepository -ftemplate-depth-30 -I/home/mpp03cz/foam/foam2.2/src/foam/lnInclude -IlnInclude -I. -I/home/mpp03cz/foam/foam2.2/src/lam-6.5.9/platforms/linuxGcc3OptLAM/include -I/usr/X11/include -DWM_PROJECT_VERSION='"'2.2'"' -fPIC -c $SOURCE -o Make/linuxGcc3OptLAM/libfoamUser.o
/home/mpp03cz/foam/foam2.2/wmake/bashScripts/mkObjectDir /home/mpp03cz/foam/mpp03cz2.2/lib/linuxGcc3OptLAM/libfoamUser
rm -f so_locations
cd Make/linuxGcc3OptLAM ; \
g++ -Dlinux -DlinuxGcc3OptLAM -DscalarMachine -DoptSolvers -DUSEMPI -Wall -O2 -DNoRepository -ftemplate-depth-30 -I/home/mpp03cz/foam/foam2.2/src/foam/lnInclude -IlnInclude -I. -I/home/mpp03cz/foam/foam2.2/src/lam-6.5.9/platforms/linuxGcc3OptLAM/include -I/usr/X11/include -DWM_PROJECT_VERSION='"'2.2'"' -fPIC -shared libfoamUser.o -L/home/mpp03cz/foam/foam2.2/lib/linuxGcc3OptLAM -l... -lnew -lisoLESmodels -lLESfilters -lincompressibleTransportModels -lcfdTools -lstressedFoam -lcellDecompFiniteElement -lfemStress -lcontinuumFoam -lvelocityStresedFoam -o /home/mpp03cz/foam/mpp03cz2.2/lib/linuxGcc3OptLAM/libfoamUser.so
/usr/bin/ld: cannot find -lcontinuumFoam
collect2: ld returned 1 exit status
make: *** [/home/mpp03cz/foam/mpp03cz2.2/lib/linuxGcc3OptLAM/libfoamUser.so] Error 1

What did i do wrong and how do i correct it?
  Reply With Quote

Old   May 26, 2004, 12:50
Default The only library search path
  #2
Mattijs Janssens (Mattijs)
Guest
 
Posts: n/a
The only library search path ('-L') I see in your output is:

/home/mpp03cz/foam/foam2.2/lib/linuxGcc3OptLAM

so there is no libcontinuumFoam.so in there?

When you made your libcontinuumFoam.so where did it go to?

Mattijs
  Reply With Quote

Old   May 26, 2004, 16:59
Default The libcontinuumFoam.so can b
  #3
Constantinos Zervides (Zervides)
Guest
 
Posts: n/a
The libcontinuumFoam.so can be found under:
/home/mpp03cz/foam/mpp03cz2.2/lib/linuxGcc30ptLAM

Costas
  Reply With Quote

Old   May 27, 2004, 04:06
Default You need to add to LIB_LIBS i
  #4
Chris Greenshields (Chris)
Guest
 
Posts: n/a
You need to add to LIB_LIBS in your foamUser/Make/files file:
-L$(FOAM_USER_LIBBIN)

in order to direct the compiler to the directory where your continuumFoam library is.

Make sure you include appropriate backslashes (\) for line continuations (as you can see in the files file)
  Reply With Quote

Old   May 27, 2004, 05:20
Default Dear Chris Thank yo
  #5
Constantinos Zervides (Zervides)
Guest
 
Posts: n/a
Dear Chris
Thank you very much for your help. What i did was to include the -L$(FOAM_USER_LIBBIN) in the foamUser/Make/options file and that solved the problem.

Costas
  Reply With Quote

Old   September 3, 2004, 06:41
Default Hello Mark, about your ico
  #6
Mattijs Janssens (Mattijs)
Guest
 
Posts: n/a
Hello Mark,

about your icoFoam extension:

> Can I just confirm that the correct place is in this part of the code?
> fvVectorMatrix UEqn
> (
> fvm::ddt(U)
> + fvm::div(phi, U)
> - fvm::laplacian((Ns/rho), U)
> - fvc::div(sigma/rho)
> );
Correct - this will include your sigma term into the discretised momentum equation (split into A() and H() and the pressure solver step will use those)


> The other problem that I would appreciate your advice on is that the case I am
> investigating is at low Reynolds numbers. So I again have to lower the time
> step. At the moment it is taking a very long time to solve for a small
> geometry with a course mesh. Any suggestions?

icoFoam does a momentum predictor step. This is an explicit calculation of new velocities based on existing pressure. (line 58 in Foam2.3 icoFoam.C) For your case which is likely to be dominated by viscous effects/your source term rather than convection you are probably better off not doing this predictor step.

Mattijs
  Reply With Quote

Old   September 3, 2004, 07:29
Default Mattijs, I am using icoFoa
  #7
Mark Beard (Beard)
Guest
 
Posts: n/a
Mattijs,

I am using icoFoam2.2 and I am unsure which line you are referring to. Can I just check that by removing this line I can decrease the solve time by eliminating a calculation that is unnecessary for my problem due to the large viscous forces?

Also, is there any benefit in changing the number of nCorrectors in the PISO loop?

Thanks,
Mark
  Reply With Quote

Old   September 3, 2004, 07:44
Default The velocity gets updated in
  #8
Mattijs Janssens (Mattijs)
Guest
 
Posts: n/a
The velocity gets updated in

solve(UEqn == -fvc::grad(p));

which will solve the discretised momentum equation with explicit pressure driving force and update the velocity. This is the line you could try commenting out.

There might be a benefit in changing (probably increasing) the number of piso correctors for suc a low Re case. You might want to try going up to 5 - 10 but it is impossible to tell beforehand.

Mattijs
  Reply With Quote

Old   September 6, 2004, 15:13
Default Hi Mattijs, You mentioned
  #9
Mark Beard (Beard)
Guest
 
Posts: n/a
Hi Mattijs,

You mentioned I might suffer from staggering and would be better off evaluating sigma on the face of each cell. What would be the best way to achieve this?

Would altering the fvScheme used to solve for sigma help in anyway?

Thanks again for your help with this.

Mark
  Reply With Quote

Old   September 7, 2004, 04:42
Default Hi Mark, sigma is presumab
  #10
Mattijs Janssens (Mattijs)
Guest
 
Posts: n/a
Hi Mark,

sigma is presumably from velocity gradients?
- the velocity gradient gets calculated from the neighbouring cell values.
- so when you do a div of the sigma (which will interpolate cell sigma to the faces) you end up using information from neighbours of neighbours.

This usually means that a variation (in velocity) of +-+-+ over the five cells of your stencil will not be 'seen' (i.e. the div(sigma) will not see a difference between above and a uniform distribution)

Changing the fvScheme will not help since they don't have an overview of what is happening on your stencil. They operate on the (two neighbouring cells of a) face only.

Mattijs
  Reply With Quote

Old   September 7, 2004, 05:08
Default Mattijs, Thanks for the ex
  #11
Mark Beard (Beard)
Guest
 
Posts: n/a
Mattijs,

Thanks for the explanation and you are correct in thinking sigma is calculated from the velocity gradients. However, I am not sure how to correct this problem. How can I interpolate sigma to the cell faces based upon its immediate neighbours?

Mark
  Reply With Quote

Old   September 7, 2004, 05:23
Default Hi Mark, this is getting a
  #12
Mattijs Janssens (Mattijs)
Guest
 
Posts: n/a
Hi Mark,

this is getting a bit technical. You might want to get Gavin involved. I hear this is similar to the way Reynolds stresses are handled and he certainly has more experience than me in this field.

Mattijs
  Reply With Quote

Old   May 13, 2005, 11:10
Default hi, in icoFoam , the equati
  #13
chafi_fatima_zohra
Guest
 
Posts: n/a
hi,

in icoFoam , the equation is set:
solve(UEqn == -fvc::grad(p));
then , we obtain a velocity field in X direcion "u", in Y direction "v" and in Z dirction "w".
in this case u, v and w depends on grad p.

I want to modify the velovity equation only in the direction of Z and I want to obtain this:
in the direction of X etY, u and v dependent of grad p.
but in the direction of Z, w depend of grad p and another term which I want to add. how to solve this system of equation?

can you help me
  Reply With Quote

Old   June 7, 2005, 10:50
Default hi all, i have created a ne
  #14
chris10
Guest
 
Posts: n/a
hi all,

i have created a new solver and i have compiled it successfully, but when i tried to calculate an example i get the following errors:


free(): invalid pointer 0x80b7400!
free(): invalid pointer 0x80b9d78!
free(): invalid pointer 0x80bcb30!
free(): invalid pointer 0x80be000!
free(): invalid pointer 0x80ba2b8!
free(): invalid pointer 0x80b9a38!
free(): invalid pointer 0x80b9a78!
free(): invalid pointer 0x80bdaa8!
free(): invalid pointer 0x80bc590!
Segmentation fault
.

The adresses of the invalid pointers are always the same, so i think it is a static problem.

who can help me?
  Reply With Quote

Old   August 16, 2005, 12:28
Default Hi, Please help. I was tryi
  #15
New Member
 
Kanyanta Valentine
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 11
Rep Power: 17
valentine is on a distinguished road
Hi,

Please help. I was trying to compile a new solver, which I did. Most of it is built from icoFoam with only minor changes like incomparating mechanical properties and calculateStress.H. Am able to preprocess my case from FoamX and all my added fields are appearing and can be edited but when I try to run the case it hungs with this statement "Application started with pid 18933" or a different number would appear with my different attempts. I dont know where the problem is.

Best regards,

Valentine.
valentine is offline   Reply With Quote

Old   August 22, 2005, 09:26
Default What is the meaning of 'Ns' in
  #16
New Member
 
Kanyanta Valentine
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 11
Rep Power: 17
valentine is on a distinguished road
What is the meaning of 'Ns' in the numerical expression below

> fvVectorMatrix UEqn
> (
> fvm::ddt(U)
> + fvm::div(phi, U)
> - fvm::laplacian((Ns/rho), U)
> - fvc::div(sigma/rho)
> );
valentine is offline   Reply With Quote

Reply


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
Re:solver run problem krishna Siemens 2 December 14, 2008 04:42
CFX 11 Solver problem dak56 CFX 3 December 11, 2008 19:20
CFX-solver problem?? Jesper Sørensen CFX 10 November 23, 2006 23:17
Problem with CFX-5.5.1 solver Tuhin CFX 1 July 15, 2003 07:39
Problem Solver Rizk, Lisa Main CFD Forum 1 August 5, 1998 12:54


All times are GMT -4. The time now is 05:43.