Disk-Based Container Objects

Disk-Based Container Objects
Disk-Based Container Objects

Disk-Based Container Objects

Tom Nelson

A container that's very large, or that must persist between programs, really needs to live on disk.

C++ container class libraries have become a staple item in many programmers' toolkits. The introduction of templates has made these libraries notably robust and simple to use. However, their transient (memory-based) nature still imposes certain restrictions on their use. First, they cannot grow to arbitrary size if needed; second, they lack persistence, hence they disappear when the program shuts down.

The second restriction is usually easier to cure than the first. To make a transient container "hold water," the container class could use a persistent streams facility to write the essential data members of each contained object to a disk file before shutting down. The next program invocation need only initialize another transient container, then sequentially extract each object from the persistent store and add it to the new container.

In some cases, though, you can't guarantee that your run-time storage requirements won't overflow available memory. A priority or scheduling queue, for example, might need to process and store an unanticipated quantity of incoming data. You could write some objects to disk to free space in the container. However, to effectively process additions and deletions, a transient container normally requires the presence of all contained objects in memory at one time. When you write contained objects to a file, the logical structure of the container (pointers, state info, etc.) is lost. One solution consists of moving the entire container out to a disk file so that it becomes, in effect, a database, or "Containerized Database."

This article will demonstrate techniques for building and using such disk-based container classes. They allow you to employ container objects of virtually any size regardless of memory constraints, which you can maintain indefinitely. Even when persistence is not necessary, the technique still permits arbitrary growth of the containers by storing overflow in temporary files, restricted only by available disk space. I will concentrate here on developing disk-based implementations for three fundamental structure types (lists, vectors, and binary trees). I discuss a few abstract types derived from them, and provide an example of a disk-based binary tree sort.

Design and Performance Considerations

The public interface and behavior of member functions in a disk- based container class are nearly identical to a comparable transient container, making its use almost transparent to the programmer. There are, of course, a few instances where you need to be aware of its disk-based nature, such as supplying a container filename to a class constructor (if you need persistence, that is). Other considerations important for transient containers — for instance, specifying an upper limit for the size of a vector — usually drop out of the picture entirely. Disk-based containers are essentially open ended.

I used templates to implement most aspects of the container classes provided here. While templates introduce added complexity for the uninitiated, their use greatly simplifies coding for direct containers types. Disk-based containers are implemented as direct containers, since you will need to store actual objects. Using indirect containers, which maintain (void *) pointers to other objects in memory, would introduce unnecessary complexity. When using templates, you will encounter other important considerations such as increased code size and compilation times. Each template instance will have its own private copy of nearly identical code that operates on different data types.

Due to their disk-based nature, these containers also impose a variable degree of speed penalty. Instead of memory addresses, disk-based containers use file offsets, most commonly a long or unsigned long integer value. To process additions and deletions to the container file (primarily for list containers), one or more nodes must be read into memory, the pointers adjusted, and the updated nodes written out again.

Container File Access

A few factors make this procedure less cumbersome and disk- intensive than it first appears. Contemporary operating systems have a system-wide disk cache that stores recently used disk sectors in memory. The operating system inspects cache memory before initiating a physical disk access. A disk-based container can also employ a private cache that stores recently used objects in memory. You may find this important when working in a multitasking environment. The system cache may encounter heavy use at times from other programs currently running.

Class DirectFile (in dfile.h, available online) defines a direct file management scheme. Member functions access container file contents directly from the disk via the system cache. You will probably find that most disk-based containers can make effective use of this simpler method of access with little performance penalty. For other situations, such as those noted earlier, disk-based containers can also use class CachedFile (in cfile.h and cfile.cpp). CachedFile implements a most-recently-used object cache independent of the system cache. (For more info on disk caching, see my article "Memory Caching for Disk-Based Objects," CUJ, October 1996, p. 59.) The public interfaces for both DirectFile and CachedFile are identical, which makes access to objects of either class transparent to higher-level classes. I also padded the argument list for constructor DirectFile to

match the somewhat longer list for the CachedFile class constructor. This enables you to call either constructor transparently using compile-time #defines.

The constructor DirectFile takes an unsigned size argument and a filename. The size argument corresponds to the width of data (in bytes) to be stored in the container file. Note that this width must also include node pointer data for list container implementations, in addition to the user's object data. In contrast, vector container files store only the user's data in cells without need for node pointers.

The filename argument for DirectFile defaults to a null pointer. If null (or a null string), the constructor assumes that you want a temporary container file. A temporary file lacks persistence, since the class destructor deletes it when you destroy a DirectFile object. However, a temporary file still permits a practically unlimited container size. If you supply an actual filename, the container file will act as a persistent store.

Vector Container Management

A persistent, disk-based container keeps data secure between successive program invocations and thus needs to maintain data about itself, as well as user data, on file. The container keeps such state data inside a special header block always located at offset 0 in the container file.

Class TDVectorManager (in vectman.h) mediates access to container files for

higher-level vector classes. The class takes two template arguments (within the angle brackets): a user data type T and a file manager type FM. Type FM can be either class DirectFile or CachedFile. In abbreviated form, the class looks like this:

I locate all container state data in a single nested header object so that I can read and write it to the container file as a single block. The header data struct carries an ID string that defaults to "VECTOR". The string helps you identify the correct container file for a persistent application. To ensure type safety, the ID string might carry the name of the data type contained therein. You may want to augment this capability with other data, such as an ID or file version number.

The macro quantity BEG_OFFSET (see Listing 1) defaults to the size of the header struct, which will locate the first (zeroth) vector cell immediately after the header. Reset BEG_OFFSET before compiling to place the zeroth cell at any desired offset into the container file. You may find this useful if you must keep other implementation-specific data in the container.

The member function WriteHeader, as the name implies, writes container state data in the file header to the container file. It skips this operation if you're using only a temporary container file.

You must also take into consideration when and how often to write an updated header to disk. Your requirements may call for a conservative, transaction-oriented approach. This write-through strategy requires you to call WriteHeader after every modification made to the container file. You could also add a Commit facility that physically updates the disk file and its directory entry. This approach helps protect your data against (among other things) an unscheduled loss of power. Any database designer must contend with the same set of problems.

