CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

modeling a gate

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 21, 2003, 06:45
Default modeling a gate
  #1
Alex
Guest
 
Posts: n/a
Hi

I wish to model an opening gate (vertical) in a reservoir. Since sliding mesh capability of CFX4.4 (unmatched grid) cannot be used near the boundaries of the domain, I thought about using a porous media in the vincinity of the outlet, with porosity = 1 or 0.

How specifying a time dependant porosity, since usrpor is called only one time at the begining of the computation ?

Thanks

Alex

  Reply With Quote

Old   May 21, 2003, 19:42
Default Re: modeling a gate
  #2
Glenn Horrocks
Guest
 
Posts: n/a
Hi Alex,

I don't think using porous media is a good idea. In CFX4.4, you can change the boundary cell conditions (ie wall, inlet, outlet etc) on a restart. Using this feature you can model the opening gate by having the boundary fully closed, then restarting the simulation with the first cell made into a inlet/outlet, then restart with the second cell made into an inlet/outlet etc.

As this type of simulation requires many restarts, I recommend running it using a batch file (if you are on windows) or the equivalent in UNIX. It's a bit awkward, but it works OK. The only trick is that the values in the dummy nodes can diverge when changing the boundary condition type. If you get unexplained divergence I can show you how keep this under control.

Regards, Glenn Horrocks
  Reply With Quote

Old   May 22, 2003, 11:44
Default Re: modeling a gate
  #3
Alex
Guest
 
Posts: n/a
Hi Glenn,

Thank you for these advices. I've tried some "hand made" restarts : it works. But, I don't know how running it using a batch file (I am on windows).

Best regards,

Alex

  Reply With Quote

Old   May 22, 2003, 19:21
Default Re: modeling a gate
  #4
Glenn Horrocks
Guest
 
Posts: n/a
Hi Alex,

