text:
# B Derviation of pV=NkT

1. Jun 24, 2016

### Hannah7h

I've attempted to use N=Na*n -where N is that total number of particles of a gas, Na is the Avogadro constant and n is moles. And then attempted to use k=R/Na -where k is the Boltzmann constant and R is the molar gas constant. I got as far as N/n=R/k but then not sure how to get from this to the final equation- if this is even the right way

2. Jun 24, 2016

### nasu

You cannot get the ideal gas law by just manipulating the definition of Avogadro number and its relationship with other constants.
Whereas the definition of Avogadro number's is very general, the ideal gas law is valid only for ideal gases. So you need to start with a model of ideal gas and find a relationship between pressure and other parameters.
For example,try to find how the pressure depends on the concentration of particles and their average speed.
You can find the this done in introductory books on kinetic-molecular theory of gases.

3. Jun 24, 2016

### ZapperZ

Staff Emeritus
Are you trying to convert pV=nRT to pV=NkT?

It would help you are clear on what you want to do, especially on your starting point.

Zz.

4. Jun 24, 2016

### Hannah7h

Ah yeah sorry, it wasn't clear, basically I wanted to know what you would derive pV=nRT from and then how you would derive it from those equations, but also it would be good if you could tell me how to get from pV=nRT to pV=NkT

5. Jun 24, 2016

### Khashishi

The gas constant is just $R=k_B N_a$.

6. Jun 24, 2016

### Tazerfish

I think I know what you are looking for.
First, you make a few assumptions :

• The gas is made up of discrete molecules
• These molecules don't interact with one another
• The gas molecules collide elastically with the walls of the container
• The gas molecules occupy no relevant Volume
• The gas molecules move equally in all three dimensions
I am just gonna stop here because I remembered a video on this:

The derivation starts at 9 minutes

7. Jun 25, 2016

### Hannah7h

Ohhh ok, I see how its done now, thank you

8. Jun 25, 2016


text:
# [Tugindia] Text wrapping in table

Kannan Moudgalya kannan at iitb.ac.in
Tue Jun 28 11:43:05 CEST 2011

Manjusha Joshi wrote:
> \begin{tabular}{|p{2cm}|}
>   Aerospace \\ Engineering
> \end{tabular}
> is working.
>
> If want to add more columns, accordingly width of the words adjust width of
> the column.
> Please send brief code  that will help to understand the problem.
> Best wishes,
I am also interested in this usage, so tried out the following code, but
it is not doing what I thought I understood from the above.  I wanted
three columns in this Table, first column having Test, the second column
Aerospace Engineering and the third column, the word Blank.  Am I making
a mistake?

Kannan

\begin{tabular}{|c|p{2cm}|r|} \hline
Test & Aerospace \\ Engineering & Blank \\ \hline
\end{tabular}

format: plain


text:
# What equations are affected by Lorentz Transformations

Many equations are affected by Lorentz transformations. Time, mass, volume of a moving object, momentum, force etc. I want to know if the following equations are affected by Lorentz transformations:

1. Distance=velocity*time (r=vt)
2. E=hv
3. j*=ot
4. F=G*m1*m2/r^2

Also, is the Newton's Theory of Universal gravitation affected by General Relativity?

## Answers and Replies

Related Special and General Relativity News on Phys.org
Pengwuino
Gold Member
I'm not sure what your third equation is but the first one is obviously changed as the time is modified. The second one, I assume you mean $E = \hbar \omega$ which is also modified because the angular frequency is modified. This causes red/blue-shifts. Newton's law of gravitation is modified as well because of the length contraction.

However, Lorentz transformations are a feature of special relativity. General relativity is not so simple.

jtbell
Mentor
Also, is the Newton's Theory of Universal gravitation affected by General Relativity?
General Relativity replaces Newton's theory of gravitation.

bcrowell
Staff Emeritus
Gold Member
I think Pengwuino's analysis is correct as far as chages in the values of the variables. But if the OP intended to ask about changes in the forms of the equations, then the form of 1 and 2 is frame-invariant.

I'm not sure what your third equation is...
Oops. I meant it to be j*=ot^4 where j* is the power radiated and o is sigma, the stefan's constant.

However, Lorentz transformations are a feature of special relativity. General relativity is not so simple.
So $$F=G\frac{{m}_{1}{m}_{2}}{{r}^{2}}$$ is changed in General Relativty also?

...the first one is obviously changed as the time is modified. The second one, I assume you mean $E = \hbar \omega$ which is also modified because the angular frequency is modified. This causes red/blue-shifts. Newton's law of gravitation is modified as well because of the length contraction.
Thanks.

General Relativity replaces Newton's theory of gravitation.
So, $$F=G\frac{{m}_{1}{m}_{2}}{{r}^{2}}$$ is changed in General Relativty?

Last edited:
Pengwuino
Gold Member
So, $$F=G\frac{{m}_{1}{m}_{2}}{{r}^{2}}$$ is changed in General Relativty?
Yes, it no longer makes sense to speak of forces in GR.

Yes, it no longer makes sense to speak of forces in GR.
But in modern physics, string theory does talk about gravity as a force, right? And in string theory,

$$F=G\frac{{m}_{1}{m}_{2}}{{r}^{2}}$$

is still correct right?

Pengwuino
Gold Member
But in modern physics, string theory does talk about gravity as a force, right? And in string theory,

$$F=G\frac{{m}_{1}{m}_{2}}{{r}^{2}}$$

is still correct right?
No it isn't.

bcrowell
Staff Emeritus
Gold Member
Dimension10, relativity isn't just a matter of putting fudge factors in equations. If you want to learn some relativity, some good books are (from easiest to hardest):

Takeuchi, An Illustrated Guide to Relativity
Mermin, It's About Time: Understanding Einstein's Relativity
Taylor and Wheeler, Spacetime Physics

Dimension10, relativity isn't just a matter of putting fudge factors in equations. If you want to learn some relativity, some good books are (from easiest to hardest):

Takeuchi, An Illustrated Guide to Relativity
Mermin, It's About Time: Understanding Einstein's Relativity
Taylor and Wheeler, Spacetime Physics
Thanks. I have also read the paper itself but I can't really find his equation for the Gravitational force...

bcrowell
Staff Emeritus


text:
## On the Schwarz symmetry principle in a model case.(English)Zbl 0919.32011

Let $$f:M\rightarrow M'$$ be a $$C^{\infty}$$-smooth CR diffeomorphism between real analytic, holomorphically non degenerate hypersurfaces in $$\mathbb{C^n}$$, which is holomorphic on one side of $$M$$. The authors establish the Schwarz symmetry principle in case $$M'$$ is in addition rigid and polynomial. It is not required that $$M$$ be algebraic.

### MSC:

 32H02 Holomorphic mappings, (holomorphic) embeddings and related questions in several complex variables 32C05 Real-analytic manifolds, real-analytic spaces 32V99 CR manifolds
Full Text:


text:
Now showing items 1-20 of 27

• #### Alternative iterative methods for nonexpansive mappings, rates of convergence and applications

[OWP-2009-19] (Mathematisches Forschungsinstitut Oberwolfach, 2009)
Alternative iterative methods for a nonexpansive mapping in a Banach space are proposed and proved to be convergent to a common solution to a fixed point problem and a variational inequality. We give rates of asymptotic ...
• #### Approximation of discrete functions and size of spectrum

[OWP-2009-17] (Mathematisches Forschungsinstitut Oberwolfach, 2009-03-11)
Let $\Lambda \subset \mathbb{R}$ be a uniformly discrete sequence and $S \subset \mathbb{R}$ a compact set. We prove that if there exists a bounded sequence of functions in Paley-Wiener space $PW_s$, which approximates ...
• #### Classification of idempotent states on the compact quantum groups Uq(2), SUq(2) and SOq(3)

