Skip to content
This repository has been archived by the owner on Apr 23, 2021. It is now read-only.

Commit

Permalink
Merge pull request #268 from simphony/add-cuba-keyword
Browse files Browse the repository at this point in the history
Add cuba keyword
  • Loading branch information
khiltunen committed Jan 18, 2016
2 parents 75fa184 + eed3469 commit 8ed81d9
Show file tree
Hide file tree
Showing 5 changed files with 146 additions and 3 deletions.
8 changes: 8 additions & 0 deletions doc/source/cuba.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,12 @@ CutoffDistance Distance where force is no longer taken into account
EnergyWellDepth Measurement of how strongly the two particles attract each other. [] ENERGY_WELL_DEPTH 70 [1] double
VanDerWaalsRadius Distance at which the intermolecular potential between the two particles is zero. [] VAN_DER_WAALS_RADIUS 71 [1] double
DielectricConstant Ratio of the permittivity of a substance to the permittivity of free space or vacuum [] DIELECTRIC_CONSTANT 72 [1] double
DynamicPressure Dynamic pressure ['FEM', 'FVM'] DYNAMIC_PRESSURE 73 [1] double
Flux Flux ['FEM', 'FVM'] FLUX 74 [1] double
HomogenizedStressTensor Homogenized stress tensor ['FEM', 'FVM'] HOMOGENIZED_STRESS_TENSOR 75 [9] double
StrainTensor Strain tensor ['FEM', 'FVM'] STRAIN_TENSOR 76 [9] double
RelativeVelocity Relative velocity ['FEM', 'FVM'] RELATIVE_VELOCITY 77 [3] double
DiffusionVelocity Diffusion velocity ['FEM', 'FVM'] DIFFUSION_VELOCITY 78 [3] double
StressTensor Stress tensor ['FEM', 'FVM'] STRESS_TENSOR 79 [9] double
VolumeFractionGradient Volume fraction gradient ['FEM', 'FVM'] VOLUME_FRACTION_GRADIENT 80 [3] double
========================== ==================================================================================== ================================================= ============================= ======== ======= =======
8 changes: 8 additions & 0 deletions simphony/core/cuba.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,11 @@ class CUBA(IntEnum):
ENERGY_WELL_DEPTH = 70
VAN_DER_WAALS_RADIUS = 71
DIELECTRIC_CONSTANT = 72
DYNAMIC_PRESSURE = 73
FLUX = 74
HOMOGENIZED_STRESS_TENSOR = 75
STRAIN_TENSOR = 76
RELATIVE_VELOCITY = 77
DIFFUSION_VELOCITY = 78
STRESS_TENSOR = 79
VOLUME_FRACTION_GRADIENT = 80
57 changes: 56 additions & 1 deletion simphony/core/cuba.yml
Original file line number Diff line number Diff line change
Expand Up @@ -509,4 +509,59 @@
number: 72
shape: [1]
type: double