Below is the command line to run the CFX4 solver. (This is covered in the documentation somewhere, but I'll repeat it anyway). The -command option selects which command file to use. -release selects between single and double precision. -fort selects the user fortran file, -geom is the geometry file, -enviro is the number which will be given to the output and dump files, -dir is the temporary directory to use and -restart is the restart dump file to use. There are also a few other options, but these are the main ones.

runsolve4 -command m01.fc -release 4.3dp -fort ../m01.f -geom ../geo.32b -enviro 12 -dir ./.cfx_tmpdir -restart m11.dmp

Glenn
  Reply With Quote

Old   May 23, 2003, 09:45
Default Re: modeling a gate
  #5
Alex
Guest
 
Posts: n/a
Hi Glenn,

Thank you very much.

Regards,

Alex.
  Reply With Quote

Old   May 26, 2003, 07:01
Default Re: modeling a gate
  #6
Alex
Guest
 
Posts: n/a
Hi Glenn,

I am still having some problems.

The runsolve4 command does not work from a MSdos Windows. So the bath file I wrote "cfxrun.bat" (with a list of runsolve4 commands) becomes useless.

The only way for using cfx outside of its environment, is running a command prompt from the cfx-Launcher (Tools->Command Line). Within this Msdos-like windows, the runsolve4 command works. But since it is an emulated unix environment, the I can not execute the "cfxrun.bat" batch file. At this stage, my problem is that I can not automate restarts.

May be you have an idea ?

Thanks,

Fred

(Rq : On unix system, I only know how running batch jobs with the "qsub" command)

  Reply With Quote

Old   May 26, 2003, 11:43
Default Re: modeling a gate
  #7
zxaar
Guest
 
Posts: n/a
try

./cfxrun.bat

it will run :-D
  Reply With Quote

Old   May 26, 2003, 11:55
Default Re: modeling a gate
  #8
Alex
Guest
 
Posts: n/a
Hi,

It doesn't work. Neither on MSdos Prompt, nor on unix-like prompt.

Thanks

Alex
  Reply With Quote

Old   May 26, 2003, 19:24
Default Re: modeling a gate
  #9
Glenn Horrocks
Guest
 
Posts: n/a
Hi,

The reason you run the batch file from inside the command window from the CFX4 launcher is it sets up all the correct paths to the executables. If you start cfx from a command window not from the launcher it won't find the executables (or you have to explicitly locate them).

The command line I gave you was used on a UNIX machine. I assumed it was the same for windows, but I might be wrong. You will note that some of the files have filenames "../m01.f" etc - this is because at the time these files are called CFX4 is running in a temporary directory created in the directory it was called from. That is why you need to go back a directory. This might be different under windows.

Also, I don't know what you mean by a "UNIX like prompt". If you mean the command line from the CFX launcher, it is just a normal command line window, just with some PATH statements so it can find the CFX executables.

Glenn
  Reply With Quote

Old   May 27, 2003, 06:33
Default Re: modeling a gate
  #10
Alex
Guest
 
Posts: n/a
Hi Glenn,

First, I would like to thank you for the time that you spent for all your messages. I really appreciate that.

What I called an "unix-like prompt" is a MSdos windows, in which unix (bash) environment is emulated thanks to cygwin (I believe ??).

At present, I have found the tip to run my jobs, using a batch file : The batch file must be created in the "CFX_dir\cygnus\cygwin-b20\H-i586-cygwin32\bin" directory. Therefore, I can use the Command Line windows (ran from the Cfx Launcher) to submit the batch file.

I don't know if this is due to a bad installation, because in the past, I used to run the jobs from a MSdos windows (but it was CFX4.2).

I write the method below (It might be usefull for someone else)

Best Regards

Alex

-----

1/ create a text file (name : batchjob for instance) whith a script shell heading and whith the serial of command lines :

#!/bin/sh runsolve4 -rel 4.3 -c m01.fc -g m01.geo -enviro 01 -dir ./cfx_tmpdir runsolve4 -rel 4.3 -c m01.fc -g m02.geo -enviro 02 -restart m01.dmp -dir ./cfx_tmpdir" etc....

2/ Copy this file in the CFX_dir\cygnus\cygwin-b20\H-i586-cygwin32\bin

3/ From the CFX launcher (in the working directory) run a Command Line Windows.

4/ Type the name of the batch file (batchjob)

5/ If you want to stop the job before it ends type from another Command Line windows (ran from the Launcher too) type : touch cfx_tmpdir/cfx4.STP

  Reply With Quote

Old   May 28, 2003, 14:22
Default Re: modeling a gate
  #11
Alex
Guest
 
Posts: n/a
Hi Glenn,

I have still problems with this computation (modeling a gate). The batch jobs with several geometries files work when using one phase computation (only water).

Now I am trying to compute the draining of a reservoir (air/water using the homogeneous model) with this opening gate.

Restarting with a new geometrie file leads to some problems :

1/ the starting volume fraction field is not the same as at last time step of the former computation

2/ the result are non physical (even if the numerical solution is well converged)

Thank you.

Alex
  Reply With Quote

Old   May 28, 2003, 19:23
Default Re: modeling a gate
  #12
Glenn Horrocks
Guest
 
Posts: n/a
Hi Alex,

You may have to zero the values of the solution variables in the dummy nodes for the cells which have just become walls. If you don't they can go unstable and cause the solution to go berko - despite the fact they are behind a wall! Anyway, below is the fortran I used to zero the dummy nodes. You put this code in USRBCS.

Glenn

call ipall ('WALLPATCHNAME','WALL','PATCH','CENTRES',

+ ipt,npt,cwork,iwork)

call getsca('ANYSCALARS',iscalar,cwork)

do i=1,npt

inode=ipt(i)

ibdry=inode-ncell

idummy=ipnodb(ibdry,2)

u(idummy,1)=0.0d0

v(idummy,1)=0.0d0

w(idummy,1)=0.0d0

p(idummy,1)=0.0d0

t(idummy,1)=0.0d0

h(idummy,1)=0.0d0

te(idummy,1)=0.0d0

ed(idummy,1)=0.0d0

scal(idummy,1,iscalar)=0.0d0

enddo

print*,'USRBCS *** dummy node data zeroed'

endif
  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
sluice gate by VOF Gian, S. CFX 1 September 28, 2006 00:08
May Focus Area: Turbulence Modeling Jonas Larsson CFD-Wiki 0 May 2, 2006 12:48
Modeling Flow/Saturation/Absorption in Fibers Gene Dougherty Main CFD Forum 0 June 6, 2003 15:49
Solid Modeling Chris Main CFD Forum 10 July 2, 2002 08:12
CFD Modeling of Two-phase Flow in Small Dia.Tubes Eric Poindexter Main CFD Forum 2 September 22, 2000 10:21


All times are GMT -4. The time now is 17:21.