[OWP-2009-08] (Mathematisches Forschungsinstitut Oberwolfach, 2009-03-02)
• #### Proof mining in metric fixed point theory and ergodic theory

[OWP-2009-05] (Mathematisches Forschungsinstitut Oberwolfach, 2009)
In this survey we present some recent applications of proof mining to the fixed point theory of (asymptotically) nonexpansive mappings and to the metastability (in the sense of Terence Tao) of ergodic averages in uniformly ...


text:
# What is the slope of the line normal to the tangent line of f(x) = cscx-sec^2x +1  at  x= (17pi)/12 ?

Jun 2, 2018

$y = - 1 \left(6 \cdot \sqrt{6}\right) \cdot x + \frac{1}{432} \cdot \left(432 + 864 \cdot \sqrt{2} + 17 \cdot \sqrt{6} \cdot \pi\right)$

#### Explanation:

We get
$f ' \left(x\right) = - \cot \left(x\right) \cdot \csc \left(x\right) - \sec \left(x\right) \cdot \tan \left(x\right)$
so
$f ' \left(17 \cdot \frac{\pi}{12}\right) = 6 \cdot \sqrt{6}$
and the slope of the normal line is given by
${m}_{N} = - \frac{1}{6 \cdot \sqrt{6}}$
and
$f \left(\frac{17}{12} \cdot \pi\right) = 1 + 2 \sqrt{2}$
From the equation

$1 + 2 \sqrt{2} = - \frac{1}{6 \cdot \sqrt{6}} \cdot \frac{17}{12} \cdot \pi + n$
we get
$n = \frac{1}{432} \cdot \left(432 + 864 \cdot \sqrt{2} + 17 \cdot \sqrt{6} \cdot \pi\right)$


text:
# Multi-dimensional permanent

Is there a particularly natural / "correct" way of generalizing permanents to tensors? (I mean of course, 'square' tensors.) There seem to be very few resources on the matter. There needs to be a replacement for considering the permutations from one index. For a rank $k$ tensor, some sources seem to take $k-1$ permutations $\sigma_i$ and then multiply over the indices $A_{i,\sigma_1(i),\sigma_2(i)\dots \sigma_{k-1}(i)}$. For instance, Multi-dimensional permanent of structured tensor uses them this way.

Alternately, we can think of the permanent's permutations as providing a "map" from one index to another -- this is particularly relevant in graph theory where it describes a path from one vertex to another -- so there it seems more reasonable to sum over arrays $M$. Each array $M$ has $k-1$ indices, and contains values in the range $1\dots d$ (where $d$ is the number of rows etc in the tensor). I think require that all rows columns etc. in this array are orthogonal: if I change one index in $M$ then I change the value. There is at least one source, http://www.sciencedirect.com/science/article/pii/0024379587903119 that considers these and calls them "$s$-permanents", although I admit I'm not clear why this name. The source https://arxiv.org/pdf/1101.3629.pdf also refers to them as the permanent, without any particular name.

Can anyone explain what the salient differences of these two are? I'm trying to interpret permanents on hypergraphs, and to me, these $s$-permanents seem to be the more natural construction. Is there an immediate rational for the former definition? Maybe in terms of their relation to determinants?

Indeed, there is no generally accepted definition of the permanent of multidimensional tensor (or matrix) yet. I suppose that the basic definition of the permanent of a $d$-dimensional matrix $A$ of order $n$ is the sum over all permutations $\sigma_1, \ldots, \sigma_{d-1} \in S_n$ of products $\prod\limits_{i=1}^n a_{i, \sigma_1(i), \ldots, \sigma_{d-1}(i)}$. I also mention that the paper https://arxiv.org/pdf/1101.3629.pdf uses the same definition of the permanent.
Concerning hypergraphs, the permanent of a $d$-dimensional $(0,1)$-matrix could be interpreted as the number of perfect matchings in a $d$-uniform $d$-partite hypergraph and it is connected with the number of perfect matchings in a general $d$-uniform hypergraph. It is also related to the number of some combinatorial structures, for example, to the number of transversals in latin squares and hypercubes.
$s$-permanent from http://www.sciencedirect.com/science/article/pii/0024379587903119 for $s=1$ coincides with the previous definition. For $s=d-1$ the $s$-permanent of a $d$-dimensional matrix $A$ of order $n$ is the sum over all sets $D$ of $n^{d-1}$ entries such that each line ($1$-dimensional plane) of $A$ contains exactly one element from $D$ of products $\prod\limits_{a_{i_1, \ldots, i_d \in D}} a_{i_1, \ldots, i_{d}}$. For $1 < s < d-1$ the $s$-permanent of a $d$-dimensional matrix may not exist. It will be interesting what does the $s$-permanent mean for hypergraphs.


text:
# Decision Trees

Decisions trees operate by asking a series of successive questions about the data until it narrows the information down well enough to make a suggestion.

### App Preferences from Demographic Data Example

As an example, consider a table of characteristics about people and their favorite app.

Between Gender and Occupation, the characteristic of the people that is “more decisive” for predicting what app the people will prefer is Occupation. Specifically, all students preferred the Pokemon Go app, as opposed to SnapChat and WhatsApp, the other options. Among people who work, the Gender classification can help us to determine which of the two apps they will prefer. This structure is captured in the following decision tree.

The next question: how do we get the computer to “learn” this decision tree structure from the data itself?

Suppose that students are accepted or denied to a university based upon a combination of grade and test data. Suppose that we have the following distribution of applicants to a university.

Would a horizontal line (Grade) or vertical line (Test) better split the data?

From inspection, the vertical line would better split the data, so the decision tree should begin with a filter on Test.

But, we can do better. By beginning with a filter on Test >= 5 then applying the criterion Grade >= 7 or Grade >= 2, depending upon the first criterion, we can split the data perfectly. Graphically, the space is split like the following.

And, the decision tree looks like the following.

### Entropy

Entropy, in the context of probability, relates to the number of possible configurations that a given set of labeled data can take. Specifically, the more homogeneous a set is, the less entropy the set has. The set of four red balls can only be arranged one way, so it has relatively low entropy. The set of two red and two blue balls can be arranged six different ways, so it has relatively high entropy.

#### Entropy versus Prior Knowledge

Entropy is the exact opposite of prior knowledge based on the set composition. For example, in a situation where all four alls are red, we have perfect knowledge about which classification a single ball would be. In the case where the balls are evenly split between red and blue, we have relatively imperfect knowledge about which color a randomly selected ball would be.

### Example from Set Probabilities

Consider a situation where we are given a set of four balls, three of which are red, and one of which is blue. What is the probability that four randomly-drawn balls (with replacement) will match the original configuration of the balls?

We calculate $P(R)=0.75$ and $P(B)=0.25$, so then

$$P(R,R,R,B)=0.75 \times 0.75 \times 0.75 \times 0.25 = 0.105$$

Similarly, we can fill in the rest of this table for the other configurations.

These probabilities are converted to entropy values by calculating $-log_2 (P(winning))$ and then dividing by the size of the set, resulting in the table below.

As a further example, consider a set of 8 total balls, 5 of which are red and 3 of which are blue.

Then, the entropy is given by

$$Entropy = - \frac{5}{8} log_2 (\frac{5}{8}) - \frac{3}{8} log_2 (\frac{3}{8}) = 0.9544$$

Finally, for the even more general case of $m$ red balls and $n$ blue balls

$$Entropy = - \frac{m}{m+n} log_2 (\frac{m}{m+n}) - \frac{n}{m+n} log_2 (\frac{n}{m+n})$$

For an example of 4 red balls and 10 blue balls:

$$Entropy = - \frac{4}{4+10} log_2 (\frac{4}{4+10}) - \frac{10}{4+10} log_2 (\frac{10}{4+10}) = 0.863$$

### Entropy in Terms of Probabilities

The formula for entropy, above, can be rewritten in terms of the probabilities of each occurrence, as follows. Let $p_1$ stand for the probability of drawing a red ball, and $p_2$ stand for the probability of drawing a blue ball.