I have taken a somewhat more efficient approach here, but one with less built-in safety. This strategy delays a physical update until the last possible moment. You save the time

because the code does not write the container header block every time it changes. The destructor ~TDVectorManager only calls WriteHeader just before it destroys the object.

List Container Management

Listing 1 (listman.h) presents class TDListManager. It performs much the same services as TDVectorManager, but for list-type containers. List containers store nodes, which consist of one or more pointers to other nodes, in addition to user data. TDListManager can work with any type of fundamental data structure that uses nodes, including

tree-structured containers.

Listing 1 defines three types of nodes that a list container can utilize. You must specify a node type as the first template argument to TDListManager. You can use these to implement containers for single- and double-linked lists, and for binary trees. You may need other node types for special requirements. TDListManager isn't limited to just the three node types defined here.

If you do define other node types, TDListManager requires only that you include a free pointer (called Free) as a data member in the node definition. A node can be in one of two states. When a node is in use, its Free pointer contains the offset address of its own node (offset to the first byte of that node). When you deallocate a node, it becomes part of a free node list. The node is added to the head of the free list and its Free pointer is set to the offset of the next node in the free list (previously the head). The data member _Hdr.Free always points to the first node in the free list. This strategy keeps track of deallocated nodes so you can reuse the space. TDListManager member functions GetFree and PutFree manage node allocation and the free node list.

Like TDVectorManager, TDListManager locates all container state data in a single header struct (_Hdr). _Hdr.Head points to the first node in a list, or the root node of a binary tree. _Hdr.Tail points to the end of a list. You may or may not use a tail pointer, depending on your application. For example, trees and single-linked lists won't use a tail pointer. _Hdr should ideally include an ID string or other identification data as described earlier for TDVectorManager, but I omitted this for clarity.

_Hdr.ItemCount holds the number of active nodes in the list that currently store user data. _Hdr.NodesAllocated contains the total number of nodes. This total includes both active and inactive (free) nodes. As indicated earlier for TDVectorManager, you can modify the macro constant BEG_OFFSET to control the placement of the first list node. This node by default occurs immediately after the header block.

Implementing Vector Containers

The following snippet presents class TDVector (in vector.h), a basic vector implementation. It uses container file management services provided by TDVectorManager. You can use TDVector as a base class to implement more specialized

container types that use a vector as the primary implementation. Like transient vectors, a disk-based vector stores each object at consecutive locations starting at index 0.

Class TDVector differs in certain crucial respects from its transient cousin. Transient vector/array containers usually have the ability to insert or delete objects at a given index. An insertion moves all cells above that index up one place. A deletion copies all cells above a given index down one place. A disk-based vector could incorporate the

same capability, but at a price. This would at best be a disk-intensive operation, particularly when performing repeated insertions or deletions. I have compromised by allowing additions and deletions only at the end of the vector, and disallowing insertions completely. You can call member function CellCount(ulong n) to reset the vector's range to 0 . . . n-1. Member function Add will place the next item at index n.

Note that CellCount(ulong n) can also extend the range to virtually any length, whether or not valid data exists within that range. ReplaceAt will safely store an object at any index within or beyond the current end of vector, extending the vector's range to compensate if necessary. ItemAt returns the contents of any cell within the vector's range whether or not the cell contains valid data.

Transient vectors and arrays can also make use of the subscript operator []. This operator generates an in-memory reference to the object contained at the subscripted index. You can use this to intuitively access or replace an object in the container using normal C syntax.

Unfortunately, the [] operator doesn't work as easily for disk- based vector containers. You can overload [], but it's difficult to isolate lvalue from rvalue usage. Both require reading the object at the specified index into memory. You must precede this access by writing any previously accessed object (occupying the same storage location) to the container file, just in case you changed it. The overload function then returns a reference to the new item just accessed. This means every access will always be preceded by an update to the container file, whether or not an actual assignment has occurred. There's no easy way to tell without added execution overhead.

I've settled for a less satisfactory approach to the problem. The function call operator() can take a variable number of arguments. This allows me to write one overloaded function that provides object assignment (&item, index), and another that grants access only (index). It avoids unnecessary disk activity, but it's sometimes difficult to remember which function does what.

The associated vector class TDVectorIterator (in vector.h) defines a simple iterator for TDVector objects. Member function Current returns the item at the current index. operator++ doesn't return the current object like some iterators do, but only increments the current index pointer. You can also use TDVector::ForEach as a built-in iterator. It calls the supplied callback function for each object in the container file. If you modify an object, your callback should return non-zero. ForEach will then write the modified object back to the container file.

A Binary Tree Container

Listing 2 (bintree.h) presents class TDBinarySearchTree. This is a simplified binary tree representation constructed for searching and sorting. A binary tree is an example of an ordered or sorted container. For now, the public interface consists of only two primary

member functions. Function Add places new items in the tree and doesn't check for duplicates. Function ForEach acts as a simple iterator. Just for kicks, I've also overloaded operator<< so it lets you add objects to the binary tree as if you were using an iostreams inserter.

Function ForEach performs only an in-order traversal of the tree to access each object in sorted order. ForEach declares a temporary TDStackAsVector object (a stack derived from TDVector; see vector.h) to store the file offset addresses of each tree node it visits. You needn't concern yourself with size limitations here. TDStackAsVector is essentially open-ended, limited only by available disk space.

Listing 3 (bsort.cpp) combines many of the foregoing concepts to create a simple utility that sorts words in a text file of virtually any size. It reads words from an input stream and adds them to the binary tree. ForEach then traverses the tree to access each word in ascending order. The program also computes and stores the byte offset of each word. You could use this offset value to build a text concordance. A concordance lists each word in sorted order along with a sample of the text surrounding that word as it appears in the document.

