|
-
February 23rd, 2011, 08:39 PM
#3
Of course,
There is this company called Itasca
http://www.itascacg.com/pfc3d/
It has a couple of softwares two of which are FLAC (fast Lagrangian code) and PFC (particle flow code). They have a built-in language called FISH. The FISH language is C++ based by which I mean there should be some internal codes to do the stuff but since most engineers are not that good in programing they have, I suppose, assigned commands to these internal codes to make life easier.
I'm using windows 7 professional in my DELL Studio XPS 435T setup for doing these stuff.
FYI: One example is the ball command that I wrote above. For example if you want to model a particulate medium like soil by "distinct (or discrete) element modeling" you're gonna need to create bunch of particles. So instead of having to write a long c++ code to do that, you just need to use that "ball" command and then you need to make "walls" and apply forces and blahblahblah
FYI: This is one very simple sample of code:
The software does not have an interpreter so it's really a pain...if you make mistakes like typos it gives you errors but not that type of neat cute concise errors that we get in like Netbeans! So yea I was just wondering if I can make my life a little bit easier by making such a autocomplete thing to write codes....actually now that I'm thinking about, maybe having them on a piece of paper besides me will be easier but there are really so many commands...below example contains lots of normal mathematical stuff that I'm NOT talking about...I'm talking about the internal commands like "gen" "wall" "fric" "print" etc.
;fname: expand.DAT
new
SET random ; reset random-number generator
; ---------------------------------------------
def expand
;--- input data ---
n_stiff = 1e8 ; normal contact stiffness
s_stiff = 1e8 ; shear contact stiffness
width = 10.0 ; width of box
height = 5.0 ; height of box
depth = 5.0 ; depth of box
tot_vol = width*height*depth
poros = 0.40 ; desired final porosity
num = 200 ; number of particles
rat = 1.5 ; ratio of largest to smallest radii
;--- derived data ---
mult = 1.6 ; initial radius multiplication factor
n0 = 1.0 - (1.0 - poros) / mult^3
r0 = (3.0*tot_vol*(1.0 - n0)/(4.0*pi*num))^(1.0/3.0)
rlo = 2.0 * r0 / (1.0 + rat)
rhi = rat * rlo
;--- add six infinite walls to bound the specified volume
command
wall id=1 ks=s_stiff kn=n_stiff norm=( 0, 1, 0) orig=(0,0,0)
wall id=2 ks=s_stiff kn=n_stiff norm=(-1, 0, 0) orig=(width,0,0)
wall id=3 ks=s_stiff kn=n_stiff norm=( 0,-1, 0) orig=(0,height,0)
wall id=4 ks=s_stiff kn=n_stiff norm=( 1, 0, 0) orig=(0,0,0)
wall id=5 ks=s_stiff kn=n_stiff norm=( 0, 0, 1) orig=(0,0,0)
wall id=6 ks=s_stiff kn=n_stiff norm=( 0, 0,-1) orig=(0,0,depth)
end_command
;--- generate the balls and give them their properties
command
gen id=1,num rad=rlo,rhi x=0,width y=0,height z=0,depth
prop dens=1000 ks=s_stiff kn=n_stiff
end_command
get_poros
_mult = ((1.0 - poros) / (1.0 - pmeas))^(1.0/3.0)
command
initial radius mul _mult
cycle 1000
prop fric 0.2
cycle 250
end_command
end
; ---------------------------------------------
def get_poros
sum = 0.0
bp = ball_head
loop while bp # null
sum = sum + (4.0/3.0) * pi * b_rad(bp)^3
bp = b_next(bp)
end_loop
pmeas = 1.0 - sum / tot_vol
end
expand
get_poros
plot create the_view
plot add ball yellow
plot add axes black
plot add cf blue
plot set rotation (30 0 30)
plot show
print pmeas
save expand.SAV
Last edited by boyboy400; February 23rd, 2011 at 08:43 PM.
Similar Threads
-
By gore in forum Operating Systems
Replies: 13
Last Post: June 9th, 2004, 02:44 AM
-
By volcanic in forum Other Tutorials Forum
Replies: 2
Last Post: October 26th, 2003, 07:02 PM
-
By -DaRK-RaiDeR- in forum Newbie Security Questions
Replies: 9
Last Post: December 14th, 2002, 08:38 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|