$$p_1 = \frac{m}{m+n};\ \ \ p_2 = \frac{n}{m+n}$$

The entropy formula can then be rewritten as

$$entropy = -p_1 log_2 (p_1) - p_2 log_2 (p_2)$$

This formula can be extended to the multi-class case, where there are three or more possible values:

$$entropy = - p_1 log_2 (p_1) - p_2 log_2 (p_2) - … - p_n log_2 (p_n) = \sum_{i=1}^n p_i log_2 (p_i)$$

Note the minimum is still 0 when all elements are the same value. The maximum is still achieved when the outcome probabilities are the same, but the upper limit increases with the number of different outcomes.

For example, consider an example with 8 red balls, 3 blue balls, and 2 yellow balls.

$$p_r = \frac{8}{13} = 0.615;\ \ \ p_b = \frac{3}{13} = 0.231;\ \ \ p_y = \frac{2}{13} = 0.154$$

$$entropy = - p_r log_2 (p_r) - p_b log_2 (p_b) - p_y log_2 (p_y) = 1.335$$

### Information Gain

Information Gain is defined as a change in entropy.

From left to right, there is a small information gain, a medium information gain, and a large information gain.

More specifically, the information gain of a given split on the data is the difference between the entropy of the parent set and the weighted average entropy of the children sets, following the split. For $m$ items in the first child group and $n$ items in the second child group, the information gain is:

$$Information\ Gain = Entropy(Parent) - [\frac{m}{m+n} Entropy(Child_1) + \frac{n}{m+n} Entropy(Child_2)]$$

### Applying Information Gain to the App Preferences Example

The entropy of the starting set, above, is 1.46.

Following a split on gender, the average weighted entropy of the child sets is 0.92. So, the information gain is $1.46-0.92=0.54$.

Following a split on occupation, the average weighted entropy of the child sets is 0.46. So, the information gain is $1.46-0.46=1.00$. This provides quantitative backup for the intuition we had earlier: splitting on occupation is the best first split.

A decision tree that perfectly classifies the app preferences is shown below.

### Decision Tree Hyperparameters

#### Maximum Depth

The max_depth of a decision tree is the largest length between the root and the leaf.

A large depth can cause overfitting, since a tree that is too deep can memorize the data. On the other hand, a small depth can result in very simple model which may be overfit.

#### Minimum Number of Samples to Split

A node must have at least min_samples_split in order to be large enough to split. If a node has fewer, the splitting process stops. Note that min_samples_split does not control the minimum size of leaves.

A small minimum samples per split may result in a complicated, highly branched tree which may mean the tree has memorized the data. A large minimum samples parameter may result in the tree not having enough flexibility to get built, which may result in underfitting.

#### Minimum Number of Samples per Leaf

Tbe min_samples_leaf hyperparameter exists to ensure that the decision tree does not end up with 99 samples in one leaf and 1 in the other. If a threshold on a feature results in a leaf that has fewer than min_samples_leaf, the algorithm will not allow the split. But, it may perform a split on the same feature at a different threshold that does satisfy min_samples_leaf.

min_samples_per_leaf accepts both integers and floats. If an integer is provided, the parameter is taken as the number of samples per leaf. If a float is provided, the parameter is taken as the smallest fraction of overall samples in the dataset (for example, 0.10 = 10%).


text:
## True Explicit

MOOSE has had an explicit-euler option for a long time. Unfortunately, it still involved a lot of the nonlinear solution algorithm and included a linear solve using the mass matrix. Now a true Explicit capability has been merged into MOOSE. This new capability differentiates itself by being extremely lean and fast and providing the ability for lumped-mass explicit updates that don't even need to solve a linear system. For more information see ActuallyExplicitEuler

## Vector Finite Elements

MOOSE now supports vector finite elements. Currently available element types are LAGRANGE_VEC and NEDELEC_ONE. The former is equivalent to a vector of scalar LAGRANGE elements and is useful in applications like tensor mechanics or Navier-Stokes in which the user would have to specify multiple kernel blocks for displacement or velocity components. NEDELEC_ONE elements are specifically tailored for PDEs involving curl operators such as Maxwell's equations. Introductory examples can be found in the MOOSE test suite (/test/tests/kernels/vector_fe).

## Control System Improved

The Controls System was updated to improve performance and usability. With respect to performance all parameters that are declared as controllable are cached during object creation. This allows retrieval to be more efficient and easier; previously every object and parameter was interrogated with every call to change it. With respect to usability, the ControllableParameter objects are no longer templates, only the get/set methods on this object require a template argument. This allows for Control objects to be generic, for example the SamplerReceiver now allows for vector parameters to be modified.

## Hypre Documentation

Not really a new capability in MOOSE: but still important! A new set of documentation about how to use the Hypre BoomerAMG Preconditioner has been developed. The document goes over both basic and advanced usage and is a must read for anyone regularly using Hypre. Here is a direct link but you can always get to it from the Application Development page.

## Debugging

Debugging MOOSE-based executables (especially in parallel) got a large upgrade this month. It is now straightforward to start a MOOSE-based solve and have it pop up interactive debugging windows that are attached to each MPI process using --start-in-debugger. For larger jobs, --stop-for-debugger, gives you time to attach to whatever processor you wish. For more information see Debugging.

## WorkBalance, StatisticsVectorPostprocessor and VectorPostprocessorVisualization

A new capability has been merged that allows for better inspection of work balance (or imbalance!) in parallel. The WorkBalance VectorPostprocessor will output many different metrics detailing how much work and communication each MPI process is doing. For more information see WorkBalance

In order to understand the output of WorkBalance you can use the new StatisticsVectorPostprocessor. It allows you to compute aggregate statistics of another VPP (like WorkBalance) such as: min, max, average, stddev, etc.

In addition, if you would like to visualize a VPP where the vectors are n_procs in length you can use the VectorPostprocessorVisualizationAux AuxKernel. For instance, this can be used to visualize the num_elem vector from WorkBalance so you can visually inspect the performance of your partitioner.

## MOOSE base reorganization

In case you haven't noticed, MOOSE went through a signficant reorganization. The main activity was moving files out of base and creating new subdirectories like loops, systems, problems, etc. The base directory had outgrown itself - and it was time for some spring cleaning! In addition to better organization this also sped up compile times on laptops by 25% (even beyond the huge speedup gained by Unity Builds).

## Custom Line Searches

MOOSE now allows implementation of custom line-searches for custom non-linear solution algorithms. Users wishing to create their own line search have to inherit from the LineSearch class and override the lineSearch method. A demonstration of a custom line search implementation can be found in the PetscContactLineSearch; this class will cut the line search parameter (lambda) up to a specified number of times as long as the residual is decreasing. This is effectively an intermediate between basic and bt line-searches: it performs a search to reduce the residual but will allow temporary increases in the non-linear residual. Moreover, while the contact set is changing early in the non-linear solve, a custom linear tolerance can be set in order to avoid over-solving.

## Mesh Splitting

Functionality for an automated pre-split mesh workflow for use with distributed mesh has been implemented. This allows large meshes to be easily partitioned and split into configurations for performing parallel runs on specific numbers of processors. This helps reduce memory usage and drastically speed up setup/initialization time among other improvements.

## Parameter-specific Error Messages

When performing input parameter specific error checking for your moose objects and actions, consider using the new paramError and paramWarning functions. These functions act like mooseError and mooseWarning, except they take an extra argument specifying an input parameter name that is used to annotate the error/warning output with relevant input-file location information. For example:

MyObject::MyObject(InputParameters & params)
{
if (getParam<int>("foo") < 42)
paramError("foo", "value must be greater than or equal to 42);
}

Would give users an error like:

yourinput.i:23: (UserObjects/yourobject/foo) value must be greater than or equal to 42

where 23 is the line number in the input file.

## Parameter Error Checking

Additional checking has been implemented that warns when moose object parameters are set without ever having been specified in the validParams functions. This prevents setting parameters in-code that end up being silently ignored by the destination object - which happens sometimes due to typos or merting multiple parameters before object creation among other ways. The error messages look like this:

Attempted to set unregistered parameter(s) for YourObject object:
foo, bar, foobar, etc.

## Plugin for XFEM Result Visualization in ParaView

The MOOSE XFEM module allows for arbitrary mesh-independent discontinuities to be represented in a finite element model using the extended finite element method (XFEM). The simulation results from this technique require some additional processing to be correctly visualized because the technique generates pairs of overlapping elements that need to be clipped to show only the physically relevant parts of the solution.

A plugin for visualizing results generated using that technique has been merged into the master branch of the open-source ParaView visualization tool. This plugin has been openly available for some time on github, but to use it, it was necessary to build ParaView from source. Now that this plugin is part of ParaView, it is available in its nightly builds, and will be part of the upcoming 5.6 release. This plugin can be enabled within ParaView by selecting Tools->Manage Plugins->MooseXfemClip, selecting the Auto Load option, and then restarting ParaView. If the results of a MOOSE-based model using XFEM are loaded, this filter can be applied by selecting Filters->Alphabetical->MooseXfemClip.


text:
# PreCalc - Ellipses

by Tokimasa
Tags: ellipses, precalc
 P: 17 My math teacher has been out for 2 days and the subs have just been putting notes up and I'm totally not getting this. So maybe someone here can explain everything in other ways. Note that my book does a crappy job of explaining this subject. But it does break it down into two distince areas - Ellipses Centered at (0,0) and Ellipses Centered at (h,k). Ellipses Centered at (0,0) According to my book, there are 6 points that make up an ellipses. V and V' are the vertices of the ellipse where V has the coordinates (a,0) and V' has the coordinates (-a,0). The points m and m' represent the points on the minor axis of the array and have the coordinates (0,b) and (0,-b) respectivally. The ellipse also has two foci (F and F') located at (c,0) and (-c,0). The value "a" represents the distance from the center of the array to the vertex on the major axis. The value "b" is the distance from the center to the vertex on the minor axis. The value "c" represents the distance from the center to the focus. The book also goes on to give the equation of an ellipse is (x^2/a^2) + (y^2/b^2) = 1 and gives the formula a^2 = b^2 + c^2 for finding the value of c (which turns into c^2 = abs(a^2 - b^2)). The book goes on to say that you must set up the formulas such that a^2 > b^2. But that doesn't make any sense. I try to plug everything in for an ellipse that I know has a major axis on the y axis (meaning it is vertical) yet when I graph it, it looks like it's horizontal (its major axis was on the x axis). So can someone explain a universal method for solving problems involving ellipses centered at (0,0)? Ellipses Centered at (h,k) Most of the questions that I had for ellipses centered at (0,0) apply here, but I have some more questions. Exactly what do these steps mean:(1) collext x terms/y terms on one side (2) get constant on the other side (3) complete the square (4) factor (5) divide to get a constant of 1
 HW Helper P: 2,280 An elipse is a geometrical place (It means that constituents points of the curve satisfy a condition or more) of a point that moves in the plane in such a way that the sum of its distance to two fixed points (focal points) is always constant and bigger than the distance between both fixed points. Such distance will be equal to the major axis of the ellipse. This means that the distance between a F' focal point to a point (x,y) + the distance from the other F focal point to the same point (x,y) is constant (2a = Major axis). From that you can derive the Ellipse Equation, or relation F(x,y). The proof is at http://mathworld.wolfram.com/Ellipse.html An ellipse at (h,k) it's just a Ellipse at (0,0) that has geometrical transformation, a traslational one. So you can simply add the focus, major axis, minor axis, center, and then do the traslational transformation by adding the coordinates (h,k) to each of the points.
 Mentor P: 7,291 It is not clear what your trouble with the first part is, seems to me you have a pretty good handle on it. Perhaps you could post your work, we may be able to give more specific help. As for the second question. In general the equation for an ellipse not centered on the origin will have the form $$ax^2 + bx + c + dy^2 +ey + f =0$$ As given in your problems it may not be ordered as above. So your first task is to rearange terms to get the above form. note that this is simply the general form of a quadradic equations in x and y, Next you will need to express it in the general form of an elipse: $$\frac {(x-h)^2} {a^2} + \frac {(y-k)^2} {b^2} = 1$$ To get from the first to second form you may need to complete the squares in each of the x and y equations. When that is done you will have something like this $$C_1 (x-h)^2 + C_2 + C_3(y-k)^2 + C_4 =0$$ Where the $C_n$ are different constants. Now move the constants I have called $C_2$ and $C_4$ to the right hand side, then divide both sides by $C_2 + C_4$ to get the standard form.
P: 17

## PreCalc - Ellipses

Other than graphing, how do you determine the orientation of the major axis of an ellipse? I've been solving for y and using my TI calc.

How do you solve for c?

When you have a, b, and c - How do you determine exactly where the points lie? (a,0) won't work for a vertical ellipse. So do you just flip it to (0,a)? Or is there a method that works? My problem is finding the specific points that make up the ellipse (F, V, m).
 HW Helper P: 2,280 The orientation fo ellipse can be obtained by looking at the equation in the standard form $$\frac{(x-h)^2}{a^2} + \frac{(y-k)^2}{b^2} = 1$$ Where a is, gives you the orientation, in my example, The ellipse will have a horizontal major axis. Can you post an example you are having problem to locate the points? It will make it easier.
 HW Helper P: 2,280 My advice for Ellipses centered at (h,k) is to solve it as it was centered at (0,0) and then do a traslational transformation to each of the points of the elements of the elipse (Major Axis, Minor Axis, Focal Points) to the coordinates (h,k).
 P: 17 So what formula should I use to find c? My choices are (c^2 = abs(a^2 - b^2)) or the original formula that requires a^2 > b^2 which is (a^2 = b^2 + c^2).
 HW Helper P: 2,280 Use $c^{2} = a^2 - b^2$ with the condition $a>b$
 P: 17 You people have been helpful. But I didn't see an answer to one of my questions. When you have a, b, and c - How do you determine exactly where the points lie? (a,0) won't work for a vertical ellipse. So do you just flip it to (0,a)? Or is there a method that works? My problem is finding the specific points that make up the ellipse (F, V, m).
 HW Helper P: 2,280 If it's centered at the origin, i don't see a problem finding the points, they are basicly the distances, because the curve cuts the x and y axis.
 HW Helper P: 2,280 For Example let's suppose $$\frac{(x-9)^2}{36} + \frac{(y-6)^2}{9} = 1$$ We do it as it's centered at the origin so $$a = 6$$ $$b = 3$$ $$c = \sqrt{27} = 3 \sqrt{3}$$ The ellipse is horizontal therefore For the major axis the points are (6,0) and (-6,0) For the minor axis the points are (0,3) and (0,-3) For the focal points ($3 \sqrt{3}$,0) and ($-3 \sqrt{3}$,0) Now we do a tralastion transformation we know the actual center for the ellipse is (9,6) So each of the points of its elements are actually located at For the major axis the points are (6+9,6) and (-6+9,6) For the minor axis the points are (9,3+6) and (9,-3+6) For the focal points (9 + $3 \sqrt{3}$,6) and (9 + $-3 \sqrt{3}$,6)

 Related Discussions General Physics 18 Academic Guidance 9 Precalculus Mathematics Homework 12 Introductory Physics Homework 2 Introductory Physics Homework 7


text:
# Probability - an Experimental Approach

#### notes

The likelihood of something  happening is called the probability.
Terms related to probability:

Experiment :
An activity which produces an outcome or result is called an experiment.

random Experiment :  An Experiment in which exact outcome cannot be predicted in advance.
For example:
1) rolling a dice
2) Drawing a card from well-shuffled pack of playing cards
3) Tossing a coin