- description: Dynamic pressure
domain: [FEM, FVM]
key: DYNAMIC_PRESSURE
name: DynamicPressure
number: 73
shape: [1]
type: double
- description: Flux
domain: [FEM, FVM]
key: FLUX
name: Flux
number: 74
shape: [1]
type: double
- description: Homogenized stress tensor
domain: [FEM, FVM]
key: HOMOGENIZED_STRESS_TENSOR
name: HomogenizedStressTensor
number: 75
shape: [9]
type: double
- description: Strain tensor
domain: [FEM, FVM]
key: STRAIN_TENSOR
name: StrainTensor
number: 76
shape: [9]
type: double
- description: Relative velocity
domain: [FEM, FVM]
key: RELATIVE_VELOCITY
name: RelativeVelocity
number: 77
shape: [3]
type: double
- description: Diffusion velocity
domain: [FEM, FVM]
key: DIFFUSION_VELOCITY
name: DiffusionVelocity
number: 78
shape: [3]
type: double
- description: Stress tensor
domain: [FEM, FVM]
key: STRESS_TENSOR
name: StressTensor
number: 79
shape: [9]
type: double
- description: Volume fraction gradient
domain: [FEM, FVM]
key: VOLUME_FRACTION_GRADIENT
name: VolumeFractionGradient
number: 80
shape: [3]
type: double
64 changes: 64 additions & 0 deletions simphony/core/keywords.py
Original file line number Diff line number Diff line change
Expand Up @@ -595,4 +595,68 @@
number=72,
shape=[1],
dtype=numpy.float64),
'DYNAMIC_PRESSURE': Keyword(
name='DynamicPressure',
description='Dynamic pressure', # noqa
domain=['FEM', 'FVM'],
key='DYNAMIC_PRESSURE',
number=73,
shape=[1],
dtype=numpy.float64),
'FLUX': Keyword(
name='Flux',
description='Flux', # noqa
domain=['FEM', 'FVM'],
key='FLUX',
number=74,
shape=[1],
dtype=numpy.float64),
'HOMOGENIZED_STRESS_TENSOR': Keyword(
name='HomogenizedStressTensor',
description='Homogenized stress tensor', # noqa
domain=['FEM', 'FVM'],
key='HOMOGENIZED_STRESS_TENSOR',
number=75,
shape=[9],
dtype=numpy.float64),
'STRAIN_TENSOR': Keyword(
name='StrainTensor',
description='Strain tensor', # noqa
domain=['FEM', 'FVM'],
key='STRAIN_TENSOR',
number=76,
shape=[9],
dtype=numpy.float64),
'RELATIVE_VELOCITY': Keyword(
name='RelativeVelocity',
description='Relative velocity', # noqa
domain=['FEM', 'FVM'],
key='RELATIVE_VELOCITY',
number=77,
shape=[3],
dtype=numpy.float64),
'DIFFUSION_VELOCITY': Keyword(
name='DiffusionVelocity',
description='Diffusion velocity', # noqa
domain=['FEM', 'FVM'],
key='DIFFUSION_VELOCITY',
number=78,
shape=[3],
dtype=numpy.float64),
'STRESS_TENSOR': Keyword(
name='StressTensor',
description='Stress tensor', # noqa
domain=['FEM', 'FVM'],
key='STRESS_TENSOR',
number=79,
shape=[9],
dtype=numpy.float64),
'VOLUME_FRACTION_GRADIENT': Keyword(
name='VolumeFractionGradient',
description='Volume fraction gradient', # noqa
domain=['FEM', 'FVM'],
key='VOLUME_FRACTION_GRADIENT',
number=80,
shape=[3],
dtype=numpy.float64),
}
12 changes: 10 additions & 2 deletions simphony/io/data_container_description.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,24 @@ class Data(tables.IsDescription):
energy_well_depth = tables.Float64Col(pos=68)
van_der_waals_radius = tables.Float64Col(pos=69)
dielectric_constant = tables.Float64Col(pos=70)
dynamic_pressure = tables.Float64Col(pos=71)
flux = tables.Float64Col(pos=72)
homogenized_stress_tensor = tables.Float64Col(pos=73, shape=9)
strain_tensor = tables.Float64Col(pos=74, shape=9)
relative_velocity = tables.Float64Col(pos=75, shape=3)
diffusion_velocity = tables.Float64Col(pos=76, shape=3)
stress_tensor = tables.Float64Col(pos=77, shape=9)
volume_fraction_gradient = tables.Float64Col(pos=78, shape=3)


class Record(tables.IsDescription):

index = tables.StringCol(itemsize=32, pos=0)
data = Data()
mask = tables.BoolCol(pos=1, shape=(71,))
mask = tables.BoolCol(pos=1, shape=(79,))


class NoUIDRecord(tables.IsDescription):

data = Data()
mask = tables.BoolCol(pos=1, shape=(71,))
mask = tables.BoolCol(pos=1, shape=(79,))

0 comments on commit 8ed81d9

Please sign in to comment.