I offer no test results to show how this binary tree sort compares to others. A binary tree sort is generally classed as an internal sort. The one I offer here might instead have more in common with an external merge sort. Like external sorting, there's no requirement that all objects exist in memory at one time, in contrast to a quick sort. Quick sorts and binary tree sorts are both classed as relatively efficient (N log N) sorts. However, a binary tree sort has the added overhead of traversing the tree to produce the sorted output. Even so, you may find it surprisingly efficient, considering the relatively small amount of code required compared to external merge sorts.

Containing Complex and Derived Classes

With simple classes — that is, classes containing no embedded pointers or virtual functions — it's easy to determine what will be written to the disk. For instance, the previous example in Listing 3 created a specialized database for objects of class WordSort. Each node in the binary tree container stores one instance of all the data members defined within class WordSort. The amount of user data stored within each node is thus sizeof(WordSort) bytes in width.

A more complex class might also include a pointer to a virtual function table as well as pointers to in-memory buffers or other objects. Adding objects of this class to a container means you store the whole banana, not just the object state data you want. When you restore such an object, the old run-time data kept on disk comes along with it, which will probably invalidate your object. Virtual function calls probably won't work as you expect. Other pointers are likely to be left dangling.

The data you store in a disk-based container should consist only of the data necessary to restore an object's state. A customized assignment operator or copy constructor arranged for deep copy won't usually work here. Any object-copy operation leaves the virtual table pointer intact (if one exists). Also, whether or not you copy all the data, the copy operation still either creates or expects space for all the data — including the data you shouldn't place in persistent storage. The size of the destination object remains the same as the source object, regardless of which you parts you copy.

A partial solution consists of putting all state data members into a struct nested within your class definition. You pass references to the nested struct object, instead of its parent class object, when you call container functions. This ensures that only the data you want goes into the container. I used this method for the container management classes TDVectorManager and TDListManager (Listing 1) . Unfortunately, this simple method won't work for derived classes. You can't incorporate additional member data from a derived class into a nested struct in a base class.

The technique I've adopted is similar to persistent object streaming. Persistent streaming allows insertion and extraction of base and derived member data from a persistent (file) stream. You must write specific member functions to insert and extract only the member data you choose. However, the disk-based containers I present here depend on storing and retrieving data in a contiguous block. You can't easily work with them in stream-like fashion.

My method uses a "packed object format" instead of object streaming. This is a rather quick-and-dirty method, but also somewhat easier to implement than most object streaming techniques. You must define a packed format struct that duplicates all data members you want to save from the working version of your class(es):

For the base and each derived class, you need to write a Save member function that assigns member data to the packed format struct. You then write data in packed format to the container file. A Restore function for each class should perform the inverse operation:

Remember that you must initialize the container object with the packed format type, not your working (transient) class type.

Whenever you derive a new class from an existing base, add a data member in the packed format definition that corresponds to a data member you want to save from the

derived class. Both Save and Restore functions in the derived class should call the equivalent functions in the parent class(es). Adding to the packed format struct should not break existing code (if names remain the same), but will force a recompilation. This procedure will also invalidate the associated container file. You can read data from the old container file into the new packed format if you've maintained data members in the same order. Then add data in the new format to a new container. You could also use this simplified technique for persistent object streaming by inserting data in packed format to an fstream.

Other Container Implementations

CUJ online code sources include two additional list container implementations, classes TDStackAsList and TDQueueAsDoubleList. Both illustrate uses for single- and

double-linked list nodes. I present TDStackAsList as a demonstration only, since there's no real reason to code a disk-based stack as a list. Both list- and vector-based stacks can grow to any desired size, but the list version must adjust node pointers, which adds execution overhead. You might well find practical uses for TDQueueAsDoubleList, however. You could derive a sorted version of it (as TDSortedQueueAsDoubleList) for use as a persistent priority queue, for example.

Any disk-based container that freely permits additions, insertions, and deletions at any point in the container will be more efficient when implemented as a list, since it can reuse space for deleted nodes more effectively. A vector requires more disk activity (as outlined earlier) to perform the same operations. A list also works directly with file offset values rather than vector cell indices. Each access to a vector cell thus requires an intervening conversion to a file offset. A vector, however, might be used as the base for a more specialized container file. A vector cell can be any practical size and accommodate data of any structure; for example, blocks for a btree index file. Each vector cell would then contain a number of key/pointer nodes. o

Tom Nelson is an independent programmer and technical writer. His current interests include OOP design and systems programming for Intel-based PCs. He may be reached at 5004 W. Mt. Hope Rd., Lansing, MI 48917, 517-322-2559, or via email at

tnelson@https://www.360docs.net/doc/8d17215435.html,. All source code presented here or referred to in this article Copyright ? 1996 T.W. Nelson. Permission is hereby granted to use this code in any manner provided this copyright notice is displayed appropriately.

PDMS中文教程结构建库

VPD VANTAGE Plant Design System 工厂三维布置设计管理系统 PDMS结构建库 培训手册

型钢库 PDMS已经提供了较完善的元件库,包括型材截面、配件和节点库。但不一定十分齐全,所以PDMS提供了非常方便的建库工具,这些功能都可在PARAGON中实现。 设计库、元件库和等级库之间的关系 等级库(Specificaion)是设计库与元件库之间的桥梁。设计者在等级库中选择元件后,等级中的元件自动找到对应的元件库中的元件;元件库中的几何形状和数据被设计库参考。如下图。 型钢库层次结构 型钢库World下包含了许多元件库和等级库,它们也是一种树状结构库。下图就是型钢库层次结构: 型钢等级库层次结构 等级库相当于元件库的索引,其目的是为设计人员提供一个选择元件的界面,它的层次结构既与界面的关系如下图所示。 本章主要内容: 1.定义型钢截面(Profile) 2.定义型钢配件(Fitting) 3.定义节点(Joint) 定义型钢截面(Profile) 练习一:定义型钢截面库 1.元件库最终的层次结构如下: 2.以管理员身份(如SYSTEM)登录PARAGON模块,再进入Paragon>Steelwork子模块。 3.在 4.选择菜单Create>Section,创建新的STSE, 5.在刚创建的STSE下,选择菜单Create>Element,创建三个元素:“ref.DTSE”、“ref.GMSS”和“ref.PTSS”。 现在的数据库结构如下: 6.设置。选择Settings>Referance Data… 和Display>Members…按下图设置: 7.鼠标指向CATA层,选择菜单Create>Section,创建新的STSE:example/PRFL/BOX。8.选择菜单Create>Category>For Profiles,创建新的STCA,如下图: 9.鼠标指向STCA:example/PRFL/REF.DTSE层,在命令行中键入命令:“NEW DTSE /BOX/EQUAL/DTSE”,这样新建了一个DTSE,如下图。 10.创建截面本身。选择菜单Create>Profile,按下图设置:

外贸函电范文

台布 我们从我国商务部处得悉贵公司的名称和地址,现借此机会与你方通信,意在建立友好业务关系。 我们是一家国营公司,专门经营台布出口业务。我们能接受顾客的来样定货,来样中可具体需要产品的花样图案,规格及包装装潢的要求。 为使你方对我各类台布有大致的了解,我们另航寄最新的目录供参考。如果你方对产品有兴趣,请尽快通知我方。一俟收到你方具体询盘,即寄送报价单和样本。 盼早复。 SPECIMEN:INTRODUCING BUSINESS OPERATION Dear Sirs, RE:TABLECLOTH We have your name and adress from Ministry of Commerce of the People's Republic of China.We take this opportunity to write to you with a view to set up friend business relations with you. We are a carpet manufacturer, our products are a unique style of novel, inexpensive..We are in a position to accept orders according to the customer's spmples.In the customer's spmples,request about the assorted pattern,specification and package of the needed goods can be indicated particularly. In order to give you a gengral idea of various kinds of the table-cloth we are handling,we are airmailing you under separate cover our latest catalogue for your reference.Please let us know immediately if you are interested in our products.We will send you our price list and sample to you as soon as we receive your specific inquiry. Looking forward to your early reply,we are. Yours faithfully Xiaoli

Plaxis中常见问题集锦

1 问:Geo FEM,Plaxis,Z-Soil软件比较? 2008/6/5 9:34:48 答:三者针对某个算例计算结果相差不大,误差在可接受范围之内。 就易用性来说,Plaxis好于Z-Soil好于GEO。Plaxis大家都用得很多了,Z-Soil的建模可以在前 处理模块中用CAD元素绘制,或者通过dxf文件导入;GEO4只能输入剖面线的坐标,比较烦琐。 Plaxis和Z-soil基本可以解决岩土工程所有问题,但GEO4由于建模功能的限制,只能解决隧道、 边坡等相关问题;Plaxis和Z-Soil可以进行渗流分析(非饱和)包括流固偶合分析。 总的来说,Plaxis和Z-Soil是专业的岩土工程有限元程序;GEO FEM是GEO4里面的一个工具 包,而GEO4类似于国内的理正一样,是遵循Eurocode的设计软件。 2 问:在plaxis中,用折减系数作出它的几个滑裂面,如何查看滑裂面的角度、圆心、半径等 这些滑裂面的相关参数呢? 2008/6/5 9:36:26 答:使用强度折减法,不用假定slip surface,故不会有这些数据。 3 问:Plaxis怎么模拟路堤分步填筑?在实际施工中,填筑不是一次加载的,可能先填一半, 过个月再填一半,而且这一半也不是一次填完,要在几天内完成,请问怎么在Plaxis中模拟,怎 么设置可以反应填筑速率,请高手指教? 2008/6/5 9:47:25 答:手册里有相关例子,你可以参考一下lesson 5。 堆载速率可以通过设置堆载这个stage的时间间隔来设置。如果只有基本模块,可以设置mstage 的数值。mstage=1.0,说明100%施加上去了,mstage=0.1,说明只有10%的荷载。由于Plaxis 不能设置load function,比较麻烦。当然,你可以将一层土细分成几个stage完成,也可以实现。 4 问:Plaxis 3D 用这个软件分析基坑时,基坑是钢格栅喷混凝土支护,支护用板来模拟,EI 和EA中的I和A分别指哪个面的惯性矩和面积,以及单位后面的/m应该是哪个长度? 2008/6/5 9:49:13 答:应该是:A=沿着洞轴方向L×厚度d E是弹性模量I是惯性矩 5 问:在网上看到有人怀疑Plaxis 3D Foundation和3D Tunnel的真三维性,有人说它们不是 真正的三维计算,有谁知道是怎么回事吗? 2008/6/5 9:59:42 答:Plaxis 3D Tunnel计算内核是三维的。但是目前只支持平面拉伸建模,建附加模型还存在困 难。3D Tunnel的确不能生成复杂的斜交隧道。 3D Foundation是专门解决基础问题的三维有限元计算软件。其解决基础问题要比FLAC3D要专 业,特别是考虑了一些工程实际,但开放性不如FLAC3d。近期3D Foundation将在此方面有重 大改进,新版本前处理借用GID作为前处理工具。Plaxis 系列优点长处是其理论,尤其是hs和 hs-small模型。 6 问:最近在算一个基坑,很好的地质条件,桩、撑刚度都取得很大,居然算出来水平位移始终 都有70mm左右,但用同济启明星算水土分算,并且参数都没有取最大值,算的结果只有17mm 左右。深圳规范要求水平位移不超过30mm,要是用Plaxis是很难算出小于规范值的结果的,事 实上,也不至于有那么大的位移的? 2008/6/5 10:05:32 答:主要问题是现在很多地质报告都不提供三轴的试验参数:例如E50模量,Eur模量,Es模量, 有效强度指标等;土体的本构参数比较特殊,要做特殊的试验,因此一般的项目参数方面的确有 问题。不过,即便是只有Es模量和直剪固快指标,通过换算和引入K0、孔隙比、Cc,Cs等其 他参数,也是可以得到其他需要的参数,不过这需要比较扎实的本构模型方面的知识和岩土工程 经验,知道不同的本构适合模拟什么土层,知道本构的优点和局限性,这对使用者的要求的确比 较高。 7 问:隧道已经组成一个类组,所以一定要对其进行材料定义。如果不定义得话,就不能对其 进行网格划分,这要怎么解决呢? 2008/6/5 10:08:42 答:你是不是只想模拟基坑开挖对既有隧道结构的影响,而省略掉前面隧道开挖过程的模拟。 这样的话,结果恐怕很难正确,而且会碰到你所说的问题。因为隧道在基坑开挖前,有一定的受