Trial :  Performing an experiment is called a trial.

Event :  Each possible outcomes of an experiment is called event.

Probability of an event : In a random experiment if 'n' is the total number of trials, then the empirical probability of the event E is P(E).

P(E) =

"Number of trials happened in which event happened" / " Total number of trials"

i.e. P(E) ="Number of trials happened in which event happened" / n

The Probability of an event lies between 0 and 1 (0 and 1 inclusive).

If you would like to contribute notes or other learning material, please submit them using the button below.

### Shaalaa.com

Probability Experimental Approach [00:16:03]
S
0%


text:
# Averaging Schemes¶

Given a set of mineral physics parameters and an equation of state we can calculate the density, bulk, and shear modulus for a given phase. However, as soon as we have a composite material (e.g., a rock), the determination of elastic properties become more complicated. The bulk and shear modulus of a rock are dependent on the specific geometry of the grains in the rock, so there is no general formula for its averaged elastic properties. Instead, we must choose from a number of averaging schemes if we want a single value, or use bounding methods to get a range of possible values. The module burnman.averaging_schemes provides a number of different average and bounding schemes for determining a composite rock’s physical parameters.

## Base class¶

class burnman.averaging_schemes.AveragingScheme[source]

Bases: object

Base class defining an interface for determining average elastic properties of a rock. Given a list of volume fractions for the different mineral phases in a rock, as well as their bulk and shear moduli, an averaging will give back a single scalar values for the averages. New averaging schemes should define the functions average_bulk_moduli and average_shear_moduli, as specified here.

average_bulk_moduli(volumes, bulk_moduli, shear_moduli)[source]

Average the bulk moduli $$K$$ for a composite. This defines the interface for this method, and is not implemented in the base class.

Parameters: volumes : list of floats List of the volume of each phase in the composite. $$[m^3]$$ bulk_moduli : list of floats List of bulk moduli of each phase in the composite. $$[Pa]$$ shear_moduli : list of floats List of shear moduli of each phase in the composite. $$[Pa]$$ K : float The average bulk modulus $$K$$. $$[Pa]$$
average_shear_moduli(volumes, bulk_moduli, shear_moduli)[source]

Average the shear moduli $$G$$ for a composite. This defines the interface for this method, and is not implemented in the base class.

Parameters: volumes : list of floats List of the volume of each phase in the composite. $$[m^3]$$ bulk_moduli : list of floats List of bulk moduli of each phase in the composite. $$[Pa]$$ shear_moduli : list of floats List of shear moduli of each phase in the composite. $$[Pa]$$ G : float The average shear modulus $$G$$. $$[Pa]$$
average_density(volumes, densities)[source]

Average the densities of a composite, given a list of volume fractions and densitites. This is implemented in the base class, as how to calculate it is not dependent on the geometry of the rock. The formula for density is given by

$\rho = \frac{\Sigma_i \rho_i V_i }{\Sigma_i V_i}$
Parameters: volumes : list of floats List of the volume of each phase in the composite. $$[m^3]$$ densities : list of floats List of densities of each phase in the composite. $$[kg/m^3]$$ rho : float Density $$\rho$$. $$[kg/m^3]$$
average_thermal_expansivity(volumes, alphas)[source]

thermal expansion coefficient of the mineral $$\alpha$$. $$[1/K]$$

average_heat_capacity_v(fractions, c_v)[source]

Averages the heat capacities at constant volume $$C_V$$ by molar fractions as in eqn. (16) in [IS92].

Parameters: fractions : list of floats List of molar fractions of each phase in the composite (should sum to 1.0). c_v : list of floats List of heat capacities at constant volume $$C_V$$ of each phase in the composite. $$[J/K/mol]$$ c_v : float heat capacity at constant volume of the composite $$C_V$$. $$[J/K/mol]$$
average_heat_capacity_p(fractions, c_p)[source]

Averages the heat capacities at constant pressure $$C_P$$ by molar fractions.

Parameters: fractions : list of floats List of molar fractions of each phase in the composite (should sum to 1.0). c_p : list of floats List of heat capacities at constant pressure $$C_P$$ of each phase in the composite. $$[J/K/mol]$$ c_p : float heat capacity at constant pressure $$C_P$$ of the composite. $$[J/K/mol]$$

## Voigt bound¶

class burnman.averaging_schemes.Voigt[source]

Class for computing the Voigt (iso-strain) bound for elastic properties. This derives from burnman.averaging_schemes.averaging_scheme, and implements the burnman.averaging_schemes.averaging_scheme.average_bulk_moduli() and burnman.averaging_schemes.averaging_scheme.average_shear_moduli() functions.

average_bulk_moduli(volumes, bulk_moduli, shear_moduli)[source]

Average the bulk moduli of a composite $$K$$ with the Voigt (iso-strain) bound, given by:

$K_V = \Sigma_i V_i K_i$
Parameters: volumes : list of floats List of the volume of each phase in the composite. $$[m^3]$$ bulk_moduli : list of floats List of bulk moduli $$K$$ of each phase in the composite. $$[Pa]$$ shear_moduli : list of floats List of shear moduli $$G$$ of each phase in the composite. Not used in this average. $$[Pa]$$ K : float The Voigt average bulk modulus $$K_V$$. $$[Pa]$$
average_shear_moduli(volumes, bulk_moduli, shear_moduli)[source]

Average the shear moduli of a composite with the Voigt (iso-strain) bound, given by:

$G_V = \Sigma_i V_i G_i$
Parameters: volumes : list of floats List of the volume of each phase in the composite. $$[m^3]$$ bulk_moduli : list of floats List of bulk moduli $$K$$ of each phase in the composite. Not used in this average. $$[Pa]$$ shear_moduli : list of floats List of shear moduli $$G$$ of each phase in the composite. $$[Pa]$$ G : float The Voigt average shear modulus $$G_V$$. $$[Pa]$$
average_density(volumes, densities)

Average the densities of a composite, given a list of volume fractions and densitites. This is implemented in the base class, as how to calculate it is not dependent on the geometry of the rock. The formula for density is given by

$\rho = \frac{\Sigma_i \rho_i V_i }{\Sigma_i V_i}$
Parameters: volumes : list of floats List of the volume of each phase in the composite. $$[m^3]$$ densities : list of floats List of densities of each phase in the composite. $$[kg/m^3]$$ rho : float Density $$\rho$$. $$[kg/m^3]$$
average_heat_capacity_p(fractions, c_p)

Averages the heat capacities at constant pressure $$C_P$$ by molar fractions.

Parameters: fractions : list of floats List of molar fractions of each phase in the composite (should sum to 1.0). c_p : list of floats List of heat capacities at constant pressure $$C_P$$ of each phase in the composite. $$[J/K/mol]$$ c_p : float heat capacity at constant pressure $$C_P$$ of the composite. $$[J/K/mol]$$
average_heat_capacity_v(fractions, c_v)

Averages the heat capacities at constant volume $$C_V$$ by molar fractions as in eqn. (16) in [IS92].

Parameters: fractions : list of floats List of molar fractions of each phase in the composite (should sum to 1.0). c_v : list of floats List of heat capacities at constant volume $$C_V$$ of each phase in the composite. $$[J/K/mol]$$ c_v : float heat capacity at constant volume of the composite $$C_V$$. $$[J/K/mol]$$
average_thermal_expansivity(volumes, alphas)

thermal expansion coefficient of the mineral $$\alpha$$. $$[1/K]$$

## Reuss bound¶

class burnman.averaging_schemes.Reuss[source]

Class for computing the Reuss (iso-stress) bound for elastic properties. This derives from burnman.averaging_schemes.averaging_scheme, and implements the burnman.averaging_schemes.averaging_scheme.average_bulk_moduli() and burnman.averaging_schemes.averaging_scheme.average_shear_moduli() functions.

average_bulk_moduli(volumes, bulk_moduli, shear_moduli)[source]

Average the bulk moduli of a composite with the Reuss (iso-stress) bound, given by:

$K_R = \left(\Sigma_i \frac{V_i}{K_i} \right)^{-1}$
Parameters: volumes : list of floats List of the volume of each phase in the composite. $$[m^3]$$ bulk_moduli : list of floats List of bulk moduli $$K$$ of each phase in the composite. $$[Pa]$$ shear_moduli : list of floats List of shear moduli $$G$$ of each phase in the composite. Not used in this average. $$[Pa]$$ K : float The Reuss average bulk modulus $$K_R$$. $$[Pa]$$
average_shear_moduli(volumes, bulk_moduli, shear_moduli)[source]

Average the shear moduli of a composite with the Reuss (iso-stress) bound, given by:

$G_R = \left( \Sigma_i \frac{V_i}{G_i} \right)^{-1}$
Parameters: volumes : list of floats List of the volume of each phase in the composite. $$[m^3]$$ bulk_moduli : list of floats List of bulk moduli $$K$$ of each phase in the composite. Not used in this average. $$[Pa]$$ shear_moduli : list of floats List of shear moduli $$G$$ of each phase in the composite. $$[Pa]$$ G : float The Reuss average shear modulus $$G_R$$. $$[Pa]$$
average_density(volumes, densities)

Average the densities of a composite, given a list of volume fractions and densitites. This is implemented in the base class, as how to calculate it is not dependent on the geometry of the rock. The formula for density is given by

$\rho = \frac{\Sigma_i \rho_i V_i }{\Sigma_i V_i}$
Parameters: volumes : list of floats List of the volume of each phase in the composite. $$[m^3]$$ densities : list of floats List of densities of each phase in the composite. $$[kg/m^3]$$ rho : float Density $$\rho$$. $$[kg/m^3]$$
average_heat_capacity_p(fractions, c_p)

Averages the heat capacities at constant pressure $$C_P$$ by molar fractions.

Parameters: fractions : list of floats List of molar fractions of each phase in the composite (should sum to 1.0). c_p : list of floats List of heat capacities at constant pressure $$C_P$$ of each phase in the composite. $$[J/K/mol]$$ c_p : float heat capacity at constant pressure $$C_P$$ of the composite. $$[J/K/mol]$$
average_heat_capacity_v(fractions, c_v)

Averages the heat capacities at constant volume $$C_V$$ by molar fractions as in eqn. (16) in [IS92].

Parameters: fractions : list of floats List of molar fractions of each phase in the composite (should sum to 1.0). c_v : list of floats List of heat capacities at constant volume $$C_V$$ of each phase in the composite. $$[J/K/mol]$$ c_v : float heat capacity at constant volume of the composite $$C_V$$. $$[J/K/mol]$$
average_thermal_expansivity(volumes, alphas)

thermal expansion coefficient of the mineral $$\alpha$$. $$[1/K]$$

## Voigt-Reuss-Hill average¶

class burnman.averaging_schemes.VoigtReussHill[source]

Class for computing the Voigt-Reuss-Hill average for elastic properties. This derives from burnman.averaging_schemes.averaging_scheme, and implements the burnman.averaging_schemes.averaging_scheme.average_bulk_moduli() and burnman.averaging_schemes.averaging_scheme.average_shear_moduli() functions.

average_bulk_moduli(volumes, bulk_moduli, shear_moduli)[source]

Average the bulk moduli of a composite with the Voigt-Reuss-Hill average, given by:

$K_{VRH} = \frac{K_V + K_R}{2}$

This is simply a shorthand for an arithmetic average of the bounds given by burnman.averaging_schemes.voigt and burnman.averaging_schemes.reuss.

Parameters: volumes : list of floats List of the volume of each phase in the composite. $$[m^3]$$ bulk_moduli : list of floats List of bulk moduli $$K$$ of each phase in the composite. $$[Pa]$$ shear_moduli : list of floats List of shear moduli $$G$$ of each phase in the composite. Not used in this average. $$[Pa]$$ K : float The Voigt-Reuss-Hill average bulk modulus $$K_{VRH}$$. $$[Pa]$$
average_shear_moduli(volumes, bulk_moduli, shear_moduli)[source]

Average the shear moduli $$G$$ of a composite with the Voigt-Reuss-Hill average, given by:

$G_{VRH} = \frac{G_V + G_R}{2}$

This is simply a shorthand for an arithmetic average of the bounds given by burnman.averaging_schemes.voigt and burnman.averaging_schemes.reuss.

Parameters: volumes : list of floats List of the volume of each phase in the composite $$[m^3]$$ bulk_moduli : list of floats List of bulk moduli $$K$$ of each phase in the composite Not used in this average. $$[Pa]$$ shear_moduli : list of floats List of shear moduli $$G$$ of each phase in the composite $$[Pa]$$ G : float The Voigt-Reuss-Hill average shear modulus $$G_{VRH}$$. $$[Pa]$$
average_density(volumes, densities)

Average the densities of a composite, given a list of volume fractions and densitites. This is implemented in the base class, as how to calculate it is not dependent on the geometry of the rock. The formula for density is given by

$\rho = \frac{\Sigma_i \rho_i V_i }{\Sigma_i V_i}$
Parameters: volumes : list of floats List of the volume of each phase in the composite. $$[m^3]$$ densities : list of floats List of densities of each phase in the composite. $$[kg/m^3]$$ rho : float Density $$\rho$$. $$[kg/m^3]$$
average_heat_capacity_p(fractions, c_p)

Averages the heat capacities at constant pressure $$C_P$$ by molar fractions.

Parameters: fractions : list of floats List of molar fractions of each phase in the composite (should sum to 1.0). c_p : list of floats List of heat capacities at constant pressure $$C_P$$ of each phase in the composite. $$[J/K/mol]$$ c_p : float heat capacity at constant pressure $$C_P$$ of the composite. $$[J/K/mol]$$
average_heat_capacity_v(fractions, c_v)

Averages the heat capacities at constant volume $$C_V$$ by molar fractions as in eqn. (16) in [IS92].

Parameters: fractions : list of floats List of molar fractions of each phase in the composite (should sum to 1.0). c_v : list of floats List of heat capacities at constant volume $$C_V$$ of each phase in the composite. $$[J/K/mol]$$ c_v : float heat capacity at constant volume of the composite $$C_V$$. $$[J/K/mol]$$
average_thermal_expansivity(volumes, alphas)

thermal expansion coefficient of the mineral $$\alpha$$. $$[1/K]$$

## Hashin-Shtrikman upper bound¶

class burnman.averaging_schemes.HashinShtrikmanUpper[source]

Class for computing the upper Hashin-Shtrikman bound for elastic properties. This derives from burnman.averaging_schemes.averaging_scheme, and implements the burnman.averaging_schemes.averaging_scheme.average_bulk_moduli() and burnman.averaging_schemes.averaging_scheme.average_shear_moduli() functions. Implements formulas from [WDOConnell76]. The Hashin-Shtrikman bounds are tighter than the Voigt and Reuss bounds because they make the additional assumption that the orientation of the phases are statistically isotropic. In some cases this may be a good assumption, and in others it may not be.

average_bulk_moduli(volumes, bulk_moduli, shear_moduli)[source]

Average the bulk moduli of a composite with the upper Hashin-Shtrikman bound. Implements Formulas from [WDOConnell76], which are too lengthy to reproduce here.

Parameters: volumes : list of floats List of the volume of each phase in the composite. $$[m^3]$$ bulk_moduli : list of floats List of bulk moduli $$K$$ of each phase in the composite. $$[Pa]$$ shear_moduli : list of floats List of shear moduli $$G$$ of each phase in the composite. $$[Pa]$$ K : float The upper Hashin-Shtrikman average bulk modulus $$K$$. $$[Pa]$$
average_shear_moduli(volumes, bulk_moduli, shear_moduli)[source]