外贸函电常用范文

本文档由实惠网(https://www.360docs.net/doc/8d17215435.html,)编制,版权所有,尽供外贸交流学习商业目的请联系实惠网(https://www.360docs.net/doc/8d17215435.html,) 外贸函电常用范文Set new business relationship 建立贸易关系,可以通过多种途径,比如通过驻外机构、国外商会、同业商行、银行、出国访问、商品交易会、报纸广告、市场调查等等。建立贸易关系的信函,要写得诚恳、热情、礼貌、得体,并将写信人的意图清楚地叙述完整,给对方留下深刻地印象,使其愿意与你交往。 Dear Mr. Jones: We understand from your information posted on https://www.360docs.net/doc/8d17215435.html, that you are in the market for textiles. We 本文档由实惠网(https://www.360docs.net/doc/8d17215435.html,)编制,版权所有,尽供外贸交流学习商业目的请联系实惠网(https://www.360docs.net/doc/8d17215435.html,)

would like to take this opportunity to introduce our company and products, with the hope that we may work with Bright Ideas Imports in the future. We are a joint venture specializing in the manufacture and export of textiles. We have enclosed our catalog, which introduces our company in detail and covers the main products we supply at present. You may also visit our website https://www.360docs.net/doc/8d17215435.html,,which includes our latest product line. Should any of these items be of interest to you, please let us know. We will be happy to give you a quotation upon receipt of your detailed requirements. We look forward to receiving your enquires soon. Sincerely, John Roberts 本文档由实惠网(https://www.360docs.net/doc/8d17215435.html,)编制,版权所有,尽供外贸交流学习商业目的请联系实惠网(https://www.360docs.net/doc/8d17215435.html,)

中文参考手册-PLAXIS 2D--岩土三维建模分析

参 考 手 册

目录 1简介 (7) 2 一般说明 (7) 2.2 文件处理 (9) 2.3 帮助工具 (9) 2.4 输入方法 (10) 3 输入前处理 (10) 3.1 输入程序 (10) 3.5 荷载和边界条件 (28) 4 材料属性和材料数据组 (33) 4.1 模拟土体及界面行为 (35) 4.1.1 一般标签页 (35) 4.1.2 参数标签页 (39) 4.1.3 渗流参数标签页 (50) 4.1.4 界面标签页 (56) 4.1.5 初始标签页 (61) 4.2 不排水行为模拟 (63) 4.2.1 不排水(A) (64) 4.2.2 不排水(B) (64) 4.2.3 不排水(C) (64) 4.3 土工试验模拟 (64) 4.3.1 三轴试验 (67) 4.3.2 固结仪试验 (68) 4.3.3 CRS (68) 4.3.4 DDS (69) 4.3.6 结果 (70) 4.4 板的材料数据组 (70) 4.4.1 材料数据组 (71) 4.4.2 属性 (71)

4.5.1 材料数据组 (74) 4.5.2 属性 (74) 4.6 锚杆的材料数据组 (75) 4.6.1 材料数据组 (76) 4.6.2 属性 (76) 4.7 几何构件的材料数据组赋值 (76) 5 计算 (77) 5.1 计算程序界面 (77) 5.2 计算菜单 (78) 5.3 计算模式 (79) 5.3.1 经典模式 (80) 5.3.2 高级模式 (80) 5.3.3 渗流模式 (81) 5.4 定义计算阶段 (81) 5.4.1 计算标签页 (81) 5.4.2 插入或删除计算阶段 (82) 5.4.3 计算阶段的标识和顺序 (82) 5.5 分析类型 (83) 5.5.1 初始应力生成 (83) 5.5.2 塑性计算 (85) 5.5.3塑性(排水)计算 (85) 5.5.4 固结(EPP)分析 (85) 5.5.5 固结(TPP)分析 (86) 5.5.6 安全性(PHI/C折减) (86) 5.5.7 动力分析 (87) 5.5.8 自由振动 (87) 5.5.9 地下水渗流(稳态) (88) 5.5.10 地下水渗流(瞬态) (88) 5.5.11 塑性零增长步 (88)

外贸函电信函例文

Dear sir or madam: We get your name and address from the net, and the products that your company need’s are in our scope of business. So we send mail to you ,in hope to establish a long-term relations of cooperation. Our company is a big foreign tread company, engaged import and export business with nearly 20 years, and get good reputation. Sending enclosed with a catalogue and a price list for your reference. After receiving your inquiry, we will give you the most preferential price. Your early reply will be highly appreciate. 0003: Dear sir or madam: It is my pleasure to be looked by you of this mail. we gone into your company net , and glade to fond that your products are our needs’ . Our company Intercom Import & Export Co .,Ltd have done business of Children’s Bicycles importing for many years , and enjoy good reputation . We hope can establish relations of cooperation with you. In order to our deep treading , hoping that you can send a catalogue and the most good price list for our reference. Your early reply will be highly appreciate . Yours Intercom Import & Export Co .,Ltd James Brown 0007: Dear sir of madam: We get your address from internet , and know that you are one of the leading company in garment industry. We are interested in your No. MS1201 MEN’S DORM PANT, we hope to get detailed information on MEN’S DORM PANT, including prices 、colors , and all kinds of article numbers’samples , these are important for our reference. If your price and quality are attractive , we will place an order. Hoping for your early reply.

外贸函电范文【可编辑版】

外贸函电范文 外贸函电范文 外贸函电范文范文一:敬启者;我们从阿里巴巴得知贵公司的名称。我们公司是一个专营纺织品的大规模的公司,在世界市场上享有良好的声誉。现在,我方公司将会每月为贵公司能提供新的设计。我方公司将写信与贵公司建立直接的业务关系。如果贵公司想要下订单,请告知,如按贵公司的有需要我们将很乐意求提供我们的设计样本册,为了更好的准备货物如有现货订单,我方在收到你方订单之后三天之内装运。我们期待你的回复。敬上,范文二: Dear Sirs; The Bbank of Cchina Shanghai Branch has informed us that your company is a large importer of textiles products. We have the pleasure of introducing ourselves to you ,our company is as a local the largest textile manufactures in our area. Enclosed please find varies pictures of a variety of our quality textiles picture products. Besides, we are desirous of the details of your requirement, so as to provide better service. 1 Your specialized in market/ 2 Categories of your specialized products We are looking forward to establishing long-term business relations. Best regards 范文三: March 7,2017 Dear sirs, We have your name from Messrs. Smith Co. Our company is a large leading cooperation specializing in textiles items. We have been engaged in this line for 20

Plaxis中常见问题集锦

1 问:Geo FEM,Plaxis,Z-Soil软件比较?2008/6/5 9:34:48 答:三者针对某个算例计算结果相差不大,误差在可接受围之。 就易用性来说,Plaxis好于Z-Soil好于GEO。Plaxis大家都用得很多了,Z-Soil的建模可以在前处理模块中用CAD元素绘制,或者通过dxf文件导入;GEO4只能输入剖面线的坐标,比较烦琐。Plaxis和Z-soil基本可以解决岩土工程所有问题,但GEO4由于建模功能的限制,只能解决隧道、边坡等相关问题;Plaxis和Z-Soil可以进行渗流分析(非饱和)包括流固偶合分析。 总的来说,Plaxis和Z-Soil是专业的岩土工程有限元程序;GEO FEM是GEO4里面的一个工具包,而GEO4类似于国的理正一样,是遵循Eurocode的设计软件。 2 问:在plaxis中,用折减系数作出它的几个滑裂面,如何查看滑裂面的角度、圆心、半径等 这些滑裂面的相关参数呢? 2008/6/5 9:36:26 答:使用强度折减法,不用假定slip surface,故不会有这些数据。 3 问:Plaxis怎么模拟路堤分步填筑?在实际施工中,填筑不是一次加载的,可能先填一半, 过个月再填一半,而且这一半也不是一次填完,要在几天完成,请问怎么在Plaxis中模拟,怎么 设置可以反应填筑速率,请高手指教? 2008/6/5 9:47:25 答:手册里有相关例子,你可以参考一下lesson 5。 堆载速率可以通过设置堆载这个stage的时间间隔来设置。如果只有基本模块,可以设置mstage 的数值。mstage=1.0,说明100%施加上去了,mstage=0.1,说明只有10%的荷载。由于Plaxis 不能设置load function,比较麻烦。当然,你可以将一层土细分成几个stage完成,也可以实现。 4 问:Plaxis 3D 用这个软件分析基坑时,基坑是钢格栅喷混凝土支护,支护用板来模拟,EI 和EA中的I和A分别指哪个面的惯性矩和面积,以及单位后面的/m应该是哪个长度? 2008/6/5 9:49:13 答:应该是:A=沿着洞轴方向L×厚度d E是弹性模量I是惯性矩 5 问:在网上看到有人怀疑Plaxis 3D Foundation和3D Tunnel的真三维性,有人说它们不是 真正的三维计算,有谁知道是怎么回事吗? 2008/6/5 9:59:42 答:Plaxis 3D Tunnel计算核是三维的。但是目前只支持平面拉伸建模,建附加模型还存在困难。 3D Tunnel的确不能生成复杂的斜交隧道。 3D Foundation是专门解决基础问题的三维有限元计算软件。其解决基础问题要比FLAC3D要专 业,特别是考虑了一些工程实际,但开放性不如FLAC3d。近期3D Foundation将在此方面有重 大改进,新版本前处理借用GID作为前处理工具。Plaxis 系列优点长处是其理论,尤其是hs和 hs-small模型。 6 问:最近在算一个基坑,很好的地质条件,桩、撑刚度都取得很大,居然算出来水平位移始终 都有70mm左右,但用同济启明星算水土分算,并且参数都没有取最大值,算的结果只有17mm 左右。规要求水平位移不超过30mm,要是用Plaxis是很难算出小于规值的结果的,事实上,也 不至于有那么大的位移的? 2008/6/5 10:05:32 答:主要问题是现在很多地质报告都不提供三轴的试验参数:例如E50模量,Eur模量,Es模量, 有效强度指标等;土体的本构参数比较特殊,要做特殊的试验,因此一般的项目参数方面的确有 问题。不过,即便是只有Es模量和直剪固快指标,通过换算和引入K0、孔隙比、Cc,Cs等其 他参数,也是可以得到其他需要的参数,不过这需要比较扎实的本构模型方面的知识和岩土工程 经验,知道不同的本构适合模拟什么土层,知道本构的优点和局限性,这对使用者的要求的确比 较高。 7 问:隧道已经组成一个类组,所以一定要对其进行材料定义。如果不定义得话,就不能对其 进行网格划分,这要怎么解决呢? 2008/6/5 10:08:42 答:你是不是只想模拟基坑开挖对既有隧道结构的影响,而省略掉前面隧道开挖过程的模拟。 这样的话,结果恐怕很难正确,而且会碰到你所说的问题。因为隧道在基坑开挖前,有一定的受 力状况,这需要模拟隧道开挖过程才能得到其受力状况,基坑开挖的影响也是在其这个受力状况 上产生的。你现在的目的是让基坑开挖前,隧道结构的力和弯矩都为零了,所以结果很难正确。

外贸函电之:索赔信函范例[中英]

外贸函电之:索赔信函范例[中英] 外贸业务中,外贸函电的种类非常多,虽然有很大一部分不是我们经常使用的信函,但是,作为一名专业的外贸从业人员,我们必须了解和掌握每一种外贸函电。 外贸索赔函电中英文范例 20 January 2004 Kee & Co., Ltd 34 Regent Street London, UK Dear Sirs: Thank you for your letter of 20 January 2004. We are disappointed to hear that our price for Flame cigarette lighters is too high for you to work on. You mention that Japanese goods are being offered to you at a price approximately 10% lower than that quoted by us. We accept what you say, but we are of the opinion that the quality of the other makes does not measure up to that of our products. Although we are keen to do business with you, we regret that we cannot accept your counter offer or even meet you half way. The best we can do is to reduce our previous quotation by 2%. We trust that this will meet with your approval.We look forward to hearing from you. Yours faithfully, Tony Smith Chief Seller 先生: 二零零四年元月二十日来函收到,不胜感激。得知贵公司认为火焰牌打火机价格过高,无利可图,本公司极感遗憾。来函又提及日本同类货品报价较其低近百分之十。 本公司认同来函的说法,然而,其他厂商的产品质量绝对不能与本公司的相提并论。 虽然极望与贵公司交易,但该还盘较本公司报价相差极大,故未能接受贵公司定单。 特此调整报价,降价百分之二,祈盼贵公司满意。 谨候佳音。 销售部主任 托尼.斯密思谨上 原文来自必克英语https://www.360docs.net/doc/8d17215435.html,/topic-3036.html

地铁地表沉降外文翻译(适用于毕业论文外文翻译+中英文对照)

外文原文 Surface settlement predictions for Istanbul Metro tunnels excavated by EPB-TBM S. G. Ercelebi ?H. Copur ?I. Ocak Abstract In this study, short-term surface settlements are predicted for twin tunnels, which are to be excavated in the chainage of 0 ? 850 to 0 ? 900 m between the Esenler and Kirazl?stations of the Istanbul Metro line, which is 4 km in length. The total length of the excavation line is 21.2 km between Esenler and Basaksehir. Tunnels are excavated by employing two earth pressure balance (EPB) tunnel boring machines (TBMs) that have twin tubes of 6.5 m diameter and with 14 m distance from center to center. The TBM in the right tube follows about 100 m behind the other tube. Segmental lining of 1.4 m length is currently employed as the final support. Settlement predictions are performed with finite element method by using Plaxis finite element program. Excavation, ground support and face support steps in FEM analyses are simulated as applied in the field. Predictions are performed for a typical geological zone, which is considered as critical in terms of surface settlement. Geology in the study area is composed of fill, very stiff clay, dense sand, very dense sand and hard clay, respectively, starting from the surface. In addition to finite element modeling, the surface settlements are also predicted by using semi-theoretical (semi-empirical) and analytical methods. The results indicate that the FE model predicts well the short-term surface settlements for a given volume loss value. The results of semi-theoretical and analytical methods are found to be in good agreement with the FE model. The results of predictions are compared and verified by field measurements. It is suggested that grouting of the excavation void should be performed as fast as possible after excavation of a section as a precaution against surface settlements during excavation. Face pressure of the TBMs should be closely monitored and adjusted for different zones. Keywords Surface settlement prediction _ Finite element method _ Analytical method _ Semi-theoretical method _ EPB-TBM tunneling _ Istanbul Metro Introduction Increasing demand on infrastructures increases attention to shallow soft ground tunneling methods in urbanized areas. Many surface and sub-surface structures make underground construction works very delicate due to the influence of ground deformation, which should be definitely limited/controlled to acceptable levels. Independent of the excavation method, the short- and long-term surface and sub-surface ground deformations should be predicted and remedial precautions against any damage to existing structures planned prior to construction. Tunneling cost substantially increases due to damages to structures resulting from surface settlements, which are above tolerable limits (Bilgin et al. 2009).

经典外贸函电范文汇总

经典外贸函电范文汇总 外贸函电是一种商务信件,英文foreign correspondence。写外贸函电是外贸业务员的日常工作之一,然而,能写好外贸函电的外贸业务员却不多,为了有助于大家写好外贸函电,本文总结了几个经典外贸函电范文,可供参考。 外贸函电就是有着国际贸易关系的双方由于彼此的业务往来而产生的信件,但在信息化高度发达的今天,该信件并不局限于纸质信件,也可以是电子邮件、传真或MSN。 外贸函电最常用的内容:建立业务关系、询盘、发盘、回复、销售合同、包装、保险、赔偿、仲裁等。 外贸函电基本要求:主题明确,内容简洁,语言精炼,表述完整。 外贸函电的格式:有固定的语言、习惯用法和常用句型。 外贸函电的语气:各部分语气。开发信、询盘回复一般要客气,表达感谢;平常业务联系要细心、信任;催促付款要紧急而不失礼貌;客户索赔要理解、给予足够的解释和说明。 外贸函电范文: 一、如何表达在涨价前订货 Thank you for your letter of October 10 for business copiers. We are now sending you our price-list and catalog of the newest types that are under production and we can supply at once from stock. We want to notice you that prices of copier parts and components have gone up steadily since the second half of the year. Though we have tried hard to keep our quotations down, we are afraid the margin for keeping on going like this will not long. Therefore, we suggest that you will let us have your order before further rises in costs, which will lead to a raise in prices very soon unavoidably. 感谢贵方10月10日关于商用复印机的询函。现随函奉送本公司正在生产的、并有现货供应的最新型号的产品清单和价目表。 我方想告诉贵方,自下半年以来,复印机的零、部件价格一直不断增长。尽管我方尽量压低报价,但恐怕有此余地的时间不会太久。因此,建议贵方在零、部件再次涨价,并不可避免地引起成品涨价之前便向我方订货。

Plaxis中常见问题集锦

1 问:Geo FEM, Plaxis, Z-Soil软件比较?2008/6/5 9:34:48 答:三者针对某个算例计算结果相差不大,误差在可接受范围之内。 就易用性来说,Plaxis好于Z-Soil好于GEO。Plaxis大家都用得很多了,Z-Soil的建模可以在前处理模块中用CAD元素绘制,或者通过dxf文件导入;GEO4只能输入剖面线的坐标,比较烦琐。Plaxis和Z-soil基本可以解决岩土工程所有问题,但GEO4由于建模功能的限制,只能解决隧道、边坡等相关问题;Plaxis和Z-Soil可以进行渗流分析(非饱和)包括流固偶合分析。 总的来说,Plaxis和Z-Soil是专业的岩土工程有限元程序;GEO FEM是GEO4里面的一个工具包,而GEO4类似于国内的理正一样,是遵循Eurocode的设计软件。 2 问:在plaxis中,用折减系数作出它的几个滑裂面,如何查看滑裂面的角度、圆心、半径等 这些滑裂面的相关参数呢? 2008/6/5 9:36:26 答:使用强度折减法,不用假定slip surface,故不会有这些数据。 3 问:Plaxis怎么模拟路堤分步填筑?在实际施工中,填筑不是一次加载的,可能先填一半, 过个月再填一半,而且这一半也不是一次填完,要在几天内完成,请问怎么在Plaxis中模拟,怎 么设置可以反应填筑速率,请高手指教? 2008/6/5 9:47:25 答:手册里有相关例子,你可以参考一下lesson 5。 堆载速率可以通过设置堆载这个stage的时间间隔来设置。如果只有基本模块,可以设置mstage 的数值。mstage=1.0,说明100%施加上去了,mstage=0.1,说明只有10%的荷载。由于Plaxis 不能设置load function,比较麻烦。当然,你可以将一层土细分成几个stage完成,也可以实 现。 4 问:Plaxis 3D 用这个软件分析基坑时,基坑是钢格栅喷混凝土支护,支护用板来模拟,E I和EA中的I和A分别指哪个面的惯性矩和面积,以及单位后面的/m应该是哪个长度? 2008/6/5 9:49:13 答:应该是: A=沿着洞轴方向L×厚度d E是弹性模量 I是惯性矩 5 问:在网上看到有人怀疑Plaxis 3D Foundation和3D Tunnel的真三维性,有人说它们不是 真正的三维计算,有谁知道是怎么回事吗? 2008/6/5 9:59:42 答:Plaxis 3D Tunnel计算内核是三维的。但是目前只支持平面拉伸建模,建附加模型还存在困 难。3D Tunnel的确不能生成复杂的斜交隧道。 3D Foundation是专门解决基础问题的三维有限元计算软件。其解决基础问题要比FLAC3D要专 业,特别是考虑了一些工程实际,但开放性不如FLAC3d。近期3D Foundation将在此方面有重大 改进,新版本前处理借用GID作为前处理工具。Plaxis 系列优点长处是其理论,尤其是hs和 hs-small模型。 6 问:最近在算一个基坑,很好的地质条件,桩、撑刚度都取得很大,居然算出来水平位移始终 都有70mm左右,但用同济启明星算水土分算,并且参数都没有取最大值,算的结果只有17mm左 右。深圳规范要求水平位移不超过30mm,要是用Plaxis是很难算出小于规范值的结果的,事实 上,也不至于有那么大的位移的? 2008/6/5 10:05:32 答:主要问题是现在很多地质报告都不提供三轴的试验参数:例如E50模量,Eur模量,Es模量, 有效强度指标等;土体的本构参数比较特殊,要做特殊的试验,因此一般的项目参数方面的确有 问题。不过,即便是只有Es模量和直剪固快指标,通过换算和引入K0、孔隙比、Cc,Cs等其他 参数,也是可以得到其他需要的参数,不过这需要比较扎实的本构模型方面的知识和岩土工程经 验,知道不同的本构适合模拟什么土层,知道本构的优点和局限性,这对使用者的要求的确比较 高。 7 问:隧道已经组成一个类组,所以一定要对其进行材料定义。如果不定义得话,就不能对其 进行网格划分,这要怎么解决呢? 2008/6/5 10:08:42 答:你是不是只想模拟基坑开挖对既有隧道结构的影响,而省略掉前面隧道开挖过程的模拟。 这样的话,结果恐怕很难正确,而且会碰到你所说的问题。因为隧道在基坑开挖前,有一定的受 力状况,这需要模拟隧道开挖过程才能得到其受力状况,基坑开挖的影响也是在其这个受力状况

外贸函电常用范文

外贸函电书写基本原则 一、Courtesy 礼貌 语言要有礼且谦虚,及时地回信也是礼貌的表现。 例如: We have received with many thanks your letter of 20 May, and we take the pleasure of sending you our latest catalog. We wish to draw your attention to a special offer which we have made in it. You will be particularly interested in a special offer on page 5 of the latest catalog enclosed, which you requested in your letter of 20 May. 二、Consideration 体谅 写信时要处处从对方的角度去考虑有什么需求,而不是从自身出发,语气上更尊重对方。 例如: “You earn 2 percent discount when you pay cash. We w ill send you the brochure next month. ”就比“We allow 2 percent discount for cash payment. We won't be able to send you the brochure this month.” 要好。 三、Completeness 完整 一封商业信函应概况了各项必需的事项,如邀请信应说明时间、地点等,确忌寄出含糊不清的信件。 四、Clarity 清楚意思,表达明确,要注意: (一)避免用词错误: 例如:As to the steamers sailing from Hong Kong to San Francisco, we have bimonthly direct services. 此处bimonthly有歧义:可以是twice a month 或者once two month.故读信者就迷惑了,可以改写为: 1.We have two direct sailings every month from Hong Kong to San Francisco. 2.We have semimonthly direct sailing from Hong Kong to San Francisco. 3.We have a direct sailing from Hong Kong to San Francisco. (二)注意词语所放的位置: 例如: 1. We shall be able to supply 10 cases of the item only. 2. We shall be able to supply 10 cases only of the item. 前者则有两种商品以上的含义。 (三)注意句子的结构: 例如: 1.We sent you 5 samples yesterday of the goods which you requested in your letter of May 20 by air. 2.We sent you, by air, 5 samples of the goods which you requested in your letter of May 20. 五、Conciseness 简洁 (一)避免废话连篇: 例如: 1.We wish to acknowledge receipt of your letter... 可改为:We appreciate your letter...

相关文档
最新文档