Average the shear moduli of a composite with the upper Hashin-Shtrikman bound. Implements Formulas from [WDOConnell76], which are too lengthy to reproduce here.

Parameters: volumes : list of floats List of the volume of each phase in the composite. $$[m^3]$$ bulk_moduli : list of floats List of bulk moduli $$K$$ of each phase in the composite. $$[Pa]$$ shear_moduli : list of floats List of shear moduli $$G$$ of each phase in the composite. $$[Pa]$$ G : float The upper Hashin-Shtrikman average shear modulus $$G$$. $$[Pa]$$
average_density(volumes, densities)

Average the densities of a composite, given a list of volume fractions and densitites. This is implemented in the base class, as how to calculate it is not dependent on the geometry of the rock. The formula for density is given by

$\rho = \frac{\Sigma_i \rho_i V_i }{\Sigma_i V_i}$
Parameters: volumes : list of floats List of the volume of each phase in the composite. $$[m^3]$$ densities : list of floats List of densities of each phase in the composite. $$[kg/m^3]$$ rho : float Density $$\rho$$. $$[kg/m^3]$$
average_heat_capacity_p(fractions, c_p)

Averages the heat capacities at constant pressure $$C_P$$ by molar fractions.

Parameters: fractions : list of floats List of molar fractions of each phase in the composite (should sum to 1.0). c_p : list of floats List of heat capacities at constant pressure $$C_P$$ of each phase in the composite. $$[J/K/mol]$$ c_p : float heat capacity at constant pressure $$C_P$$ of the composite. $$[J/K/mol]$$
average_heat_capacity_v(fractions, c_v)

Averages the heat capacities at constant volume $$C_V$$ by molar fractions as in eqn. (16) in [IS92].

Parameters: fractions : list of floats List of molar fractions of each phase in the composite (should sum to 1.0). c_v : list of floats List of heat capacities at constant volume $$C_V$$ of each phase in the composite. $$[J/K/mol]$$ c_v : float heat capacity at constant volume of the composite $$C_V$$. $$[J/K/mol]$$
average_thermal_expansivity(volumes, alphas)

thermal expansion coefficient of the mineral $$\alpha$$. $$[1/K]$$

## Hashin-Shtrikman lower bound¶

class burnman.averaging_schemes.HashinShtrikmanLower[source]

Class for computing the lower Hashin-Shtrikman bound for elastic properties. This derives from burnman.averaging_schemes.averaging_scheme, and implements the burnman.averaging_schemes.averaging_scheme.average_bulk_moduli() and burnman.averaging_schemes.averaging_scheme.average_shear_moduli() functions. Implements Formulas from [WDOConnell76]. The Hashin-Shtrikman bounds are tighter than the Voigt and Reuss bounds because they make the additional assumption that the orientation of the phases are statistically isotropic. In some cases this may be a good assumption, and in others it may not be.

average_bulk_moduli(volumes, bulk_moduli, shear_moduli)[source]

Average the bulk moduli of a composite with the lower Hashin-Shtrikman bound. Implements Formulas from [WDOConnell76], which are too lengthy to reproduce here.

Parameters: volumes : list of floats List of the volume of each phase in the composite. $$[m^3]$$ bulk_moduli : list of floats List of bulk moduli $$K$$ of each phase in the composite. $$[Pa]$$ shear_moduli : list of floats List of shear moduli $$G$$ of each phase in the composite. $$[Pa]$$ K : float The lower Hashin-Shtrikman average bulk modulus $$K$$. $$[Pa]$$
average_shear_moduli(volumes, bulk_moduli, shear_moduli)[source]

Average the shear moduli of a composite with the lower Hashin-Shtrikman bound. Implements Formulas from [WDOConnell76], which are too lengthy to reproduce here.

Parameters: volumes : list of floats List of volumes of each phase in the composite. $$[m^3]$$. bulk_moduli : list of floats List of bulk moduli $$K$$ of each phase in the composite. $$[Pa]$$. shear_moduli : list of floats List of shear moduli $$G$$ of each phase in the composite. $$[Pa]$$ G : float The lower Hashin-Shtrikman average shear modulus $$G$$. $$[Pa]$$
average_density(volumes, densities)

Average the densities of a composite, given a list of volume fractions and densitites. This is implemented in the base class, as how to calculate it is not dependent on the geometry of the rock. The formula for density is given by

$\rho = \frac{\Sigma_i \rho_i V_i }{\Sigma_i V_i}$
Parameters: volumes : list of floats List of the volume of each phase in the composite. $$[m^3]$$ densities : list of floats List of densities of each phase in the composite. $$[kg/m^3]$$ rho : float Density $$\rho$$. $$[kg/m^3]$$
average_heat_capacity_p(fractions, c_p)

Averages the heat capacities at constant pressure $$C_P$$ by molar fractions.

Parameters: fractions : list of floats List of molar fractions of each phase in the composite (should sum to 1.0). c_p : list of floats List of heat capacities at constant pressure $$C_P$$ of each phase in the composite. $$[J/K/mol]$$ c_p : float heat capacity at constant pressure $$C_P$$ of the composite. $$[J/K/mol]$$
average_heat_capacity_v(fractions, c_v)

Averages the heat capacities at constant volume $$C_V$$ by molar fractions as in eqn. (16) in [IS92].

Parameters: fractions : list of floats List of molar fractions of each phase in the composite (should sum to 1.0). c_v : list of floats List of heat capacities at constant volume $$C_V$$ of each phase in the composite. $$[J/K/mol]$$ c_v : float heat capacity at constant volume of the composite $$C_V$$. $$[J/K/mol]$$
average_thermal_expansivity(volumes, alphas)

thermal expansion coefficient of the mineral $$\alpha$$. $$[1/K]$$

## Hashin-Shtrikman arithmetic average¶

class burnman.averaging_schemes.HashinShtrikmanAverage[source]

Class for computing arithmetic mean of the Hashin-Shtrikman bounds on elastic properties. This derives from burnman.averaging_schemes.averaging_scheme, and implements the burnman.averaging_schemes.averaging_scheme.average_bulk_moduli() and burnman.averaging_schemes.averaging_scheme.average_shear_moduli() functions.

average_bulk_moduli(volumes, bulk_moduli, shear_moduli)[source]

Average the bulk moduli of a composite with the arithmetic mean of the upper and lower Hashin-Shtrikman bounds.

Parameters: volumes : list of floats List of the volumes of each phase in the composite. $$[m^3]$$ bulk_moduli : list of floats List of bulk moduli $$K$$ of each phase in the composite. $$[Pa]$$ shear_moduli : list of floats List of shear moduli $$G$$ of each phase in the composite. Not used in this average. $$[Pa]$$ K : float The arithmetic mean of the Hashin-Shtrikman bounds on bulk modulus $$K$$. $$[Pa]$$
average_shear_moduli(volumes, bulk_moduli, shear_moduli)[source]

Average the bulk moduli of a composite with the arithmetic mean of the upper and lower Hashin-Shtrikman bounds.

Parameters: volumes : list of floats List of the volumes of each phase in the composite. [m^3]. bulk_moduli : list of floats List of bulk moduli $$K$$ of each phase in the composite. Not used in this average. $$[Pa]$$ shear_moduli : list of floats List of shear moduli $$G$$ of each phase in the composite. $$[Pa]$$ G : float The arithmetic mean of the Hashin-Shtrikman bounds on shear modulus $$G$$. $$[Pa]$$
average_density(volumes, densities)

Average the densities of a composite, given a list of volume fractions and densitites. This is implemented in the base class, as how to calculate it is not dependent on the geometry of the rock. The formula for density is given by

$\rho = \frac{\Sigma_i \rho_i V_i }{\Sigma_i V_i}$
Parameters: volumes : list of floats List of the volume of each phase in the composite. $$[m^3]$$ densities : list of floats List of densities of each phase in the composite. $$[kg/m^3]$$ rho : float Density $$\rho$$. $$[kg/m^3]$$
average_heat_capacity_p(fractions, c_p)

Averages the heat capacities at constant pressure $$C_P$$ by molar fractions.

Parameters: fractions : list of floats List of molar fractions of each phase in the composite (should sum to 1.0). c_p : list of floats List of heat capacities at constant pressure $$C_P$$ of each phase in the composite. $$[J/K/mol]$$ c_p : float heat capacity at constant pressure $$C_P$$ of the composite. $$[J/K/mol]$$
average_heat_capacity_v(fractions, c_v)

Averages the heat capacities at constant volume $$C_V$$ by molar fractions as in eqn. (16) in [IS92].

Parameters: fractions : list of floats List of molar fractions of each phase in the composite (should sum to 1.0). c_v : list of floats List of heat capacities at constant volume $$C_V$$ of each phase in the composite. $$[J/K/mol]$$ c_v : float heat capacity at constant volume of the composite $$C_V$$. $$[J/K/mol]$$
average_thermal_expansivity(volumes, alphas)

thermal expansion coefficient of the mineral $$\alpha$$. $$[1/K]$$


text:
# （Leetcode）371. Sum of Two Integers

371. Sum of Two Integers
Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -.
Example:
Given a = 1 and b = 2, return 3.

## Solution

### 思路

“^” XOR operation, 获得(a+b)的“和”in each bit
“&” AND operation, 获得(a+b)的“进位”in each bit.

### Code

public class Solution {
public int getSum(int a, int b) {
if(b==0)
return a;
int sum = a^b;
int carrybit = (a&b)<<1;
return getSum(sum,carrybit);
}
}

• 本文已收录于以下专栏：

## Leetcode 371. Sum of Two Integers

371. Sum of Two Integers Total Accepted: 8805 Total Submissions: 17071 Difficulty: Easy Calc...

## 【题解】Leetcode.371. Sum of Two Integers

Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -. ...

## [LeetCode] 371. Sum of Two Integers

371. Sum of Two Integers(Easy) 常规解法，巧妙解法，内存机制？

## LeetCode 371.Sum of Two Integers 位运算实现加法(减法)

1.原题Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -.(...

## LeetCode之路：371. Sum of Two Integers

LeetCode之路：371. Sum of Two Integers 一、引言这道题非常小巧，题干非常简洁： Calculate the sum of two integers a and b,...

## [leetcode]--371. Sum of Two Integers

Question 371： Calculate the sum of two integers a and b, but you are not allowed to use the operat...

举报原因： 您举报文章：深度学习：神经网络中的前向传播和反向传播算法推导 色情 政治 抄袭 广告 招聘 骂人 其他 (最多只允许输入30个字)


text:
ROC curve interpretation [duplicate]

In the context of binary classification how do you interpret ROC curve: more precisely:

1) Why the diagonal stand for a random classifier?

 Let's imagine a random classifier: each time he see an observation he labels this observation to 1 with a probability of 0.5.

So with a lot of observations,

• among the observation with true label 1 half of them will be correctly classified.
• In the same way there is a 0.5 false positive rate (among the true label 0 half of them will be classified 1).

So on ROC curve this classifier will be on the diagonal on the point (0.5,0.5). But I can only see this case unless i don't understand well the meaning of random classifier in this context...

2) Why ROC curve is insensitive to Class skew ? Why ROC curve is insensitive to class distributions or error costs.

Let's imagine we have a sample of observation and we draw the ROC curve. Now let's add a lot of observation wich are labelled 0, does the ROC curve stay the same ? what does it mean and how to explain this ?

Her I saw an explanation: https://www.quora.com/Why-is-AUC-Area-under-ROC-insensitive-to-class-distribution-changes; the answers seems good if we assume that when we increase the number of negative sample they should be distributed with the same score distribution that the previous neagative samples.

PS: A mathematical paper (with proof) could help me to well understand the previous assertion since it will be formally defined. I found this one (in my language) but i am not sur it is correct since there seem to have a mistake since the begining with the RECALL definition: http://www.xavierdupre.fr/app/mlstatpy/helpsphinx/c_metric/roc.html. So if you have any reference please share it. I


text:
### Home > CCA2 > Chapter 7 > Lesson 7.1.2 > Problem7-16

7-16.

Find the measure of angle A in the diagram below.

The length $0.3$ is opposite angle $A$ and the length $1$ is the hypotenuse. Which trigonometric relationship works with opposite and hypotenuse?

$\sin A = \frac{0.3}{1}$

$A=\sin^{-1}(0.3)\approx17.46°$


text:
# How to Move Footers to the Top of Excel Tables

This page describes how to use an Excel Macro to move all of the footers from a set of exported tables to the tops of the tables to. Excel macros use a programming language called Visual Basic to perform repetitive tasks automatically. The macro will move the footer information below the question name. The macro assumes that you have one table per worksheet, and that the table is placed in the default position with the question name in the cell A1.

To use the macro you need to make sure that macros have been enabled and that the Developer tab is shown in the Excel ribbon.

The process for enabling the Developer tab can be found here: [1]

The process for enabling Macros can be found here: [2]

Once macros are enabled and you have exported a batch of tables, you should add the below macro to your Excel worksheet and run it. To do so:

1. Select the Developer tab.
2. Click on the Visual Basic button in the top left. This will open a new window called Microsoft Visual Basic for Applications.
3. In the window on the left hand side you will see a list of folders. Select the folder that contains the name of your workbook.
4. Right-click it and select Insert > Module.
5. Click on Module 1. This will open a box which will have the name of your workbook and Module 1 at the top.
6. Paste the code below into this window.
7. Go back to the main Excel window containing your tables.
8. Click the Macros button in the top left.
9. Click on the macro named FootersToTop.
10. Click Run

Sub FootersToTop()

' Loop over the sheets in the workbook

For Each sht In ActiveWorkbook.Worksheets

' Select the current sheet in the list

sht.Select

' Insert a blank row at the top

Rows("2:2").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove

'Find the last row

Dim LastRow As Long
With ActiveSheet
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
End With

'Cut and paste footer to top cell

Range("A" & LastRow).Select
Selection.Cut
Range("A2").Select
ActiveSheet.Paste

Next sht

End Sub


text:
# LaTeX TikZ - auto resize block to fit text

I got this kind of code in LaTeX using TikZ:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}

\begin{document}

\tikzstyle{block} = [draw,rectangle,fill=blue!50,text width=8em, text centered,minimum height=8mm,node distance=10em]
\tikzstyle{line} = [draw, -latex']

\begin{tikzpicture}
\tikzstyle{every node}=[font=\small]
\node [block, xshift=-3em](start){ST\_Category};
\node [block, right of=start, xshift=5em](process1){Process 1};
\end{tikzpicture}

\end{document}

Blocks got fixed size. All i want to achieve to have those block auto resize to fit longer text. So the block getting withders when text is longer. For example if in first block text will be "DASDASDADASDASDASDAS" it will go over the block borders which will look bad. I what those blocks to automatically expand when the text is longer.

-

## migrated from stackoverflow.comJul 30 '12 at 17:18

This question came from our site for professional and enthusiast programmers.

Welcome to TeX.sx! Your question was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other (by using the same OpenID), otherwise you won't be able to comment on or accept answers or edit your question. – Werner Jul 30 '12 at 17:20

You are specifying that the with of the text is fixed via the option text width=8em. If you just eliminate that option, the box will re-size to the text.

Here is a comparison with text width=8em specified for the first line, but not for the second line:

## Code:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}

\begin{document}

\tikzstyle{block} = [draw, rectangle, fill=blue!50,, text centered, minimum height=8mm,node distance=10em]
\tikzstyle{line} = [draw, -latex']

\tikzstyle{every node}=[font=\small]

\begin{tikzpicture}[text width=8em]